summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2009-06-04 12:16:52 +0000
committerDuncan Coutts <duncan@well-typed.com>2009-06-04 12:16:52 +0000
commitc82d8533c7979c0d5e7a4b750dde6992a9328d94 (patch)
tree1037130a5b9f1c8fc33e8dbe3b9ee0bcb17dffbb
parent8e0adc0215ff3e6e4c972f9ed6ba9df2f5d2c4f9 (diff)
downloadhaskell-c82d8533c7979c0d5e7a4b750dde6992a9328d94.tar.gz
Fix the flag used to force linking when we are making a shared library
This is a correction to the patch: * When linking a shared library with --make, always do the link step which used the wrong flag in making the decision. It used -dynamic whereas the correct flag is -shared.
-rw-r--r--compiler/main/GHC.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index f63b98f124..52ff90692c 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -888,7 +888,7 @@ load2 how_much mod_graph = do
let
main_mod = mainModIs dflags
a_root_is_Main = any ((==main_mod).ms_mod) mod_graph
- do_linking = a_root_is_Main || no_hs_main || not StaticFlags.opt_Static
+ do_linking = a_root_is_Main || no_hs_main || ghcLink dflags == LinkDynLib
when (ghcLink dflags == LinkBinary
&& isJust ofile && not do_linking) $