Skip to content
Snippets Groups Projects
Commit 0cfee536 authored by kgardas's avatar kgardas Committed by Ben Gamari
Browse files

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
parent 9724555f
No related branches found
No related tags found
No related merge requests found
......@@ -3218,6 +3218,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)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment