about summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2016-11-17 01:05:21 -0500
committerShea Levy <shea@shealevy.com>2016-11-17 01:05:21 -0500
commitda547f79617617b3008e6453f58b784993340417 (patch)
treeeedc8c49e01b3ef37abc1f8becba49a2f51a235a /pkgs/development/compilers/ghc
parentd0d3330866eb74befa24d1cfbead4a22f28fae87 (diff)
downloadnixlib-da547f79617617b3008e6453f58b784993340417.tar
nixlib-da547f79617617b3008e6453f58b784993340417.tar.gz
nixlib-da547f79617617b3008e6453f58b784993340417.tar.bz2
nixlib-da547f79617617b3008e6453f58b784993340417.tar.lz
nixlib-da547f79617617b3008e6453f58b784993340417.tar.xz
nixlib-da547f79617617b3008e6453f58b784993340417.tar.zst
nixlib-da547f79617617b3008e6453f58b784993340417.zip
ghcHEAD: Add back response files patch
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r--pkgs/development/compilers/ghc/ghc-HEAD-dont-pass-linker-flags-via-response-files.patch20
-rw-r--r--pkgs/development/compilers/ghc/head.nix4
2 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/ghc-HEAD-dont-pass-linker-flags-via-response-files.patch b/pkgs/development/compilers/ghc/ghc-HEAD-dont-pass-linker-flags-via-response-files.patch
new file mode 100644
index 000000000000..ebbb9326a829
--- /dev/null
+++ b/pkgs/development/compilers/ghc/ghc-HEAD-dont-pass-linker-flags-via-response-files.patch
@@ -0,0 +1,20 @@
+--- ghc/compiler/main/SysTools.hs	2016-11-09 14:03:05.304528147 -0500
++++ ghc2/compiler/main/SysTools.hs	2016-11-09 14:00:19.712934686 -0500
+@@ -421,7 +421,7 @@
+       args1 = map Option (getOpts dflags opt_c)
+       args2 = args0 ++ args1 ++ args
+   mb_env <- getGccEnv args2
+-  runSomethingResponseFile dflags cc_filter "C Compiler" p args2 mb_env
++  runSomethingFiltered dflags cc_filter "C Compiler" p args2 mb_env
+  where
+   -- discard some harmless warnings from gcc that we can't turn off
+   cc_filter = unlines . doFilter . lines
+@@ -911,7 +911,7 @@
+       args1     = map Option (getOpts dflags opt_l)
+       args2     = args0 ++ linkargs ++ args1 ++ args
+   mb_env <- getGccEnv args2
+-  runSomethingResponseFile dflags ld_filter "Linker" p args2 mb_env
++  runSomethingFiltered dflags ld_filter "Linker" p args2 mb_env
+   where
+     ld_filter = case (platformOS (targetPlatform dflags)) of
+                   OSSolaris2 -> sunos_ld_filter
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index aec6faed585e..d95791353ae3 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -27,6 +27,10 @@ in stdenv.mkDerivation (rec {
     sha256 = "1ryggmz961qd0fl50rkjjvi6g9azwla2vx9310a9nzjaj5x6ib4y";
   };
 
+  # This shouldn't be necessary since 1ad1edbb32ce01ba8b47d8e8dad357b0edd6a4dc, but
+  # see http://hydra.cryp.to/build/2061608/nixlog/1/raw
+  patches = [ ./ghc-HEAD-dont-pass-linker-flags-via-response-files.patch ];
+
   postPatch = ''
     echo ${version} >VERSION
     echo ${rev} >GIT_COMMIT_ID