diff options
author | PHO <pho@cielonegro.org> | 2013-03-14 00:22:34 +0900 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-03-17 01:30:43 +0000 |
commit | 84df08debf13562f8a1fc7cd59054aaa9c379294 (patch) | |
tree | 5513ac4bfa2ff87ea4624931b7d9c8d21bf635ee | |
parent | ae3dcaf5884028e4e29a45f724d2d3f5c92a1caf (diff) | |
download | haskell-84df08debf13562f8a1fc7cd59054aaa9c379294.tar.gz |
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.
-rw-r--r-- | compiler/main/DynFlags.hs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 3705846a21..dbec98a21b 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] |