summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/DynFlags.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 6c4ee86084..be347d9367 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -5510,7 +5510,9 @@ picCCOpts dflags = pieOpts ++ picOpts
-- http://ghc.haskell.org/trac/ghc/wiki/Commentary/PositionIndependentCode
| gopt Opt_PIC dflags || WayDyn `elem` ways dflags ->
["-fPIC", "-U__PIC__", "-D__PIC__"]
- | otherwise -> []
+ -- gcc may be configured to have PIC on by default, let's be
+ -- explicit here, see Trac #15847
+ | otherwise -> ["-fno-PIC"]
pieOpts
| gopt Opt_PICExecutable dflags = ["-pie"]