From: Mathias Gibbens Date: Tue, 10 Jan 2023 23:20:14 +0000 (+0000) Subject: Fix build error on sparc64 caused by using the gold linker X-Git-Tag: v6.0.0~70^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4255%2Fhead;p=thirdparty%2Flxc.git Fix build error on sparc64 caused by using the gold linker Signed-off-by: Mathias Gibbens --- diff --git a/meson.build b/meson.build index 63bce420c..6d216693c 100644 --- a/meson.build +++ b/meson.build @@ -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