Fix build error on sparc64 caused by using the gold linker

Signed-off-by: Mathias Gibbens <gibmat@debian.org>
This commit is contained in:
Mathias Gibbens 2023-01-10 23:20:14 +00:00
parent e343a16122
commit 849d808779
No known key found for this signature in database
GPG Key ID: 29EEE2D6ECF442F9

View File

@ -225,11 +225,15 @@ possible_link_flags = [
'-Wl,--gc-sections',
'-Wl,-z,relro',
'-Wl,-z,now',
'-Wl,-fuse-ld=gold',
'-fstack-protector',
'-fstack-protector-strong',
]
# The gold linker fails with a bus error on sparc64
if build_machine.cpu_family() != 'sparc64'
possible_link_flags += '-Wl,-fuse-ld=gold'
endif
if sanitize == 'none'
possible_link_flags += '-Wl,--warn-common'
endif