diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-03-03 11:30:24 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-06 02:34:08 -0500 |
commit | 9e0c0c3a7b6cad8c08e5de7e2a27cf2cb2d2368f (patch) | |
tree | 665c0869e1b6bd2f5329372dfdb92507e8c870bb | |
parent | dd23bd740f7fc64475e026fbbabec8674401a8b6 (diff) | |
download | haskell-9e0c0c3a7b6cad8c08e5de7e2a27cf2cb2d2368f.tar.gz |
hadrian: Pass -fno-use-rpaths to GHC while linking
This mirrors the make build system and ensures that we don't end up with
references to the build directory in the final executable.
Fixes #19485.
-rw-r--r-- | hadrian/src/Settings/Builders/Ghc.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs index 3880a99562..29ca57a4f2 100644 --- a/hadrian/src/Settings/Builders/Ghc.hs +++ b/hadrian/src/Settings/Builders/Ghc.hs @@ -145,6 +145,10 @@ ghcLinkArgs = builder (Ghc LinkHs) ? do , isProgram pkg ? arg ("-optl-Wl,-rpath," ++ bindistRpath) -- The darwin linker doesn't support/require the -zorigin option , not osxHost ? arg "-optl-Wl,-zorigin" + -- We set RPATH directly (relative to $ORIGIN). There's + -- no reason for GHC to inject further RPATH entries. + -- See #19485. + , arg "-fno-use-rpaths" ] ] , arg "-no-auto-link-packages" |