diff options
author | Will Dietz <w@wdtz.org> | 2018-07-10 11:50:44 -0500 |
---|---|---|
committer | Will Dietz <w@wdtz.org> | 2018-07-10 14:57:41 -0500 |
commit | 894f313e3c654e62eb6d23fe0eb81760f10127ff (patch) | |
tree | b7da0ea8b15ac2b3a1171d0b5c10a9a634c7b0af /pkgs/development/compilers | |
parent | c5f9cd4cde81bcef2c8882d359d9d30313bebeb3 (diff) | |
download | nixlib-894f313e3c654e62eb6d23fe0eb81760f10127ff.tar nixlib-894f313e3c654e62eb6d23fe0eb81760f10127ff.tar.gz nixlib-894f313e3c654e62eb6d23fe0eb81760f10127ff.tar.bz2 nixlib-894f313e3c654e62eb6d23fe0eb81760f10127ff.tar.lz nixlib-894f313e3c654e62eb6d23fe0eb81760f10127ff.tar.xz nixlib-894f313e3c654e62eb6d23fe0eb81760f10127ff.tar.zst nixlib-894f313e3c654e62eb6d23fe0eb81760f10127ff.zip |
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).
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/ghc/8.4.3.nix | 8 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.6.1.nix | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/8.4.3.nix b/pkgs/development/compilers/ghc/8.4.3.nix index 0f5a43d57eda..853926a430a8 100644 --- a/pkgs/development/compilers/ghc/8.4.3.nix +++ b/pkgs/development/compilers/ghc/8.4.3.nix @@ -124,6 +124,14 @@ stdenv.mkDerivation (rec { export NIX_LDFLAGS+=" -no_dtrace_dof" '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt '' 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 + '' + stdenv.lib.optionalString targetPlatform.isMusl '' + echo "patching llvm-targets for musl targets...." + echo "Cloning these existing '*-linux-gnu*' targets:" + grep linux-gnu llvm-targets | sed 's/^/ /' + echo "go go gadget sed" + sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets + echo "llvm-targets now contains these '*-linux-musl*' targets:" + grep linux-musl llvm-targets | sed 's/^/ /' ''; # TODO(@Ericson2314): Always pass "--target" and always prefix. diff --git a/pkgs/development/compilers/ghc/8.6.1.nix b/pkgs/development/compilers/ghc/8.6.1.nix index 89dcec348433..1fd53f2544a1 100644 --- a/pkgs/development/compilers/ghc/8.6.1.nix +++ b/pkgs/development/compilers/ghc/8.6.1.nix @@ -116,6 +116,14 @@ stdenv.mkDerivation (rec { export NIX_LDFLAGS+=" -no_dtrace_dof" '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt '' 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 + '' + stdenv.lib.optionalString targetPlatform.isMusl '' + echo "patching llvm-targets for musl targets...." + echo "Cloning these existing '*-linux-gnu*' targets:" + grep linux-gnu llvm-targets | sed 's/^/ /' + echo "go go gadget sed" + sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets + echo "llvm-targets now contains these '*-linux-musl*' targets:" + grep linux-musl llvm-targets | sed 's/^/ /' ''; # TODO(@Ericson2314): Always pass "--target" and always prefix. |