Repository : ssh://g...@git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c0f89a1b536d9cd3640803138d5f794982049cce/ghc
>--------------------------------------------------------------- commit c0f89a1b536d9cd3640803138d5f794982049cce Author: Simon Marlow <marlo...@gmail.com> Date: Thu Sep 26 17:10:26 2013 +0100 Add back a comment that got lost >--------------------------------------------------------------- c0f89a1b536d9cd3640803138d5f794982049cce compiler/main/DynFlags.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 071c16c..918b1ae 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -1123,6 +1123,13 @@ wayGeneralFlags _ (WayCustom {}) = [] wayGeneralFlags _ WayThreaded = [] wayGeneralFlags _ WayDebug = [] wayGeneralFlags _ WayDyn = [Opt_PIC] + -- We could get away without adding -fPIC when compiling the + -- modules of a program that is to be linked with -dynamic; the + -- program itself does not need to be position-independet, only + -- the libraries need to be. HOWEVER, GHCi links objects into a + -- .so before loading the .so using the system linker. Since only + -- PIC objects can be linked into a .so, we have to compile even + -- modules of the main program with -fPIC when using -dynamic. wayGeneralFlags _ WayProf = [Opt_SccProfilingOn] wayGeneralFlags _ WayEventLog = [] wayGeneralFlags _ WayPar = [Opt_Parallel] _______________________________________________ ghc-commits mailing list ghc-commits@haskell.org http://www.haskell.org/mailman/listinfo/ghc-commits