guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: gcc: Do not pass -dynamic-linker to linker when !shared on a


From: Mark H. Weaver
Subject: 01/01: gnu: gcc: Do not pass -dynamic-linker to linker when !shared on arm.
Date: Thu, 09 Apr 2015 05:58:30 +0000

mhw pushed a commit to branch core-updates
in repository guix.

commit 1421afa94a825d413a5609ef0d89b878e1ba458c
Author: Mark H Weaver <address@hidden>
Date:   Thu Apr 9 01:48:05 2015 -0400

    gnu: gcc: Do not pass -dynamic-linker to linker when !shared on arm.
    
    Fixes <http://bugs.gnu.org/20102>.
    
    * gnu/packages/patches/gcc-arm-link-spec-fix.patch: New file.
    * gnu-system.am (dist_patch_DATA): Add it.
    * gnu/packages/gcc.scm (gcc-4.8, gcc-4.9): Add patch.
    * gnu/packages/cross-base.scm (cross-gcc): Preserve patches from gcc-4.8.
    
    Co-Authored-By: Ludovic Courtès <address@hidden>
---
 gnu-system.am                                    |    1 +
 gnu/packages/cross-base.scm                      |    6 ++++--
 gnu/packages/gcc.scm                             |    6 ++++--
 gnu/packages/patches/gcc-arm-link-spec-fix.patch |   16 ++++++++++++++++
 4 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index f9b58dd..e09ea33 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -412,6 +412,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/flashrom-use-libftdi1.patch             \
   gnu/packages/patches/flex-bison-tests.patch                  \
   gnu/packages/patches/gawk-shell.patch                                \
+  gnu/packages/patches/gcc-arm-link-spec-fix.patch             \
   gnu/packages/patches/gcc-cross-environment-variables.patch   \
   gnu/packages/patches/geoclue-config.patch                    \
   gnu/packages/patches/ghostscript-runpath.patch               \
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 0f15a0a..01cfdf7 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -202,8 +202,10 @@ GCC that does not target a libc; otherwise, target that 
libc."
                          target))
     (source (origin (inherit (package-source gcc-4.8))
               (patches
-               (cons (search-patch "gcc-cross-environment-variables.patch")
-                     (cross-gcc-patches target)))))
+               (append
+                (origin-patches (package-source gcc-4.8))
+                (cons (search-patch "gcc-cross-environment-variables.patch")
+                      (cross-gcc-patches target))))))
 
     ;; For simplicity, use a single output.  Otherwise libgcc_s & co. are not
     ;; found by default, etc.
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 4c06f84..2a3749f 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -309,7 +309,8 @@ Go.  It also includes runtime support libraries for these 
languages.")
                                  version "/gcc-" version ".tar.bz2"))
              (sha256
               (base32
-               "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a"))))))
+               "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a"))
+             (patches (list (search-patch "gcc-arm-link-spec-fix.patch")))))))
 
 (define-public gcc-4.9
   (package (inherit gcc-4.7)
@@ -320,7 +321,8 @@ Go.  It also includes runtime support libraries for these 
languages.")
                                  version "/gcc-" version ".tar.bz2"))
              (sha256
               (base32
-               "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810"))))))
+               "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810"))
+             (patches (list (search-patch "gcc-arm-link-spec-fix.patch")))))))
 
 (define* (custom-gcc gcc name languages #:key (separate-lib-output? #t))
   "Return a custom version of GCC that supports LANGUAGES."
diff --git a/gnu/packages/patches/gcc-arm-link-spec-fix.patch 
b/gnu/packages/patches/gcc-arm-link-spec-fix.patch
new file mode 100644
index 0000000..0ffe8a1
--- /dev/null
+++ b/gnu/packages/patches/gcc-arm-link-spec-fix.patch
@@ -0,0 +1,16 @@
+Do not pass -dynamic-linker to linker when !shared.
+Fixes <http://bugs.gnu.org/20102>.
+
+Patch by Ludovic Courtès <address@hidden>.
+
+--- gcc-4.8.4/gcc/config/arm/linux-elf.h.orig  2015-04-08 20:31:20.376900478 
+0200
++++ gcc-4.8.4/gcc/config/arm/linux-elf.h       2015-04-08 20:31:36.437014437 
+0200
+@@ -65,7 +65,7 @@
+    %{symbolic:-Bsymbolic} \
+    %{!static: \
+      %{rdynamic:-export-dynamic} \
+-     -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
++     %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
+    -X \
+    %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+    SUBTARGET_EXTRA_LINK_SPEC



reply via email to

[Prev in Thread] Current Thread [Next in Thread]