import Packages
import HeaderInfo
import DriverPhases
-import SysTools ( newTempName, addFilesToClean, getSysMan, copy )
+import SysTools ( newTempName, addFilesToClean, copy )
import qualified SysTools
import HscMain
import Finder
++ 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 [])
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"
-- we don't need the generality of a phase (MoveBinary is always
-- done after linking and makes only sense in a parallel setup) -- HWL
-runPhase_MoveBinary input_fn
+runPhase_MoveBinary dflags input_fn
= do
- sysMan <- getSysMan
+ let sysMan = pgm_sysman dflags
pvm_root <- getEnv "PVM_ROOT"
pvm_arch <- getEnv "PVM_ARCH"
let
-- parallel only: move binary to another dir -- HWL
when (WayPar `elem` ways)
- (do success <- runPhase_MoveBinary output_fn
+ (do success <- runPhase_MoveBinary dflags output_fn
if success then return ()
else throwDyn (InstallationError ("cannot move binary to PVM dir")))