Commit 5bd3072a authored by Ian Lynagh's avatar Ian Lynagh

On sparc, pass -mcpu=v9 when assembling with object splitting enabled

Fixes trac #2872.
parent f4af918f
......@@ -1143,6 +1143,16 @@ runPhase SplitAs _stop hsc_env _basename _suff _input_fn get_output_fn maybe_loc
let assemble_file n
= SysTools.runAs dflags
(map SysTools.Option as_opts ++
#ifdef sparc_TARGET_ARCH
-- We only support SparcV9 and better because V8 lacks an atomic CAS
-- instruction so we have to make sure that the assembler accepts the
-- instruction set. Note that the user can still override this
-- (e.g., -mcpu=ultrasparc). GCC picks the "best" -mcpu flag
-- regardless of the ordering.
--
-- This is a temporary hack.
[ SysTools.Option "-mcpu=v9" ] ++
#endif
[ SysTools.Option "-c"
, SysTools.Option "-o"
, SysTools.FileOption "" (split_obj n)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment