diff options
author | zimoun <zimon.toutoune@gmail.com> | 2021-12-01 16:53:47 +0100 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2021-12-04 19:33:30 +0200 |
commit | 9112bed60891f25c275f5da1f6f4195701919c0d (patch) | |
tree | a9285cb87ed3e843e1da4f8b6030f75631730ae9 /gnu/packages | |
parent | cc491eab7ebd2de29fbb6fc31df75521afebc41b (diff) | |
download | guix-9112bed60891f25c275f5da1f6f4195701919c0d.tar.gz guix-9112bed60891f25c275f5da1f6f4195701919c0d.zip |
gnu: libunwind-julia: Fix build on i686-linux.
* gnu/packages/julia.scm (libunwind)[origin]<patches>: Add patch.
* gnu/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch: New file.
* gnu/local/mk (dist_patch_DATA): Register it.
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/julia.scm | 18 | ||||
-rw-r--r-- | gnu/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch | 40 |
2 files changed, 51 insertions, 7 deletions
diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index 83aa8b1099..17f4a9a169 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -71,13 +71,17 @@ (base32 "1y0l08k6ak1mqbfj6accf9s5686kljwgsl4vcqpxzk5n74wpm6a3")) (patches - (list - (julia-patch "libunwind-prefer-extbl" - "0lr4dafw8qyfh8sw8hhbwkql1dlhqv8px7k81y2l20hhxfgnh2m1") - (julia-patch "libunwind-static-arm" - "1jk3bmiw61ypcchqkk1fyg5wh8wpggk574wxyfyaic870zh3lhgq") - (julia-patch "libunwind-cfa-rsp" - "1aswjhvysahhldbzh1afbf0hsjxrvs6xidsz2i7s1cjkjbdiia1z"))))) + (append + ;; Fix linker issue for i686-linux because GCC10 changed default + ;; (see '-fno-common' option). + (search-patches "libunwind-julia-fix-GCC10-fno-common.patch") + (list + (julia-patch "libunwind-prefer-extbl" + "0lr4dafw8qyfh8sw8hhbwkql1dlhqv8px7k81y2l20hhxfgnh2m1") + (julia-patch "libunwind-static-arm" + "1jk3bmiw61ypcchqkk1fyg5wh8wpggk574wxyfyaic870zh3lhgq") + (julia-patch "libunwind-cfa-rsp" + "1aswjhvysahhldbzh1afbf0hsjxrvs6xidsz2i7s1cjkjbdiia1z")))))) (home-page "https://github.com/JuliaLang/tree/master/deps/"))) (define (julia-patch-url version name) diff --git a/gnu/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch b/gnu/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch new file mode 100644 index 0000000000..8ef4b111e4 --- /dev/null +++ b/gnu/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch @@ -0,0 +1,40 @@ +Fix compilation with -fno-common. + +Borrowed from upstream 29e17d8d2ccbca07c423e3089a6d5ae8a1c9cb6e. +Author: Yichao Yu <yyc1992@gmail.com> +AuthorDate: Tue Mar 31 00:43:32 2020 -0400 +Commit: Dave Watson <dade.watson@gmail.com> +CommitDate: Tue Mar 31 08:06:29 2020 -0700 + +diff --git a/src/x86/Ginit.c b/src/x86/Ginit.c +index f6b8dc2..9550efa 100644 +--- a/src/x86/Ginit.c ++++ b/src/x86/Ginit.c +@@ -54,13 +54,6 @@ tdep_uc_addr (ucontext_t *uc, int reg) + + # endif /* UNW_LOCAL_ONLY */ + +-HIDDEN unw_dyn_info_list_t _U_dyn_info_list; +- +-/* XXX fix me: there is currently no way to locate the dyn-info list +- by a remote unwinder. On ia64, this is done via a special +- unwind-table entry. Perhaps something similar can be done with +- DWARF2 unwind info. */ +- + static void + put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg) + { +@@ -71,7 +64,12 @@ static int + get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr, + void *arg) + { +- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list; ++#ifndef UNW_LOCAL_ONLY ++# pragma weak _U_dyn_info_list_addr ++ if (!_U_dyn_info_list_addr) ++ return -UNW_ENOINFO; ++#endif ++ *dyn_info_list_addr = _U_dyn_info_list_addr (); + return 0; + } + |