diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-08-22 11:41:47 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-08-22 18:01:05 -0400 |
commit | 3625728a0e3a9b56c2b85ae7ea8bcabdd83ece6a (patch) | |
tree | c8d0ff7e921436d011e70018c5cea974dcf67f23 /compiler/codeGen/StgCmmCon.hs | |
parent | dbaa9a237b6d9771c0e9bde0e50fd2134c2f4dd0 (diff) | |
download | haskell-3625728a0e3a9b56c2b85ae7ea8bcabdd83ece6a.tar.gz |
Add support for producing position-independent executables
Previously due to #12759 we disabled PIE support entirely. However, this
breaks the user's ability to produce PIEs. Add an explicit flag, -fPIE,
allowing the user to build PIEs.
Test Plan: Validate
Reviewers: rwbarton, austin, simonmar
Subscribers: trommler, simonmar, trofi, jrtc27, thomie
GHC Trac Issues: #12759, #13702
Differential Revision: https://phabricator.haskell.org/D3589
Diffstat (limited to 'compiler/codeGen/StgCmmCon.hs')
-rw-r--r-- | compiler/codeGen/StgCmmCon.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/codeGen/StgCmmCon.hs b/compiler/codeGen/StgCmmCon.hs index a76b8cc0a0..6438b8cd3c 100644 --- a/compiler/codeGen/StgCmmCon.hs +++ b/compiler/codeGen/StgCmmCon.hs @@ -191,7 +191,7 @@ because they don't support cross package data references well. buildDynCon' dflags platform binder _ _cc con [arg] | maybeIntLikeCon con - , platformOS platform /= OSMinGW32 || not (gopt Opt_PIC dflags) + , platformOS platform /= OSMinGW32 || not (positionIndependent dflags) , NonVoid (StgLitArg (MachInt val)) <- arg , val <= fromIntegral (mAX_INTLIKE dflags) -- Comparisons at type Integer! , val >= fromIntegral (mIN_INTLIKE dflags) -- ...ditto... @@ -205,7 +205,7 @@ buildDynCon' dflags platform binder _ _cc con [arg] buildDynCon' dflags platform binder _ _cc con [arg] | maybeCharLikeCon con - , platformOS platform /= OSMinGW32 || not (gopt Opt_PIC dflags) + , platformOS platform /= OSMinGW32 || not (positionIndependent dflags) , NonVoid (StgLitArg (MachChar val)) <- arg , let val_int = ord val :: Int , val_int <= mAX_CHARLIKE dflags |