diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-06-16 10:13:38 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-06-20 22:03:59 -0400 |
commit | 9e4aebdd7b6d704b7fceb098e284be98e38a5392 (patch) | |
tree | c1c22c7192c370d7379900bc1035c8a798fb244d /pkgs | |
parent | 17621f63eb1c257e84490a825c1e9a212e0826af (diff) | |
download | nixlib-9e4aebdd7b6d704b7fceb098e284be98e38a5392.tar nixlib-9e4aebdd7b6d704b7fceb098e284be98e38a5392.tar.gz nixlib-9e4aebdd7b6d704b7fceb098e284be98e38a5392.tar.bz2 nixlib-9e4aebdd7b6d704b7fceb098e284be98e38a5392.tar.lz nixlib-9e4aebdd7b6d704b7fceb098e284be98e38a5392.tar.xz nixlib-9e4aebdd7b6d704b7fceb098e284be98e38a5392.tar.zst nixlib-9e4aebdd7b6d704b7fceb098e284be98e38a5392.zip |
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
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/compilers/ghc/8.2.2.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.4.3.nix | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix index 4e9eff06f26e..5f0818a017d1 100644 --- a/pkgs/development/compilers/ghc/8.2.2.nix +++ b/pkgs/development/compilers/ghc/8.2.2.nix @@ -58,6 +58,8 @@ let '' + stdenv.lib.optionalString enableRelocatedStaticLibs '' GhcLibHcOpts += -fPIC GhcRtsHcOpts += -fPIC + '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt '' + EXTRA_CC_OPTS += -std=gnu99 ''; # Splicer will pull out correct variations diff --git a/pkgs/development/compilers/ghc/8.4.3.nix b/pkgs/development/compilers/ghc/8.4.3.nix index c57058a63520..a582bf0859d9 100644 --- a/pkgs/development/compilers/ghc/8.4.3.nix +++ b/pkgs/development/compilers/ghc/8.4.3.nix @@ -121,6 +121,8 @@ stdenv.mkDerivation rec { export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}" '' + stdenv.lib.optionalString stdenv.isDarwin '' 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. |