Merge pull request #42585 from dtzWill/fix/ghcHEAD-musl-cross

ghcHEAD: minor fixes for musl, cross
This commit is contained in:
Will Dietz 2018-06-25 17:16:26 -05:00 committed by GitHub
commit b2168851cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@
, libffi, libiconv ? null, ncurses
, useLLVM ? !targetPlatform.isx86
, useLLVM ? !targetPlatform.isx86 || targetPlatform.isMusl
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
@ -50,7 +50,8 @@ let
'' + stdenv.lib.optionalString enableIntegerSimple ''
INTEGER_LIBRARY = integer-simple
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
Stage1Only = YES
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
@ -166,10 +167,10 @@ stdenv.mkDerivation rec {
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
hardeningDisable = [ "format" ];
checkTarget = "test";
hardeningDisable = [ "format" ];
postInstall = ''
for bin in "$out"/lib/${name}/bin/*; do
isELF "$bin" || continue