From c82d8533c7979c0d5e7a4b750dde6992a9328d94 Mon Sep 17 00:00:00 2001 From: Duncan Coutts Date: Thu, 4 Jun 2009 12:16:52 +0000 Subject: [PATCH] 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. --- compiler/main/GHC.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index f63b98f..52ff906 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) $ -- 1.7.10.4