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 ...@@ -2171,11 +2171,12 @@ joinObjectFiles dflags o_files output_fn = do
++ (if osInfo == OSFreeBSD ++ (if osInfo == OSFreeBSD
then [SysTools.Option "-L/usr/lib"] then [SysTools.Option "-L/usr/lib"]
else []) else [])
-- gcc on sparc sets -Wl,--relax implicitly (another -- gcc on sparc sets -Wl,--relax implicitly, but
-- use case is when use passes -optl-Wl,--relax) -- -r and --relax are incompatible for ld, so
-- but -r and --relax are incompatible for ld, so
-- disable --relax explicitly. -- disable --relax explicitly.
++ (if ldIsGnuLd ++ (if platformArch (targetPlatform dflags)
`elem` [ArchSPARC, ArchSPARC64]
&& ldIsGnuLd
then [SysTools.Option "-Wl,-no-relax"] then [SysTools.Option "-Wl,-no-relax"]
else []) else [])
++ map SysTools.Option ld_build_id ++ 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