[commit: ghc] master: Enable Opt_PIC for the dyn way regardless of OSes. (84df08d)
Ian Lynagh
igloo at earth.li
Sun Mar 17 03:20:20 CET 2013
Repository : http://darcs.haskell.org/ghc.git/
On branch : master
https://github.com/ghc/ghc/commit/84df08debf13562f8a1fc7cd59054aaa9c379294
>---------------------------------------------------------------
commit 84df08debf13562f8a1fc7cd59054aaa9c379294
Author: PHO <pho at cielonegro.org>
Date: Thu Mar 14 00:22:34 2013 +0900
Enable Opt_PIC for the dyn way regardless of OSes.
We were previously enabling Opt_PIC on certain OSes namely Windows,
Darwin and Linux, but it should always be enabled for the dyn way
because it makes no sense to try to generate non-PIC dynamic
libraries, which is usually impossible.
>---------------------------------------------------------------
compiler/main/DynFlags.hs | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 3705846..dbec98a 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -1055,20 +1055,8 @@ wayDesc WayNDP = "Nested data parallelism"
wayGeneralFlags :: Platform -> Way -> [GeneralFlag]
wayGeneralFlags _ WayThreaded = []
-wayGeneralFlags _ WayDebug = []
-wayGeneralFlags platform WayDyn =
- case platformOS platform of
- -- On Windows, code that is to be linked into a dynamic
- -- library must be compiled with -fPIC. Labels not in
- -- the current package are assumed to be in a DLL
- -- different from the current one.
- OSMinGW32 -> [Opt_PIC]
- OSDarwin -> [Opt_PIC]
- OSLinux -> [Opt_PIC] -- This needs to be here for GHCi to work:
- -- GHCi links objects into a .so before
- -- loading the .so using the system linker.
- -- Only PIC objects can be linked into a .so.
- _ -> []
+wayGeneralFlags _ WayDebug = []
+wayGeneralFlags _ WayDyn = [Opt_PIC]
wayGeneralFlags _ WayProf = [Opt_SccProfilingOn]
wayGeneralFlags _ WayEventLog = []
wayGeneralFlags _ WayPar = [Opt_Parallel]
More information about the ghc-commits
mailing list