Author: ludo
Date: Wed Jun 15 08:42:46 2011
New Revision: 27465
URL: https://svn.nixos.org/websvn/nix/?rev=27465&sc=1
Log:
GCC 4.6: Pass `-O2' and optionally `-g' to the bootstrap compiler.
Modified:
nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh
Modified: nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh
==============================================================================
--- nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh Wed Jun 15
08:22:15 2011 (r27464)
+++ nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh Wed Jun 15
08:42:46 2011 (r27465)
@@ -50,6 +50,17 @@
extraFlags="-I$NIX_FIXINC_DUMMY $extraFlags"
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
+ # BOOT_CFLAGS defaults to `-g -O2'; since we override it below,
+ # make sure to explictly add them so that files compiled with the
+ # bootstrap compiler are optimized and (optionally) contain
+ # debugging information (info "(gccinstall) Building").
+ if test -n "$dontStrip"; then
+ extraFlags="-O2 -g $extraFlags"
+ else
+ # Don't pass `-g' at all; this saves space while building.
+ extraFlags="-O2 $extraFlags"
+ fi
+
EXTRA_FLAGS="$extraFlags"
for i in $extraLDFlags; do
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,$i"
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits