diff options
-rw-r--r-- | compiler/GHC/Driver/Pipeline/Execute.hs | 11 | ||||
-rw-r--r-- | libraries/base/base.cabal | 8 |
2 files changed, 8 insertions, 11 deletions
diff --git a/compiler/GHC/Driver/Pipeline/Execute.hs b/compiler/GHC/Driver/Pipeline/Execute.hs index da214cdc20..b6fc7a37d0 100644 --- a/compiler/GHC/Driver/Pipeline/Execute.hs +++ b/compiler/GHC/Driver/Pipeline/Execute.hs @@ -343,7 +343,6 @@ runCcPhase cc_phase pipe_env hsc_env input_fn = do let dflags = hsc_dflags hsc_env let logger = hsc_logger hsc_env let unit_env = hsc_unit_env hsc_env - let home_unit = hsc_home_unit hsc_env let tmpfs = hsc_tmpfs hsc_env let platform = ue_platform unit_env let hcc = cc_phase `eqPhase` HCc @@ -433,16 +432,6 @@ runCcPhase cc_phase pipe_env hsc_env input_fn = do ++ map GHC.SysTools.Option ( pic_c_flags - -- Stub files generated for foreign exports references the runIO_closure - -- and runNonIO_closure symbols, which are defined in the base package. - -- These symbols are imported into the stub.c file via RtsAPI.h, and the - -- way we do the import depends on whether we're currently compiling - -- the base package or not. - ++ (if platformOS platform == OSMinGW32 && - isHomeUnitId home_unit baseUnitId - then [ "-DCOMPILING_BASE_PACKAGE" ] - else []) - -- GCC 4.6+ doesn't like -Wimplicit when compiling C++. ++ (if (cc_phase /= Ccxx && cc_phase /= Cobjcxx) then ["-Wimplicit"] diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal index e0cd8f4197..57787ebbb6 100644 --- a/libraries/base/base.cabal +++ b/libraries/base/base.cabal @@ -446,6 +446,14 @@ Library if os(freebsd) cc-options: -DLIBICONV_PLUG + -- Stub files generated for foreign exports references the runIO_closure + -- and runNonIO_closure symbols, which are defined in the base package. + -- These symbols are imported into the stub.c file via RtsAPI.h, and the + -- way we do the import depends on whether we're currently compiling + -- the base package or not. + if os(windows) + cc-options: -DCOMPILING_BASE_PACKAGE + -- We need to set the unit id to base (without a version number) -- as it's magic. ghc-options: -this-unit-id base |