Skip to content

Commit 689d5bc

Browse files
committed
Better fix?
1 parent 821ad3b commit 689d5bc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

compiler/ghc/default.nix

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ let
347347
# disableLargeAddress space conditional on iOS = true.
348348
+ lib.optionalString (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64)
349349
" '*.*.ghc.c.opts += -optc-mcpu=apple-a7 -optc-march=armv8-a+norcpc'"
350+
+ lib.optionalString (targetPlatform.isAndroid && targetPlatform.isAarch32)
351+
" '*.*.ghc.c.opts += -optc-march=armv7-a -optc-mfloat-abi=softfp -optc-mfpu=vfpv3-d16'"
352+
+ lib.optionalString (targetPlatform.isAndroid && targetPlatform.isAarch64)
353+
" '*.*.ghc.c.opts += -optc-march=armv8-a'"
350354
# For GHC versions in the 9.x range that don't support the +native_bignum flavour transformer yet
351355
+ lib.optionalString ((enableNativeBignum && !hadrianHasNativeBignumFlavour))
352356
" --bignum=native"
@@ -805,11 +809,6 @@ stdenv.mkDerivation (rec {
805809
if [[ -f rts/win32/ThrIOManager.c ]]; then
806810
substituteInPlace rts/win32/ThrIOManager.c --replace rts\\OSThreads.h rts/OSThreads.h
807811
fi
808-
''
809-
+ lib.optionalString (targetPlatform.isAndroid && targetPlatform.isAarch32) ''
810-
export NIX_CFLAGS_COMPILE_${
811-
lib.replaceStrings ["-" "."] ["_" "_"] stdenv.targetPlatform.config
812-
}+=" -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16"
813812
'';
814813
# Same hack as 'preBuild'
815814
preInstall = lib.optionalString stdenv.buildPlatform.isDarwin ''

0 commit comments

Comments
 (0)