guix-commits
[Top][All Lists]
Advanced

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

01/03: gnu: gcc: Adjust for PowerPC.


From: Ludovic Courtès
Subject: 01/03: gnu: gcc: Adjust for PowerPC.
Date: Wed, 4 Jan 2017 22:58:08 +0000 (UTC)

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

commit fc649d0aada3d71de75ee6ca149bc8bbd045efd5
Author: Carlos Sánchez de La Lama <address@hidden>
Date:   Wed Jan 4 23:47:24 2017 +0100

    gnu: gcc: Adjust for PowerPC.
    
    * gnu/packages/gcc.scm (gcc-4.7)[arguments]: Add powerpc specific
    substitutions for dynamic linker and start files locations in
    'pre-configure' phase.
    * gnu/packages/make-bootstrap.scm (%gcc-static)[arguments]: Add
    "gcc/config/rs6000/sysv4.h" to the list of files in 'remove-lgcc_s'
    phase.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 gnu/packages/gcc.scm            |   19 +++++++++++++++++--
 gnu/packages/make-bootstrap.scm |    5 +++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index acc57c8..8381392 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <address@hidden>
 ;;; Copyright © 2015 Andreas Enge <address@hidden>
 ;;; Copyright © 2015, 2016 Efraim Flashner <address@hidden>
+;;; Copyright © 2016 Carlos Sánchez de La Lama <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -211,7 +212,7 @@ where the OS part is overloaded to denote a specific 
ABI---into GCC
 
                 ;; Fix the dynamic linker's file name.
                 (substitute* (find-files "gcc/config"
-                                         "^(linux|gnu)(64|-elf|-eabi)?\\.h$")
+                                         
"^(linux|gnu|sysv4)(64|-elf|-eabi)?\\.h$")
                   (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
                    (format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%"
                            suffix
@@ -240,7 +241,21 @@ where the OS part is overloaded to denote a specific 
ABI---into GCC
                    (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
 #define STANDARD_STARTFILE_PREFIX_2 \"\"
 ~a"
-                           libc line))))
+                           libc line)))
+
+              ;; The rs6000 (a.k.a. powerpc) config in GCC does not use
+              ;; GNU_USER_* defines.  Do the above for this case.
+              (substitute*
+                  "gcc/config/rs6000/sysv4.h"
+                (("#define LIB_LINUX_SPEC (.*)$" _ suffix)
+                 (format #f "#define LIB_LINUX_SPEC \
+\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib -lgcc_s}} \" 
~a"
+                         libc libc libdir suffix))
+                (("#define     STARTFILE_LINUX_SPEC.*$" line)
+                 (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
+#define STANDARD_STARTFILE_PREFIX_2 \"\"
+~a"
+                         libc line))))
 
               ;; Don't retain a dependency on the build-time sed.
               (substitute* "fixincludes/fixincl.x"
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index f31db6a..fcd22ee 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -441,8 +441,9 @@ for `sh' in $PATH, and without nscd, and with static NSS 
modules."
                  ;; the 'pre-configure phase of our main gcc package, because
                  ;; that shared library is not present in this static gcc.  See
                  ;; 
<https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00008.html>.
-                 (substitute* (find-files "gcc/config"
-                                          "^gnu-user.*\\.h$")
+                 (substitute* (cons "gcc/config/rs6000/sysv4.h"
+                                    (find-files "gcc/config"
+                                                "^gnu-user.*\\.h$"))
                    ((" -lgcc_s}}") "}}")))
                ,phases)))))
      (native-inputs



reply via email to

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