diff options
| author | Karel Gardas <karel.gardas@centrum.cz> | 2012-04-25 09:04:50 +0200 |
|---|---|---|
| committer | Simon Marlow <marlowsd@gmail.com> | 2012-04-27 11:13:06 +0100 |
| commit | 3144f85661da176e3d80f28d652b42245becde09 (patch) | |
| tree | f10ab746a7cf379e134960ca7daaa2c14643a46e /compiler/main/DriverPipeline.hs | |
| parent | 18c2a2f71e38fad5e677b8f448f6135e5a691868 (diff) | |
| download | haskell-3144f85661da176e3d80f28d652b42245becde09.tar.gz | |
add support for ARM hard-float ABI (fixes #5914)
This patch enhances Platform's ArchARM to include ARM ABI value. It also
tweaks configure machinery to detect hard-float ABI and to set it wherever
needed. Finally when hard-float ABI is in use, pass appropriate compiler
option to the LLVM's llc. Fixes #5914.
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
| -rw-r--r-- | compiler/main/DriverPipeline.hs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 488df37a79..335df4fab6 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1372,7 +1372,8 @@ runPhase LlvmLlc input_fn dflags SysTools.Option "-o", SysTools.FileOption "" output_fn] ++ map SysTools.Option lc_opts ++ [SysTools.Option tbaa] - ++ map SysTools.Option fpOpts) + ++ map SysTools.Option fpOpts + ++ map SysTools.Option abiOpts) return (next_phase, output_fn) where @@ -1384,12 +1385,19 @@ runPhase LlvmLlc input_fn dflags -- while compiling GHC source code. It's probably due to fact that it -- does not enable VFP by default. Let's do this manually here fpOpts = case platformArch (targetPlatform dflags) of - ArchARM ARMv7 ext -> if (elem VFPv3 ext) + ArchARM ARMv7 ext _ -> if (elem VFPv3 ext) then ["-mattr=+v7,+vfp3"] else if (elem VFPv3D16 ext) then ["-mattr=+v7,+vfp3,+d16"] else [] _ -> [] + -- 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 _ _ -> [] + _ -> [] ----------------------------------------------------------------------------- -- LlvmMangle phase @@ -1538,8 +1546,8 @@ mkNoteObjsToLinkIntoBinary dflags dep_packages = do elfSectionNote :: String elfSectionNote = case platformArch (targetPlatform dflags) of - ArchARM _ _ -> "%note" - _ -> "@note" + ArchARM _ _ _ -> "%note" + _ -> "@note" -- The "link info" is a string representing the parameters of the -- link. We save this information in the binary, and the next time we |
