diff --git a/Cabal/Distribution/Simple/Program/GHC.hs b/Cabal/Distribution/Simple/Program/GHC.hs index 340c04eea1e..902d8330a12 100644 --- a/Cabal/Distribution/Simple/Program/GHC.hs +++ b/Cabal/Distribution/Simple/Program/GHC.hs @@ -246,7 +246,7 @@ renderGhcOptions version@(Version ver _) opts = -- Dynamic linking , [ "-shared" | flagBool ghcOptShared ] - , [ "-dynamic" | flagBool ghcOptDynamic ] + , [ if flagBool ghcOptDynamic then "-dynamic" else "-static" ] , [ "-fPIC" | flagBool ghcOptFPic ] , concat [ ["-dylib-install-name", libname] | libname <- flag ghcOptDylibName ]