git.iko.soy/typeable/nixpkgs
on master help sign in
ghc{843,861}: clone linux-gnu targets so musl variants are available

Fixes build with "muslpi" (armv6l-unknown-linux-musleabihf). This was done via patch at first but it wouldn't apply to both at once, and it's probably best to stick to just having musl clones for now (instead of patching 8.6.1 targets into 8.4.3 and hoping that's okay).

commit894f313e3c654e62eb6d23fe0eb81760f10127ff authorWill Dietz <w@wdtz.org> dateTue 10 Jul 2018, 11:50 (8 years ago) parentc5f9cd4
2 files changed+16
pkgs/development/compilers/ghc/8.4.3.nix+8 pkgs/development/compilers/ghc/8.6.1.nix+8
pkgs/development/compilers/ghc/8.4.3.nix+8
@@ -124,6 +124,14 @@ stdenv.mkDerivation (rec {
124124 export NIX_LDFLAGS+=" -no_dtrace_dof"
125125 '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
126126 sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
127+ '' + stdenv.lib.optionalString targetPlatform.isMusl ''
128+ echo "patching llvm-targets for musl targets...."
129+ echo "Cloning these existing '*-linux-gnu*' targets:"
130+ grep linux-gnu llvm-targets | sed 's/^/ /'
131+ echo "go go gadget sed"
132+ sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
133+ echo "llvm-targets now contains these '*-linux-musl*' targets:"
134+ grep linux-musl llvm-targets | sed 's/^/ /'
127135 '';
128136
129137 # TODO(@Ericson2314): Always pass "--target" and always prefix.
pkgs/development/compilers/ghc/8.6.1.nix+8
@@ -116,6 +116,14 @@ stdenv.mkDerivation (rec {
116116 export NIX_LDFLAGS+=" -no_dtrace_dof"
117117 '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
118118 sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
119+ '' + stdenv.lib.optionalString targetPlatform.isMusl ''
120+ echo "patching llvm-targets for musl targets...."
121+ echo "Cloning these existing '*-linux-gnu*' targets:"
122+ grep linux-gnu llvm-targets | sed 's/^/ /'
123+ echo "go go gadget sed"
124+ sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
125+ echo "llvm-targets now contains these '*-linux-musl*' targets:"
126+ grep linux-musl llvm-targets | sed 's/^/ /'
119127 '';
120128
121129 # TODO(@Ericson2314): Always pass "--target" and always prefix.