Author: ludo
Date: Tue Jan 24 14:56:41 2012
New Revision: 31803
URL: https://nixos.org/websvn/nix/?rev=31803&sc=1

Log:
GCC 4.5.1: Add `gcc45_debug'.

Modified:
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Tue Jan 24 04:50:55 
2012        (r31802)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Tue Jan 24 14:56:41 
2012        (r31803)
@@ -1786,6 +1786,30 @@
 
   gcc45 = gcc45_real;
 
+  gcc45_debug =
+    let gcc = lib.overrideDerivation gcc45.gcc (attrs:
+      # GCC 4.5's builder.sh contains hard-coded `-g0' flags, so patch it to
+      # remove them.
+      # TODO: Remove those `-g0' and this hack on the next stdenv update.
+      let
+        orig_builder = builtins.head (builtins.tail attrs.args);
+        new_builder = stdenv.mkDerivation {
+          name = "builder-gcc-4.5-debug";
+          phases = "buildPhase";
+          buildPhase =
+            '' cp -v "${orig_builder}" "$out"
+               sed -i "$out" -e 's/-g0//g ; s/--strip-debug//g'
+               chmod +x "$out"
+            '';
+        };
+      in {
+        args = [ "-e" "${new_builder}" ];
+        postHook = '' rm -rf "$out/src/build" '';
+      });
+   in
+     lowPrio (wrapGCC (misc.debugVersion gcc));
+
+
   gcc46 = gcc46_real;
 
   gcc45_realCross = lib.addMetaAttrs { platforms = []; }
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to