PKGBUILDs/extra/ghc/add-vfp-flags.patch
2013-03-22 21:43:08 +01:00

41 lines
1.8 KiB
Diff

diff --git a/aclocal.m4 b/aclocal.m4
index 127f528..a2db986 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -344,12 +344,12 @@
[AC_DEFINE(arm_HOST_ARCH_PRE_ARMv7, 1, [ARM pre v7])
changequote(, )dnl
ARM_ISA=ARMv6
- ARM_ISA_EXT="[]"
+ ARM_ISA_EXT="[VFPv2]"
changequote([, ])dnl
],
[changequote(, )dnl
ARM_ISA=ARMv7
- ARM_ISA_EXT="[VFPv3,NEON]"
+ ARM_ISA_EXT="[VFPv3D16]"
changequote([, ])dnl
])
])
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index b128c1f..c71546c 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1453,14 +1453,17 @@ runPhase LlvmLlc input_fn dflags
else if (elem VFPv3D16 ext)
then ["-mattr=+v7,+vfp3,+d16"]
else []
+ ArchARM ARMv6 ext _ -> if (elem VFPv2 ext)
+ then ["-mattr=+v6,+vfp2"]
+ else ["-mattr=+v6"]
_ -> []
-- On Ubuntu/Debian with ARM hard float ABI, LLVM's llc still
-- compiles into soft-float ABI. We need to explicitly set abi
-- to hard
abiOpts = case platformArch (targetPlatform dflags) of
- ArchARM ARMv7 _ HARD -> ["-float-abi=hard"]
- ArchARM ARMv7 _ _ -> []
- _ -> []
+ ArchARM _ _ HARD -> ["-float-abi=hard"]
+ ArchARM _ _ _ -> []
+ _ -> []