diff options
author | John Ericson <git@JohnEricson.me> | 2019-12-25 14:36:13 -0500 |
---|---|---|
committer | John Ericson <git@JohnEricson.me> | 2019-12-25 14:36:13 -0500 |
commit | 9cbbe2b00f91b699a887b6844414c2612f82d85f (patch) | |
tree | f404d9ec8affdcf2bd876a7deb9cbf94851d21e9 /pkgs/development/haskell-modules/generic-builder.nix | |
parent | 49daa0aa64aea9143f9deb75bf277670dac90e1f (diff) | |
parent | d8dd3014120af31d4567de8247900a1088ec6e7b (diff) | |
download | nixlib-9cbbe2b00f91b699a887b6844414c2612f82d85f.tar nixlib-9cbbe2b00f91b699a887b6844414c2612f82d85f.tar.gz nixlib-9cbbe2b00f91b699a887b6844414c2612f82d85f.tar.bz2 nixlib-9cbbe2b00f91b699a887b6844414c2612f82d85f.tar.lz nixlib-9cbbe2b00f91b699a887b6844414c2612f82d85f.tar.xz nixlib-9cbbe2b00f91b699a887b6844414c2612f82d85f.tar.zst nixlib-9cbbe2b00f91b699a887b6844414c2612f82d85f.zip |
Merge branch 'ghcjs-cross-without-cc-common' into ghcjs-cross-without-cc
Diffstat (limited to 'pkgs/development/haskell-modules/generic-builder.nix')
-rw-r--r-- | pkgs/development/haskell-modules/generic-builder.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index e6edc3a2bc5e..2ae331386963 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -133,8 +133,11 @@ let crossCabalFlags = [ "--with-ghc=${ghcCommand}" "--with-ghc-pkg=${ghc.targetPrefix}ghc-pkg" + # Pass the "wrong" C compiler rather than none at all so packages that just + # use the C preproccessor still work, see + # https://github.com/haskell/cabal/issues/6466 for details. + "--with-gcc=${(if stdenv.hasCC then stdenv else buildPackages.stdenv).cc.targetPrefix}cc" ] ++ optionals stdenv.hasCC [ - "--with-gcc=${stdenv.cc.targetPrefix}cc" "--with-ld=${stdenv.cc.bintools.targetPrefix}ld" "--with-ar=${stdenv.cc.bintools.targetPrefix}ar" # use the one that comes with the cross compiler. |