summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc/6
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2016-08-30 21:56:31 +0300
committerTuomas Tynkkynen <tuomas@tuxera.com>2016-08-30 23:00:13 +0300
commit0cfb79afacdd07c40f7c8b81b17df4f55a7205f2 (patch)
treefb0f3d1023317eeaec187ad926cd5ee7d4fcfaac /pkgs/development/compilers/gcc/6
parent4223e83a68e358cda3d375428cf5edad597cdd9d (diff)
downloadnixlib-0cfb79afacdd07c40f7c8b81b17df4f55a7205f2.tar
nixlib-0cfb79afacdd07c40f7c8b81b17df4f55a7205f2.tar.gz
nixlib-0cfb79afacdd07c40f7c8b81b17df4f55a7205f2.tar.bz2
nixlib-0cfb79afacdd07c40f7c8b81b17df4f55a7205f2.tar.lz
nixlib-0cfb79afacdd07c40f7c8b81b17df4f55a7205f2.tar.xz
nixlib-0cfb79afacdd07c40f7c8b81b17df4f55a7205f2.tar.zst
nixlib-0cfb79afacdd07c40f7c8b81b17df4f55a7205f2.zip
gcc6: Unify some differences with gcc5
In particular, fixes build with the new shuffled outputs.
Diffstat (limited to 'pkgs/development/compilers/gcc/6')
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index 079b277a8e58..8064f42d498c 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -165,8 +165,8 @@ let version = "6.2.0";
           " --disable-libatomic " +  # libatomic requires libc
           " --disable-decimal-float" # libdecnumber requires libc
           else
-          (if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot"
-           else                " --with-headers=${libcCross.dev}/include") +
+          (if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
+           else                " --with-headers=${getDev libcCross}/include") +
           # Ensure that -print-prog-name is able to find the correct programs.
           (stdenv.lib.optionalString (crossMingw || crossDarwin) (
             " --with-as=${binutilsCross}/bin/${cross.config}-as" +
@@ -247,7 +247,7 @@ stdenv.mkDerivation ({
           ++ stdenv.lib.optional (libpthread != null) libpthread;
         extraCPPSpec =
           concatStrings (intersperse " "
-                          (map (x: "-I${x}/include") extraCPPDeps));
+                          (map (x: "-I${x.dev or x}/include") extraCPPDeps));
         extraLibSpec =
           if libpthreadCross != null
           then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
@@ -411,6 +411,7 @@ stdenv.mkDerivation ({
       ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
       --with-gmp=${gmp.crossDrv}
       --with-mpfr=${mpfr.crossDrv}
+      --with-mpc=${libmpc.crossDrv}
       --disable-libstdcxx-pch
       --without-included-gettext
       --with-system-zlib
@@ -456,7 +457,7 @@ stdenv.mkDerivation ({
   # Likewise, the LTO code doesn't find zlib.
 
   CPATH = concatStrings
-            (intersperse ":" (map (x: x + "/include")
+            (intersperse ":" (map (x: "${x.dev or x}/include")
                                   (optionals (zlib != null) [ zlib ]
                                    ++ optionals langJava [ boehmgc ]
                                    ++ optionals javaAwtGtk xlibs
@@ -479,7 +480,7 @@ stdenv.mkDerivation ({
 
   EXTRA_TARGET_CFLAGS =
     if cross != null && libcCross != null then [
-        "-idirafter ${libcCross.dev}/include"
+        "-idirafter ${getDev libcCross}/include"
       ]
       ++ optionals (! crossStageStatic) [
         "-B${libcCross.out}/lib"