From 5119fac40eff0d88c88024ac7c2aae89806d8f7e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 5 Aug 2010 16:27:46 +0000 Subject: [PATCH] * Don't store the GCC configure flags in the output (visible through `gcc -v'). It causes build-time only dependencies to be unnecessarily retained in the closure (e.g. PPL due to `--with-ppl=/nix/store/...'). * Replace $out/bin/c++ with a symlink to g++. svn path=/nixpkgs/branches/stdenv-updates/; revision=22966 --- pkgs/development/compilers/gcc-4.5/builder.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/gcc-4.5/builder.sh b/pkgs/development/compilers/gcc-4.5/builder.sh index fd9b4bd4534..5d66cc09532 100644 --- a/pkgs/development/compilers/gcc-4.5/builder.sh +++ b/pkgs/development/compilers/gcc-4.5/builder.sh @@ -143,6 +143,7 @@ if test -n "$targetConfig"; then dontStrip=1 fi + preConfigure() { if test -n "$newlibSrc"; then tar xvf "$newlibSrc" -C .. @@ -172,6 +173,12 @@ preConfigure() { } +postConfigure() { + # Don't store the configure flags in the resulting executables. + sed -e '/TOPLEVEL_CONFIGURE_ARGUMENTS=/d' -i Makefile +} + + postInstall() { # Remove precompiled headers for now. They are very big and # probably not very useful yet. @@ -200,7 +207,7 @@ postInstall() { fi done - for i in $out/bin/*-c++* $out/bin/*-g++*; do + for i in $out/bin/c++ $out/bin/*-c++* $out/bin/*-g++*; do if cmp -s $out/bin/g++ $i; then ln -sfn g++ $i fi