summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-08-21 20:08:42 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2018-08-21 20:09:08 +0100
commit1cc9061fce4270739677d475190fd6e890e8b1f9 (patch)
treec019ee9e07142f85a04631d917f878b847e367fc /compiler/codeGen
parent43b08cfbac5ce7ad6fc245651329094896de06e0 (diff)
downloadhaskell-1cc9061fce4270739677d475190fd6e890e8b1f9.tar.gz
driver: unconditionally disable relaxation when linking partially
In https://github.com/gentoo-haskell/gentoo-haskell/issues/704 user explicitly uses -Wl,--relax for most built binaries. Most of the time this works fine except for capi haskell code similar to the following: ```haskell {-# LANGUAGE CApiFFI #-} module Z where import Foreign.C foreign import capi "unistd.h close" c_close :: CInt -> IO CInt ``` In this case compilation fails as: ``` $ inplace/bin/ghc-stage2 -c Z.hs -optl-Wl,--relax -fforce-recomp ld: --relax and -r may not be used together ``` GHC's driver already disables relaxation on sparc as there relaxation is already a default mode. This change disables relaxation on partial linking for all platforms where linker is binutils linker. Reported-by: wmyrda Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/704 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: pass -optl-Wl,--relax in test above Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4888
Diffstat (limited to 'compiler/codeGen')
0 files changed, 0 insertions, 0 deletions