distro: gcc: Do not store configure flags in the resulting binaries.
* distro/base.scm (gcc-4.7): Add a `post-configure' phase to clear `TOPLEVEL_CONFIGURE_ARGUMENTS' in the top-level `Makefile'.
This commit is contained in:
parent
dcd60f4398
commit
a436d2018e
|
@ -631,6 +631,14 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
|
|||
(string-append line "\n")
|
||||
'pre libc "/lib/" 1 "crt" 2 ".o"
|
||||
'post)))))
|
||||
(alist-cons-after
|
||||
'configure 'post-configure
|
||||
(lambda _
|
||||
;; Don't store configure flags, to avoid retaining references to
|
||||
;; build-time dependencies---e.g., `--with-ppl=/nix/store/xxx'.
|
||||
(substitute* "Makefile"
|
||||
(("^TOPLEVEL_CONFIGURE_ARGUMENTS=(.*)$" _ rest)
|
||||
"TOPLEVEL_CONFIGURE_ARGUMENTS=\n")))
|
||||
(alist-replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(zero?
|
||||
|
@ -638,7 +646,7 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
|
|||
,(if stripped?
|
||||
"install-strip"
|
||||
"install"))))
|
||||
%standard-phases))))
|
||||
%standard-phases)))))
|
||||
|
||||
(properties `((gcc-libc . ,(assoc-ref inputs "libc"))))
|
||||
(description "The GNU Compiler Collection")
|
||||
|
|
Loading…
Reference in New Issue