import ParserCoreUtils ( getCoreModuleName )
import SrcLoc
import FastString
-import MonadUtils
+-- import MonadUtils
-import Data.Either
+-- import Data.Either
import Exception
import Data.IORef ( readIORef )
-import GHC.Exts ( Int(..) )
+-- import GHC.Exts ( Int(..) )
import System.Directory
import System.FilePath
import System.IO
-> return ([], ms_hs_date summary)
-- We're in --make mode: finish the compilation pipeline.
_other
- -> do runPipeline StopLn hsc_env' (output_fn,Nothing)
+ -> do _ <- runPipeline StopLn hsc_env' (output_fn,Nothing)
(Just basename)
Persistent
(Just location)
let (stub_c,_,stub_o) = mkStubPaths (hsc_dflags hsc_env)
(moduleName mod) location
- runPipeline StopLn hsc_env (stub_c,Nothing) Nothing
+ _ <- runPipeline StopLn hsc_env (stub_c,Nothing) Nothing
(SpecificFile stub_o) Nothing{-no ModLocation-}
return stub_o
-- Also useful for plain .c files, just in case GHC saw a
-- -x c option.
[ SysTools.Option "-x", if cc_phase `eqPhase` Ccpp
- then SysTools.Option "c++" else SysTools.Option "c"] ++
+ then SysTools.Option "c++"
+ else SysTools.Option "c"] ++
[ SysTools.FileOption "" input_fn
, SysTools.Option "-o"
, SysTools.FileOption "" output_fn
-- This is a temporary hack.
++ ["-mcpu=v9"]
#endif
-#if defined(darwin_TARGET_OS) && defined(i386_TARGET_ARCH)
- -- By default, gcc on OS X will generate SSE
- -- instructions, which need things 16-byte aligned,
- -- but we don't 16-byte align things. Thus drop
- -- back to generic i686 compatibility. Trac #2983.
- ++ ["-march=i686"]
-#endif
++ (if hcc && mangle
then md_regd_c_flags
else [])
output_fn <- get_output_fn dflags StopLn maybe_loc
let base_o = dropExtension output_fn
- split_odir = base_o ++ "_split"
osuf = objectSuf dflags
+ split_odir = base_o ++ "_" ++ osuf ++ "_split"
createDirectoryHierarchy split_odir
pvm_executable_base = "=" ++ input_fn
pvm_executable = pvm_root ++ "/bin/" ++ pvm_arch ++ "/" ++ pvm_executable_base
-- nuke old binary; maybe use configur'ed names for cp and rm?
- tryIO (removeFile pvm_executable)
+ _ <- tryIO (removeFile pvm_executable)
-- move the newly created binary into PVM land
copy dflags "copying PVM executable" input_fn pvm_executable
-- generate a wrapper script for running a parallel prg under PVM
, SysTools.Option "-o"
, SysTools.FileOption "" output_fn
, SysTools.Option "-shared"
- , SysTools.FileOption "-Wl,--out-implib=" (output_fn ++ ".a")
+ ] ++
+ [ SysTools.FileOption "-Wl,--out-implib=" (output_fn ++ ".a")
+ | dopt Opt_SharedImplib dflags
]
++ map (SysTools.FileOption "") o_files
++ map SysTools.Option (
++ map SysTools.Option (
md_c_flags
++ o_files
- ++ [ "-undefined", "dynamic_lookup", "-single_module", "-Wl,-macosx_version_min","-Wl,10.3", "-install_name " ++ (pwd </> output_fn) ]
+ ++ [ "-undefined", "dynamic_lookup", "-single_module", "-Wl,-macosx_version_min","-Wl,10.5", "-install_name " ++ (pwd </> output_fn) ]
++ extra_ld_inputs
++ lib_path_opts
++ extra_ld_opts