diff options
author | Ian Lynagh <igloo@earth.li> | 2012-10-23 13:44:30 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-10-23 13:44:30 +0100 |
commit | bba762137354a2113876a0fba6c705b585e3399a (patch) | |
tree | 08b82c22e3b2279562281545b326eafef8455d99 /compiler/cmm/CmmPipeline.hs | |
parent | 5f37e0c71ff4af8539c5aebc739b006b4f0c6ebf (diff) | |
download | haskell-bba762137354a2113876a0fba6c705b585e3399a.tar.gz |
Fix -fPIC on OS X x86
Diffstat (limited to 'compiler/cmm/CmmPipeline.hs')
-rw-r--r-- | compiler/cmm/CmmPipeline.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/cmm/CmmPipeline.hs b/compiler/cmm/CmmPipeline.hs index 0cd956ab44..c523b137e0 100644 --- a/compiler/cmm/CmmPipeline.hs +++ b/compiler/cmm/CmmPipeline.hs @@ -25,6 +25,7 @@ import ErrUtils import HscTypes import Control.Monad import Outputable +import Platform ----------------------------------------------------------------------------- -- | Top level driver for C-- pipeline @@ -156,6 +157,7 @@ cpsTop hsc_env proc = return (cafEnv, [g]) where dflags = hsc_dflags hsc_env + platform = targetPlatform dflags dump = dumpGraph dflags dump' = dumpWith dflags @@ -177,6 +179,10 @@ cpsTop hsc_env proc = -- the entry point. splitting_proc_points = hscTarget dflags /= HscAsm || not (tablesNextToCode dflags) + || usingDarwinX86Pic + usingDarwinX86Pic = platformArch platform == ArchX86 + && platformOS platform == OSDarwin + && gopt Opt_PIC dflags runUniqSM :: UniqSM a -> IO a runUniqSM m = do |