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:
Ludovic Courtès 2012-08-30 23:03:11 +02:00
parent dcd60f4398
commit a436d2018e

View file

@ -631,14 +631,22 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
(string-append line "\n") (string-append line "\n")
'pre libc "/lib/" 1 "crt" 2 ".o" 'pre libc "/lib/" 1 "crt" 2 ".o"
'post))))) 'post)))))
(alist-replace 'install (alist-cons-after
(lambda* (#:key outputs #:allow-other-keys) 'configure 'post-configure
(zero? (lambda _
(system* "make" ;; Don't store configure flags, to avoid retaining references to
,(if stripped? ;; build-time dependencies---e.g., `--with-ppl=/nix/store/xxx'.
"install-strip" (substitute* "Makefile"
"install")))) (("^TOPLEVEL_CONFIGURE_ARGUMENTS=(.*)$" _ rest)
%standard-phases)))) "TOPLEVEL_CONFIGURE_ARGUMENTS=\n")))
(alist-replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(zero?
(system* "make"
,(if stripped?
"install-strip"
"install"))))
%standard-phases)))))
(properties `((gcc-libc . ,(assoc-ref inputs "libc")))) (properties `((gcc-libc . ,(assoc-ref inputs "libc"))))
(description "The GNU Compiler Collection") (description "The GNU Compiler Collection")