Author: shlevy
Date: Fri Apr  1 03:17:55 2011
New Revision: 26650
URL: https://svn.nixos.org/websvn/nix/?rev=26650&sc=1

Log:
Merged in changes from stdenv-updates on gcc-4.5 into gcc-4.6

Modified:
   nixpkgs/trunk/pkgs/development/compilers/gcc-4.4/update-gcc.sh
   nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh
   nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/default.nix

Modified: nixpkgs/trunk/pkgs/development/compilers/gcc-4.4/update-gcc.sh
==============================================================================
--- nixpkgs/trunk/pkgs/development/compilers/gcc-4.4/update-gcc.sh      Fri Apr 
 1 00:25:39 2011        (r26649)
+++ nixpkgs/trunk/pkgs/development/compilers/gcc-4.4/update-gcc.sh      Fri Apr 
 1 03:17:55 2011        (r26650)
@@ -36,11 +36,13 @@
     file="gcc-${component}-${version}.tar.bz2"
     url="${dir}/${file}"
 
-    path_and_hash="$(nix-prefetch-url "$url" 2>&1 | grep -E '^(hash|path) is')"
-    path="$(echo $path_and_hash | sed -e's/^.*path is \([^ ]\+\).*$/\1/g')"
-    hash="$(echo $path_and_hash | sed -e's/^.*hash is \([^ ]\+\).*$/\1/g')"
+    rm -f "${file}"
 
-    rm -f "${url}.sig"
+    wget "$url"
+    hash="$(nix-hash --flat --type sha256 "$file")"
+    path="$(nix-store --add-fixed sha256 "$file")"
+
+    rm -f "${file}" "${file}.sig"
     wget "${url}.sig"
     gpg --verify "${file}.sig" "${path}" || gpg2 --verify "${file}.sig" 
"${path}"
     rm "${file}.sig"

Modified: nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh
==============================================================================
--- nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh Fri Apr  1 
00:25:39 2011        (r26649)
+++ nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/builder.sh Fri Apr  1 
03:17:55 2011        (r26650)
@@ -46,8 +46,8 @@
         export NIX_FIXINC_DUMMY=/usr/include
     fi
 
-    extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY $extraFlags"
-    extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir 
$extraLDFlags"
+    extraFlags="-I$NIX_FIXINC_DUMMY $extraFlags"
+    extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
 
     EXTRA_FLAGS="$extraFlags"
     for i in $extraLDFlags; do
@@ -63,7 +63,7 @@
         unset LIBRARY_PATH
         unset CPATH
         if test -z "$crossStageStatic"; then
-            EXTRA_TARGET_CFLAGS="-g0 -O2 -B${libcCross}/lib -idirafter 
${libcCross}/include"
+            EXTRA_TARGET_CFLAGS="-B${libcCross}/lib -idirafter 
${libcCross}/include"
             EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
         fi
     else
@@ -89,8 +89,8 @@
             # The path to the Glibc binaries such as `crti.o'.
             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"
+            extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
+            extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
 
             EXTRA_TARGET_CFLAGS="$extraFlags"
             for i in $extraLDFlags; do

Modified: nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/default.nix        Fri Apr 
 1 00:25:39 2011        (r26649)
+++ nixpkgs/trunk/pkgs/development/compilers/gcc-4.6/default.nix        Fri Apr 
 1 03:17:55 2011        (r26650)
@@ -26,6 +26,7 @@
 , crossStageStatic ? true
 , gnat ? null
 , libpthread ? null, libpthreadCross ? null  # required for GNU/Hurd
+, stripped ? true
 }:
 
 assert langTreelang -> bison != null && flex != null;
@@ -355,7 +356,7 @@
 
   EXTRA_TARGET_CFLAGS =
     if cross != null && libcCross != null
-    then "-g0 -O2 -idirafter ${libcCross}/include"
+    then "-idirafter ${libcCross}/include"
     else null;
 
   EXTRA_TARGET_LDFLAGS =
@@ -373,7 +374,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++,
@@ -402,6 +404,10 @@
   installTargets = "install-gcc install-target-libgcc";
 }
 
+# GCC 4.6.0 DOES support the `install-strip' target, but we'll let`stdenv' do
+# the stripping by default to match stdenv-updates, for now
+// optionalAttrs (!stripped) { dontStrip = true; NIX_STRIP_DEBUG = false; }
+
 // optionalAttrs langVhdl rec {
   name = "ghdl-0.29";
 
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to