X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverPipeline.hs;h=f748f7cd843bb61f79ad626c6e74195b1bbc7304;hb=78b2f856c526e4ae8f8e935b4333fcaf67e7ca84;hp=c0aed96e7051f3530152af9c7f505e05196da10d;hpb=c9959e41ee1d72aa0ca28d51580f1ad3c06f0e8b;p=ghc-hetmet.git diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index c0aed96..f748f7c 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -826,6 +826,7 @@ runPhase (Hsc src_flavour) stop hsc_env basename suff input_fn get_output_fn _ma src_timestamp <- liftIO $ getModificationTime (basename <.> suff) let force_recomp = dopt Opt_ForceRecomp dflags + hsc_lang = hscMaybeAdjustTarget dflags stop src_flavour (hscTarget dflags) source_unchanged <- if force_recomp || not (isStopLn stop) -- Set source_unchanged to False unconditionally if @@ -842,7 +843,6 @@ runPhase (Hsc src_flavour) stop hsc_env basename suff input_fn get_output_fn _ma else return False -- get the DynFlags - let hsc_lang = hscMaybeAdjustTarget dflags stop src_flavour (hscTarget dflags) let next_phase = hscNextPhase dflags src_flavour hsc_lang output_fn <- liftIO $ get_output_fn dflags next_phase (Just location4) @@ -1305,12 +1305,14 @@ mkExtraCObj dflags xs oFile <- newTempName dflags "o" writeFile cFile $ unlines xs let rtsDetails = getPackageDetails (pkgState dflags) rtsPackageId + (md_c_flags, _) = machdepCCOpts dflags SysTools.runCc dflags ([Option "-c", FileOption "" cFile, Option "-o", FileOption "" oFile] ++ - map (FileOption "-I") (includeDirs rtsDetails)) + map (FileOption "-I") (includeDirs rtsDetails) ++ + map Option md_c_flags) return oFile -- generates a Perl skript starting a parallel prg under PVM @@ -1687,10 +1689,6 @@ linkDynLib dflags o_files dep_packages = do -- Build the dynamic library as a single "module", i.e. no dynamic binding -- nonsense when referring to symbols from within the library. The NCG -- assumes that this option is specified (on i386, at least). - -- -Wl,-macosx_version_min -Wl,10.3 - -- Tell the linker its safe to assume that the library will run on 10.3 or - -- later, so that it will not complain about the use of the option - -- -undefined dynamic_lookup above. -- -install_name -- Mac OS/X stores the path where a dynamic library is (to be) installed -- in the library itself. It's called the "install name" of the library. @@ -1717,7 +1715,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.5", + ++ [ "-undefined", "dynamic_lookup", "-single_module", "-Wl,-read_only_relocs,suppress", "-install_name", instName ] ++ extra_ld_inputs ++ lib_path_opts