summaryrefslogtreecommitdiff
path: root/compiler/main/DriverPipeline.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2018-08-22 09:19:42 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2018-08-22 09:19:42 -0400
commit44ba66527ae207ce2dd64eb2bce14656d474f6d1 (patch)
treef364b53e13f62539dfd26e4a6213dc6ccb403a17 /compiler/main/DriverPipeline.hs
parentab55b4ddb717dab13d8b4900024ccbc8e9280c5c (diff)
downloadhaskell-44ba66527ae207ce2dd64eb2bce14656d474f6d1.tar.gz
Revert "driver: unconditionally disable relaxation when linking partially"
This reverts commit 1cc9061fce4270739677d475190fd6e890e8b1f9. This appears to break a clean build with certain versions of `ld.gold`. See https://phabricator.haskell.org/rGHC1cc9061fce42#132967.
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r--compiler/main/DriverPipeline.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index eff542a80b..a9e486c94a 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -2171,11 +2171,12 @@ joinObjectFiles dflags o_files output_fn = do
++ (if osInfo == OSFreeBSD
then [SysTools.Option "-L/usr/lib"]
else [])
- -- gcc on sparc sets -Wl,--relax implicitly (another
- -- use case is when use passes -optl-Wl,--relax)
- -- but -r and --relax are incompatible for ld, so
+ -- gcc on sparc sets -Wl,--relax implicitly, but
+ -- -r and --relax are incompatible for ld, so
-- disable --relax explicitly.
- ++ (if ldIsGnuLd
+ ++ (if platformArch (targetPlatform dflags)
+ `elem` [ArchSPARC, ArchSPARC64]
+ && ldIsGnuLd
then [SysTools.Option "-Wl,-no-relax"]
else [])
++ map SysTools.Option ld_build_id