X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverPipeline.hs;h=58cc49e4254a15384c1871a56f08e11adf2615d9;hb=1777f480284b6700827951b7b8d80f179eedc84e;hp=e8f64e81a699cb14d71480b68e9fdadbb019ad2e;hpb=f943473cc7db20fbeceb66bd67b2f7872da6941b;p=ghc-hetmet.git diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index e8f64e8..58cc49e 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -859,6 +859,15 @@ runPhase cc_phase stop dflags basename suff input_fn get_output_fn maybe_loc ++ map SysTools.Option ( md_c_flags ++ pic_c_flags +#ifdef sparc_TARGET_ARCH + -- We only support SparcV9 and better because V8 lacks an atomic CAS + -- instruction. Note that the user can still override this + -- (e.g., -mcpu=ultrasparc) as GCC picks the "best" -mcpu flag + -- regardless of the ordering. + -- + -- This is a temporary hack. + ++ ["-mcpu=v9"] +#endif ++ (if hcc && mangle then md_regd_c_flags else []) @@ -946,6 +955,16 @@ runPhase As stop dflags _basename _suff input_fn get_output_fn maybe_loc SysTools.runAs dflags (map SysTools.Option as_opts ++ [ SysTools.Option ("-I" ++ p) | p <- cmdline_include_paths ] +#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.FileOption "" input_fn , SysTools.Option "-o"