ghc8.4: add android triple
The triple is needed for armv7a-android-prebuilt to work (partly) with GHC. - also set EXTRA_CC_OPTS for ghc8.2
This commit is contained in:
parent
17621f63eb
commit
9e4aebdd7b
@ -58,6 +58,8 @@ let
|
|||||||
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
||||||
GhcLibHcOpts += -fPIC
|
GhcLibHcOpts += -fPIC
|
||||||
GhcRtsHcOpts += -fPIC
|
GhcRtsHcOpts += -fPIC
|
||||||
|
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||||
|
EXTRA_CC_OPTS += -std=gnu99
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Splicer will pull out correct variations
|
# Splicer will pull out correct variations
|
||||||
|
@ -121,6 +121,8 @@ stdenv.mkDerivation rec {
|
|||||||
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
||||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
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
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user