Author: viric
Date: Thu May 24 19:02:27 2012
New Revision: 34225
URL: https://nixos.org/websvn/nix/?rev=34225&sc=1

Log:
Fixing the mingw cross gcc. I set it not to build shared libraries, because its 
specs for
shared libraries are wrong.
It should run "-lstdc++ -lsupc++" if libstdc++-6.dll is available, and instead 
it runs
"-lstdc++" and therefore lack symbols.

I think simply few people use shared gcc libs on mingw.

Modified:
   nixpkgs/trunk/pkgs/development/compilers/gcc/4.6/default.nix

Modified: nixpkgs/trunk/pkgs/development/compilers/gcc/4.6/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/compilers/gcc/4.6/default.nix        Thu May 
24 18:59:13 2012        (r34224)
+++ nixpkgs/trunk/pkgs/development/compilers/gcc/4.6/default.nix        Thu May 
24 19:02:27 2012        (r34225)
@@ -130,7 +130,11 @@
           " --enable-version-specific-runtime-libs" +
           " --disable-libssp" +
           " --disable-nls" +
-          " --with-dwarf2"
+          " --with-dwarf2" +
+          # I think noone uses shared gcc libs in mingw, so we better do the 
same.
+          # In any case, g++ linking is broken by default with shared libs,
+          # unless adding "-lsupc++" to any linking command. I don't know why.
+          " --disable-shared"
           else
           " --enable-threads=posix" +
           " --enable-nls" +
@@ -426,7 +430,8 @@
   installTargets = "install-gcc install-target-libgcc";
 }
 
-// optionalAttrs (!stripped) { dontStrip = true; NIX_STRIP_DEBUG = 0; }
+# Strip kills static libs of other archs (hence cross != null)
+// optionalAttrs (!stripped || cross != null) { dontStrip = true; 
NIX_STRIP_DEBUG = 0; }
 
 // optionalAttrs langVhdl rec {
   name = "ghdl-0.29";
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to