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 <ludo@gnu.org>
This commit is contained in:
parent
0c1b29db3a
commit
fc649d0aad
|
@ -4,6 +4,7 @@
|
||||||
;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
|
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
|
||||||
;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
|
||||||
|
;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; 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.
|
;; Fix the dynamic linker's file name.
|
||||||
(substitute* (find-files "gcc/config"
|
(substitute* (find-files "gcc/config"
|
||||||
"^(linux|gnu)(64|-elf|-eabi)?\\.h$")
|
"^(linux|gnu|sysv4)(64|-elf|-eabi)?\\.h$")
|
||||||
(("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
|
(("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
|
||||||
(format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%"
|
(format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%"
|
||||||
suffix
|
suffix
|
||||||
|
@ -239,6 +240,20 @@ where the OS part is overloaded to denote a specific ABI---into GCC
|
||||||
(("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
|
(("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
|
||||||
(format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
|
(format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
|
||||||
#define STANDARD_STARTFILE_PREFIX_2 \"\"
|
#define STANDARD_STARTFILE_PREFIX_2 \"\"
|
||||||
|
~a"
|
||||||
|
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"
|
~a"
|
||||||
libc line))))
|
libc line))))
|
||||||
|
|
||||||
|
|
|
@ -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
|
;; the 'pre-configure phase of our main gcc package, because
|
||||||
;; that shared library is not present in this static gcc. See
|
;; that shared library is not present in this static gcc. See
|
||||||
;; <https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00008.html>.
|
;; <https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00008.html>.
|
||||||
(substitute* (find-files "gcc/config"
|
(substitute* (cons "gcc/config/rs6000/sysv4.h"
|
||||||
"^gnu-user.*\\.h$")
|
(find-files "gcc/config"
|
||||||
|
"^gnu-user.*\\.h$"))
|
||||||
((" -lgcc_s}}") "}}")))
|
((" -lgcc_s}}") "}}")))
|
||||||
,phases)))))
|
,phases)))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
|
|
Loading…
Reference in New Issue