unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: 52186@debbugs.gnu.org
Cc: efraim@flashner.co.il, maxim.cournoyer@gmail.com,
	zimoun <zimon.toutoune@gmail.com>
Subject: [bug#52186] [core-updates-frozen PATCH v2 01/17] gnu: libunwind-julia: Fix build on i686-linux.
Date: Wed,  1 Dec 2021 16:53:47 +0100	[thread overview]
Message-ID: <20211201155355.60845-1-zimon.toutoune@gmail.com> (raw)
In-Reply-To: <20211129182108.54695-1-zimon.toutoune@gmail.com>

* 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.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/julia.scm                        | 18 +++++----
 ...libunwind-julia-fix-GCC10-fno-common.patch | 40 +++++++++++++++++++
 3 files changed, 52 insertions(+), 7 deletions(-)
 create mode 100644 gnu/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 2fc05ba703..ae024484c5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1388,6 +1388,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libtirpc-hurd.patch			\
   %D%/packages/patches/libtommath-fix-linkage.patch		\
   %D%/packages/patches/libtool-skip-tests2.patch		\
+  %D%/packages/patches/libunwind-julia-fix-GCC10-fno-common.patch \
   %D%/packages/patches/libusb-0.1-disable-tests.patch		\
   %D%/packages/patches/libusb-for-axoloti.patch			\
   %D%/packages/patches/libutils-add-includes.patch		\
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 @@ (define libunwind-julia
         (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;
+ }
+ 
-- 
2.32.0





  parent reply	other threads:[~2021-12-01 15:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 18:21 [bug#52186] [core-updates-frozen] [PATCH] gnu: libunwind-julia: Fix build on i686-linux zimoun
2021-11-29 18:51 ` [bug#52186] [core-updates-frozen] Fix julia " zimoun
2021-12-01 15:52 ` [bug#52186] [core-updates-frozen PATCH v2 00/17] Fix Julia " zimoun
2021-12-04 17:54   ` bug#52186: " Efraim Flashner
2021-12-04 18:27     ` [bug#52186] " zimoun
2021-12-05  9:49       ` Efraim Flashner
2021-12-05 10:36         ` zimoun
2021-12-01 15:53 ` zimoun [this message]
2021-12-01 15:53   ` [bug#52186] [core-updates-frozen PATCH v2 02/17] gnu: julia-datastructures: Fix tests " zimoun
2021-12-01 15:53   ` [bug#52186] [core-updates-frozen PATCH v2 03/17] gnu: julia-benchmarktools: " zimoun
2021-12-01 15:53   ` [bug#52186] [core-updates-frozen PATCH v2 04/17] gnu: julia-finitedifferences: " zimoun
2021-12-01 15:53   ` [bug#52186] [core-updates-frozen PATCH v2 05/17] gnu: julia-configurations: " zimoun
2021-12-01 15:53   ` [bug#52186] [core-updates-frozen PATCH v2 06/17] gnu: julia-lazyarrays: " zimoun
2021-12-01 15:53   ` [bug#52186] [core-updates-frozen PATCH v2 07/17] gnu: julia-blockarrays: " zimoun
2021-12-01 15:53   ` [bug#52186] [core-updates-frozen PATCH v2 08/17] gnu: julia-mappedarrays: " zimoun
2021-12-01 15:53   ` [bug#52186] [core-updates-frozen PATCH v2 09/17] gnu: julia-arrayinterface: Disable tests for i686 zimoun
2021-12-01 15:54 ` [bug#52186] [core-updates-frozen PATCH v2 10/17] gnu: julia-interpolations: Disable tests in i686-linux zimoun
2021-12-01 15:54   ` [bug#52186] [core-updates-frozen PATCH v2 11/17] gnu: julia-reversediff: Disable tests on i686-linux zimoun
2021-12-01 15:54   ` [bug#52186] [core-updates-frozen PATCH v2 12/17] gnu: julia-intervalsets: Fix " zimoun
2021-12-01 15:54   ` [bug#52186] [core-updates-frozen PATCH v2 13/17] gnu: julia-woodburymatrices: " zimoun
2021-12-01 15:54   ` [bug#52186] [core-updates-frozen PATCH v2 14/17] gnu: julia-mutablearithmetics: " zimoun
2021-12-01 15:54   ` [bug#52186] [core-updates-frozen PATCH v2 15/17] gnu: julia-structarrays: " zimoun
2021-12-01 15:54   ` [bug#52186] [core-updates-frozen PATCH v2 16/17] gnu: julia-geometrybasics: " zimoun
2021-12-01 15:54   ` [bug#52186] [core-updates-frozen PATCH v2 17/17] gnu: julia-forwarddiff: Disable " zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211201155355.60845-1-zimon.toutoune@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=52186@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).