diff options
author | Karel Gardas <karel.gardas@centrum.cz> | 2015-07-07 18:35:09 +0200 |
---|---|---|
committer | Karel Gardas <karel.gardas@centrum.cz> | 2015-07-07 20:50:03 +0200 |
commit | d03bcfaa255279c7f0c0d931b3202d45faa9b8e0 (patch) | |
tree | 41c90ea4efdfdf7eb546f29e92e352fae7f6a0a2 | |
parent | 6d69c3a264a1cfbbc7ecda0e704598afa45848c2 (diff) | |
download | haskell-d03bcfaa255279c7f0c0d931b3202d45faa9b8e0.tar.gz |
always use -fPIC on OpenBSD/AMD64 platform
Summary:
This patch switches -fPIC on for every invocation of GHC
on OpenBSD/AMD64 platform. The reason is OpenBSD's support
for PIE (PIC for executables) hence -fPIC is also needed
for GHC compiled code.
Fixes #10597
Reviewers: austin
Subscribers: thomie, bgamari
Differential Revision: https://phabricator.haskell.org/D1027
-rw-r--r-- | compiler/main/DynFlags.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 23a5fedda5..78614a439e 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -3228,6 +3228,12 @@ default_PIC :: Platform -> [GeneralFlag] default_PIC platform = case (platformOS platform, platformArch platform) of (OSDarwin, ArchX86_64) -> [Opt_PIC] + (OSOpenBSD, ArchX86_64) -> [Opt_PIC] -- Due to PIE support in + -- OpenBSD since 5.3 release + -- (1 May 2013) we need to + -- always generate PIC. See + -- #10597 for more + -- information. _ -> [] impliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)] |