git.iko.soy/typeable/nixpkgs
on master help sign in
ghc{843,861}: keep '-musleabi' in targets like w/'-gnueabi'
commit773ae700b75174bb11146e5f588a22c4c54b73af authorWill Dietz <w@wdtz.org> dateTue 10 Jul 2018, 13:05 (8 years ago) parent894f313
2 files changed+20−4
pkgs/development/compilers/ghc/8.4.3.nix+10−2 pkgs/development/compilers/ghc/8.6.1.nix+10−2
pkgs/development/compilers/ghc/8.4.3.nix+10−2
@@ -125,13 +125,21 @@ stdenv.mkDerivation (rec {
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
127127 '' + stdenv.lib.optionalString targetPlatform.isMusl ''
128− echo "patching llvm-targets for musl targets...."
128+ echo "patching llvm-targets for musl targets..."
129129 echo "Cloning these existing '*-linux-gnu*' targets:"
130130 grep linux-gnu llvm-targets | sed 's/^/ /'
131− echo "go go gadget sed"
131+ echo "(go go gadget sed)"
132132 sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
133133 echo "llvm-targets now contains these '*-linux-musl*' targets:"
134134 grep linux-musl llvm-targets | sed 's/^/ /'
135+
136+ echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
137+ # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
138+ for x in configure aclocal.m4; do
139+ substituteInPlace $x \
140+ --replace '*-android*|*-gnueabi*)' \
141+ '*-android*|*-gnueabi*|*-musleabi*)'
142+ done
135143 '';
136144
137145 # TODO(@Ericson2314): Always pass "--target" and always prefix.
pkgs/development/compilers/ghc/8.6.1.nix+10−2
@@ -117,13 +117,21 @@ stdenv.mkDerivation (rec {
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
119119 '' + stdenv.lib.optionalString targetPlatform.isMusl ''
120− echo "patching llvm-targets for musl targets...."
120+ echo "patching llvm-targets for musl targets..."
121121 echo "Cloning these existing '*-linux-gnu*' targets:"
122122 grep linux-gnu llvm-targets | sed 's/^/ /'
123− echo "go go gadget sed"
123+ echo "(go go gadget sed)"
124124 sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
125125 echo "llvm-targets now contains these '*-linux-musl*' targets:"
126126 grep linux-musl llvm-targets | sed 's/^/ /'
127+
128+ echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
129+ # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
130+ for x in configure aclocal.m4; do
131+ substituteInPlace $x \
132+ --replace '*-android*|*-gnueabi*)' \
133+ '*-android*|*-gnueabi*|*-musleabi*)'
134+ done
127135 '';
128136
129137 # TODO(@Ericson2314): Always pass "--target" and always prefix.