gnu: gcc-static: Make sure #:modules is not overridden by the inherited GCC.

This fixes a regression introduced by 56c833ea28
and 25bc0f34c6 where #:modules became ineffective.

* gnu/packages/make-bootstrap.scm (%gcc-static)[arguments]: Prepend the
required modules to those inherited from GCC-5.  While at it, do not splice in
the inherited arguments.
This commit is contained in:
Marius Bakke 2020-03-28 20:55:03 +01:00
parent aebcbb27bc
commit 313bf502b5
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -464,54 +464,54 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(name "gcc-static") (name "gcc-static")
(outputs '("out")) ; all in one (outputs '("out")) ; all in one
(arguments (arguments
`(#:modules ((guix build utils) (substitute-keyword-arguments (package-arguments gcc-5)
(guix build gnu-build-system) ((#:modules modules %gnu-build-system-modules)
(srfi srfi-1) `((srfi srfi-1)
(srfi srfi-26) (srfi srfi-26)
(ice-9 regex)) (ice-9 regex)
,@(substitute-keyword-arguments (package-arguments gcc-5) ,@modules))
((#:guile _) #f) ((#:guile _) #f)
((#:implicit-inputs? _) #t) ((#:implicit-inputs? _) #t)
((#:configure-flags flags) ((#:configure-flags flags)
`(append (list `(append (list
;; We don't need a full bootstrap here. ;; We don't need a full bootstrap here.
"--disable-bootstrap" "--disable-bootstrap"
;; Make sure '-static' is passed where it matters. ;; Make sure '-static' is passed where it matters.
"--with-stage1-ldflags=-static" "--with-stage1-ldflags=-static"
;; GCC 4.8+ requires a C++ compiler and library. ;; GCC 4.8+ requires a C++ compiler and library.
"--enable-languages=c,c++" "--enable-languages=c,c++"
;; Make sure gcc-nm doesn't require liblto_plugin.so. ;; Make sure gcc-nm doesn't require liblto_plugin.so.
"--disable-lto" "--disable-lto"
"--disable-shared" "--disable-shared"
"--disable-plugin" "--disable-plugin"
"--disable-libmudflap" "--disable-libmudflap"
"--disable-libatomic" "--disable-libatomic"
"--disable-libsanitizer" "--disable-libsanitizer"
"--disable-libitm" "--disable-libitm"
"--disable-libgomp" "--disable-libgomp"
"--disable-libcilkrts" "--disable-libcilkrts"
"--disable-libvtv" "--disable-libvtv"
"--disable-libssp" "--disable-libssp"
"--disable-libquadmath") "--disable-libquadmath")
(remove (cut string-match "--(.*plugin|enable-languages)" <>) (remove (cut string-match "--(.*plugin|enable-languages)" <>)
,flags))) ,flags)))
((#:phases phases) ((#:phases phases)
`(modify-phases ,phases `(modify-phases ,phases
(add-after 'pre-configure 'remove-lgcc_s (add-after 'pre-configure 'remove-lgcc_s
(lambda _ (lambda _
;; Remove the '-lgcc_s' added to GNU_USER_TARGET_LIB_SPEC in ;; Remove the '-lgcc_s' added to GNU_USER_TARGET_LIB_SPEC in
;; 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* (cons "gcc/config/rs6000/sysv4.h" (substitute* (cons "gcc/config/rs6000/sysv4.h"
(find-files "gcc/config" (find-files "gcc/config"
"^gnu-user.*\\.h$")) "^gnu-user.*\\.h$"))
((" -lgcc_s}}") "}}")) ((" -lgcc_s}}") "}}"))
#t))))))) #t))))))
(inputs (inputs
`(("zlib:static" ,zlib "static") `(("zlib:static" ,zlib "static")
("isl:static" ,isl-0.18 "static") ("isl:static" ,isl-0.18 "static")