diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2012-05-24 19:02:27 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2012-05-24 19:02:27 +0000 |
commit | d9fdfffef9d6538cf2642777ad9027af5aeee8d9 (patch) | |
tree | cbffda60b2f9333f1292136cf56c10fcca0b5969 | |
parent | b71ca8c1386f25abe25c5a302aae892a9b3f5bfe (diff) |
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.
svn path=/nixpkgs/trunk/; revision=34225
-rw-r--r-- | pkgs/development/compilers/gcc/4.6/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index 3955455df4c1..b47a9457077c 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -130,7 +130,11 @@ let version = "4.6.3"; " --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 @@ stdenv.mkDerivation ({ 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"; |