Commit 44ba6652 authored by Ryan Scott's avatar Ryan Scott

Revert "driver: unconditionally disable relaxation when linking partially"

This reverts commit 1cc9061f.

This appears to break a clean build with certain versions of
`ld.gold`. See
https://phabricator.haskell.org/rGHC1cc9061fce42#132967.
parent ab55b4dd
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment