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: lxc-5.0.2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17c85aac639bb10c0cb7f526cabc2f34af4d69e4;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 137854bda..1194d67eb 100644 --- a/meson.build +++ b/meson.build @@ -224,11 +224,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