diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-08-22 09:19:42 -0400 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-08-22 09:19:42 -0400 |
commit | 44ba66527ae207ce2dd64eb2bce14656d474f6d1 (patch) | |
tree | f364b53e13f62539dfd26e4a6213dc6ccb403a17 /compiler/main/DriverPipeline.hs | |
parent | ab55b4ddb717dab13d8b4900024ccbc8e9280c5c (diff) | |
download | haskell-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.hs | 9 |
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 |