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.
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) $