gnu: binutils: Use gexps.

This is the result of applying ‘guix style -S arguments’ and making
small adjustments.

* gnu/packages/base.scm (binutils)[arguments]: Use gexps.
(binutils-2.33, binutils-gold): Likewise.
* gnu/packages/commencement.scm (binutils-mesboot0, binutils-mesboot1)
(binutils-boot0, binutils-final): Likewise.
* gnu/packages/cross-base.scm (cross-binutils*): Adjust accordingly.
* gnu/packages/embedded.scm (make-propeller-binutils): Use gexps.
* gnu/packages/make-bootstrap.scm (%binutils-static): Use gexps.

Change-Id: I59cbe29760784b09e6d4e80beca9153cb9b495a7
This commit is contained in:
Ludovic Courtès 2024-01-11 13:50:30 +01:00
parent f9f2198d82
commit 77ee97628a
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
5 changed files with 151 additions and 144 deletions

View file

@ -375,32 +375,34 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(define %binutils-static
;; Statically-linked Binutils.
(package (inherit binutils)
(package
(inherit binutils)
(name "binutils-static")
(arguments
`(#:configure-flags (cons "--disable-gold"
,(match (memq #:configure-flags
(package-arguments binutils))
((#:configure-flags flags _ ...)
flags)))
#:make-flags ,(match (memq #:make-flags (package-arguments binutils))
((#:make-flags flags _ ...)
flags)
(_ ''()))
#:strip-flags '("--strip-all")
#:phases (modify-phases %standard-phases
(add-before 'configure 'all-static
(lambda _
;; The `-all-static' libtool flag can only be passed
;; after `configure', since configure tests don't use
;; libtool, and only for executables built with libtool.
(substitute* '("binutils/Makefile.in"
"gas/Makefile.in"
"ld/Makefile.in")
(("^LDFLAGS =(.*)$" line)
(string-append line
"\nAM_LDFLAGS = -static -all-static\n")))
#t)))))))
(list #:configure-flags
#~(cons "--disable-gold"
#$(match (memq #:configure-flags (package-arguments binutils))
((#:configure-flags flags _ ...)
flags)))
#:make-flags
(match (memq #:make-flags (package-arguments binutils))
((#:make-flags flags _ ...)
flags)
(_ #~'()))
#:strip-flags #~'("--strip-all")
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'all-static
(lambda _
;; The `-all-static' libtool flag can only be passed after
;; `configure', since configure tests don't use libtool,
;; and only for executables built with libtool.
(substitute* '("binutils/Makefile.in"
"gas/Makefile.in" "ld/Makefile.in")
(("^LDFLAGS =(.*)$" line)
(string-append
line
"\nAM_LDFLAGS = -static -all-static\n"))))))))))
(define %binutils-static-stripped
;; The subset of Binutils that we need.