about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-09-20 15:20:00 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-09-21 15:49:18 -0400
commit88a0e55ce01867e3f8ba177bf128ed1f63376d92 (patch)
tree09a7473d1333033861bc137bfd82076349cbfeb3 /pkgs
parent54282b9610e80b1ed93136319e24cb79c5bbcc33 (diff)
downloadnixlib-88a0e55ce01867e3f8ba177bf128ed1f63376d92.tar
nixlib-88a0e55ce01867e3f8ba177bf128ed1f63376d92.tar.gz
nixlib-88a0e55ce01867e3f8ba177bf128ed1f63376d92.tar.bz2
nixlib-88a0e55ce01867e3f8ba177bf128ed1f63376d92.tar.lz
nixlib-88a0e55ce01867e3f8ba177bf128ed1f63376d92.tar.xz
nixlib-88a0e55ce01867e3f8ba177bf128ed1f63376d92.tar.zst
nixlib-88a0e55ce01867e3f8ba177bf128ed1f63376d92.zip
wrapCC: Alias now does the right thing for cross
Unfortunately this makes previously-barely-working overrides have
infinite recursion, so I had to reinstantiate gcc for gccCrossStageFinal
instead.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/top-level/all-packages.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 655d464e66c6..73d65d4ad085 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5377,6 +5377,7 @@ with pkgs;
   gambit = callPackage ../development/compilers/gambit { };
   gerbil = callPackage ../development/compilers/gerbil { };
 
+  gccFun = callPackage ../development/compilers/gcc/6;
   gcc = gcc6;
   gcc-unwrapped = gcc.cc;
 
@@ -5432,12 +5433,18 @@ with pkgs;
       else null;
     in wrapCCWith {
       name = "gcc-cross-wrapper";
-      cc = gcc.cc.override {
+      cc = gccFun {
+        # copy-pasted
+        inherit noSysDirs;
+        # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
+        profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
+        isl = if !stdenv.isDarwin then isl_0_14 else null;
+
+        # just for stage static
         crossStageStatic = true;
         langCC = false;
         libcCross = libcCross1;
         enableShared = false;
-        # Why is this needed?
       };
       libc = libcCross1;
   };
@@ -6220,7 +6227,7 @@ with pkgs;
 
   wrapCC = cc: wrapCCWith {
     inherit cc;
-    inherit (stdenv.cc) libc;
+    libc = if targetPlatform != hostPlatform then libcCross else stdenv.cc.libc;
   };
   # legacy version, used for gnat bootstrapping
   wrapGCC-old = baseGCC: callPackage ../build-support/gcc-wrapper-old {