gnu: make-bootstrap: Update phase style.
* gnu/packages/make-bootstrap.scm (%static-inputs): Use MODIFY-PHASES syntax and end phases with #t. (%binutils-static, %gcc-static)[arguments]: Likewise.
This commit is contained in:
parent
667e6f1e24
commit
edbce464b9
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
|
||||||
|
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -143,24 +144,24 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments bzip2)
|
(substitute-keyword-arguments (package-arguments bzip2)
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(alist-cons-before
|
`(modify-phases ,phases
|
||||||
'build 'dash-static
|
(add-before 'build 'dash-static
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "Makefile"
|
(substitute* "Makefile"
|
||||||
(("^LDFLAGS[[:blank:]]*=.*$")
|
(("^LDFLAGS[[:blank:]]*=.*$")
|
||||||
"LDFLAGS = -static")))
|
"LDFLAGS = -static"))
|
||||||
,phases))))))
|
#t))))))))
|
||||||
(xz (package (inherit xz)
|
(xz (package (inherit xz)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:strip-flags '("--strip-all")
|
`(#:strip-flags '("--strip-all")
|
||||||
#:phases (alist-cons-before
|
#:phases (modify-phases %standard-phases
|
||||||
'configure 'static-executable
|
(add-before 'configure 'static-executable
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Ask Libtool for a static executable.
|
;; Ask Libtool for a static executable.
|
||||||
(substitute* "src/xz/Makefile.in"
|
(substitute* "src/xz/Makefile.in"
|
||||||
(("^xz_LDADD =")
|
(("^xz_LDADD =")
|
||||||
"xz_LDADD = -all-static")))
|
"xz_LDADD = -all-static"))
|
||||||
%standard-phases)))))
|
#t)))))))
|
||||||
(gawk (package (inherit gawk)
|
(gawk (package (inherit gawk)
|
||||||
(source (origin (inherit (package-source gawk))
|
(source (origin (inherit (package-source gawk))
|
||||||
(patches (cons (search-patch "gawk-shell.patch")
|
(patches (cons (search-patch "gawk-shell.patch")
|
||||||
|
@ -175,14 +176,14 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
|
||||||
|
|
||||||
,@(substitute-keyword-arguments (package-arguments gawk)
|
,@(substitute-keyword-arguments (package-arguments gawk)
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(alist-cons-before
|
`(modify-phases ,phases
|
||||||
'configure 'no-export-dynamic
|
(add-before 'configure 'no-export-dynamic
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Since we use `-static', remove
|
;; Since we use `-static', remove
|
||||||
;; `-export-dynamic'.
|
;; `-export-dynamic'.
|
||||||
(substitute* "configure"
|
(substitute* "configure"
|
||||||
(("-Wl,-export-dynamic") "")))
|
(("-Wl,-export-dynamic") ""))
|
||||||
,phases)))))
|
#t)))))))
|
||||||
(inputs (if (%current-target-system)
|
(inputs (if (%current-target-system)
|
||||||
`(("bash" ,static-bash))
|
`(("bash" ,static-bash))
|
||||||
'()))))
|
'()))))
|
||||||
|
@ -304,19 +305,19 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
|
||||||
((#:configure-flags flags _ ...)
|
((#:configure-flags flags _ ...)
|
||||||
flags)))
|
flags)))
|
||||||
#:strip-flags '("--strip-all")
|
#:strip-flags '("--strip-all")
|
||||||
#:phases (alist-cons-before
|
#:phases (modify-phases %standard-phases
|
||||||
'configure 'all-static
|
(add-before 'configure 'all-static
|
||||||
(lambda _
|
(lambda _
|
||||||
;; The `-all-static' libtool flag can only be passed
|
;; The `-all-static' libtool flag can only be passed
|
||||||
;; after `configure', since configure tests don't use
|
;; after `configure', since configure tests don't use
|
||||||
;; libtool, and only for executables built with libtool.
|
;; libtool, and only for executables built with libtool.
|
||||||
(substitute* '("binutils/Makefile.in"
|
(substitute* '("binutils/Makefile.in"
|
||||||
"gas/Makefile.in"
|
"gas/Makefile.in"
|
||||||
"ld/Makefile.in")
|
"ld/Makefile.in")
|
||||||
(("^LDFLAGS =(.*)$" line)
|
(("^LDFLAGS =(.*)$" line)
|
||||||
(string-append line
|
(string-append line
|
||||||
"\nAM_LDFLAGS = -static -all-static\n"))))
|
"\nAM_LDFLAGS = -static -all-static\n")))
|
||||||
%standard-phases)))))
|
#t)))))))
|
||||||
|
|
||||||
(define %binutils-static-stripped
|
(define %binutils-static-stripped
|
||||||
;; The subset of Binutils that we need.
|
;; The subset of Binutils that we need.
|
||||||
|
@ -422,18 +423,18 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
|
||||||
(remove (cut string-match "--(.*plugin|enable-languages)" <>)
|
(remove (cut string-match "--(.*plugin|enable-languages)" <>)
|
||||||
,flags)))
|
,flags)))
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(alist-cons-after
|
`(modify-phases ,phases
|
||||||
'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}}") "}}"))
|
||||||
,phases)))))
|
#t)))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(if (%current-target-system)
|
(if (%current-target-system)
|
||||||
`(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
|
`(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
|
||||||
|
|
Loading…
Reference in New Issue