haskell.compiler.ghc963Binary: work around ar -L
issue on Darwin
The bindist defaults to enabling `ar -L` if it detects a compatible `ar`. Suppress this behavior by overriding the setting. This allows the bindist to be used to bootstrap GHC 9.8.
This commit is contained in:
parent
202ad9365a
commit
0fcde6e343
@ -282,6 +282,12 @@ stdenv.mkDerivation rec {
|
||||
isScript "$i" || continue
|
||||
sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i"
|
||||
done
|
||||
'' + lib.optionalString stdenv.targetPlatform.isDarwin ''
|
||||
# Work around building with binary GHC on Darwin due to GHC’s use of `ar -L` when it
|
||||
# detects `llvm-ar` even though the resulting archives are not supported by ld64.
|
||||
# https://gitlab.haskell.org/ghc/ghc/-/issues/23188
|
||||
# https://github.com/haskell/cabal/issues/8882
|
||||
sed -i -e 's/,("ar supports -L", "YES")/,("ar supports -L", "NO")/' "$out/lib/ghc-${version}/lib/settings"
|
||||
'';
|
||||
|
||||
# Apparently necessary for the ghc Alpine (musl) bindist:
|
||||
|
Loading…
x
Reference in New Issue
Block a user