From 449fbec9be1865fca59e973f05dd06d213820c5e Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 25 Jun 2018 15:47:22 -0500 Subject: [PATCH 1/3] ghcHEAD: add musl and cross fixes recently applied to 8.4.3 and 8.2.2 --- pkgs/development/compilers/ghc/head.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 8ccd72ef55a..ec9ff56c458 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -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 From 61e3bd20a04f9199744e9d0f38b3b7a5d442bdbd Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 25 Jun 2018 15:49:00 -0500 Subject: [PATCH 2/3] ghcHEAD: move hardeningDisable definition for cleaner diff against 8.4.3 NFCI (no functionality change intendend) --- pkgs/development/compilers/ghc/head.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index ec9ff56c458..a71b08cd39f 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -167,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 From 0e40e0cc7d4748c3a1c66e2b37f0d95b9ffc0772 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 25 Jun 2018 15:49:32 -0500 Subject: [PATCH 3/3] ghcHEAD: useLLVM needed for musl here as well --- pkgs/development/compilers/ghc/head.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index a71b08cd39f..43e6473fc24 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -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.