X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverPipeline.hs;h=dae697d913a51600c3117a094c8f05aad2c29591;hb=f04dead93a15af1cb818172f207b8a81d2c81298;hp=d120f18d53bebe6903a86c2163f301ec07aac186;hpb=9d0c8f842e35dde3d570580cf62a32779f66a6de;p=ghc-hetmet.git diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index d120f18..dae697d 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -48,12 +48,12 @@ import Maybes ( expectJust ) 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 @@ -988,7 +988,8 @@ runPhase cc_phase _stop hsc_env _basename _suff input_fn get_output_fn maybe_loc -- 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 @@ -1005,13 +1006,6 @@ runPhase cc_phase _stop hsc_env _basename _suff input_fn get_output_fn maybe_loc -- 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 []) @@ -1141,8 +1135,8 @@ runPhase SplitAs _stop hsc_env _basename _suff _input_fn get_output_fn maybe_loc 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 @@ -1590,7 +1584,9 @@ linkDynLib dflags o_files dep_packages = do , 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 ( @@ -1644,7 +1640,7 @@ linkDynLib dflags o_files dep_packages = do ++ 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