Author: ludo
Date: Wed Mar 23 14:51:17 2011
New Revision: 26467
URL: https://svn.nixos.org/websvn/nix/?rev=26467&sc=1

Log:
GCC 4.5: Use `install-strip' instead of `-Wl,--strip-debug'; add `gcc45_debug'.

Modified:
   nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.5/builder.sh
   
nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.5/default.nix
   nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix

Modified: 
nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.5/builder.sh
==============================================================================
--- 
nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.5/builder.sh   
    Wed Mar 23 13:03:40 2011        (r26466)
+++ 
nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.5/builder.sh   
    Wed Mar 23 14:51:17 2011        (r26467)
@@ -47,7 +47,7 @@
     fi
 
     extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY $extraFlags"
-    extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir 
$extraLDFlags"
+    extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
 
     EXTRA_FLAGS="$extraFlags"
     for i in $extraLDFlags; do
@@ -90,7 +90,7 @@
             glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
 
             extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
-            extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir 
$extraLDFlags"
+            extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
 
             EXTRA_TARGET_CFLAGS="$extraFlags"
             for i in $extraLDFlags; do

Modified: 
nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.5/default.nix
==============================================================================
--- 
nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.5/default.nix  
    Wed Mar 23 13:03:40 2011        (r26466)
+++ 
nixpkgs/branches/stdenv-updates/pkgs/development/compilers/gcc-4.5/default.nix  
    Wed Mar 23 14:51:17 2011        (r26467)
@@ -26,6 +26,7 @@
 , crossStageStatic ? true
 , gnat ? null
 , libpthread ? null, libpthreadCross ? null  # required for GNU/Hurd
+, stripped ? true
 }:
 
 assert langTreelang -> bison != null && flex != null;
@@ -259,6 +260,11 @@
 
   targetConfig = if (cross != null) then cross.config else null;
 
+  installTargets =
+    if stripped
+    then "install-strip"
+    else "install";
+
   crossAttrs = {
     AR = "${stdenv.cross.config}-ar";
     LD = "${stdenv.cross.config}-ld";
@@ -364,7 +370,8 @@
   meta = {
     homepage = http://gcc.gnu.org/;
     license = "GPLv3+";  # runtime support libraries are typically LGPLv3+
-    description = "GNU Compiler Collection, version ${version}";
+    description = "GNU Compiler Collection, version ${version}"
+      + (if stripped then "" else " (with debugging info)");
 
     longDescription = ''
       The GNU Compiler Collection includes compiler front ends for C, C++,
@@ -392,6 +399,8 @@
   installTargets = "install-gcc install-target-libgcc";
 }
 
+// optionalAttrs (!stripped) { dontStrip = true; NIX_STRIP_DEBUG = false; }
+
 // optionalAttrs langVhdl rec {
   name = "ghdl-0.29";
 

Modified: nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix     Wed Mar 
23 13:03:40 2011        (r26466)
+++ nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix     Wed Mar 
23 14:51:17 2011        (r26467)
@@ -1670,6 +1670,20 @@
     profiledCompiler = if stdenv.system == "armv5tel-linux" then false else 
true;
   }));
 
+  # A non-stripped version of GCC.
+  gcc45_debug = lowPrio (wrapGCC (callPackage ../development/compilers/gcc-4.5 
{
+    stripped = false;
+
+    inherit noSysDirs;
+    cross = null;
+    libcCross = null;
+    binutilsCross = null;
+
+    # bootstrapping a profiled compiler does not work in the sheevaplug:
+    # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
+    profiledCompiler = if stdenv.system == "armv5tel-linux" then false else 
true;
+  }));
+
   gccApple =
     wrapGCC ( (if stdenv.system == "i686-darwin" then import 
../development/compilers/gcc-apple else import 
../development/compilers/gcc-apple64) {
       inherit fetchurl stdenv noSysDirs;
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to