]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Fix build error on sparc64 caused by using the gold linker
authorMathias Gibbens <gibmat@debian.org>
Tue, 10 Jan 2023 23:20:14 +0000 (23:20 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 16 Jan 2023 21:06:26 +0000 (16:06 -0500)
Signed-off-by: Mathias Gibbens <gibmat@debian.org>
meson.build

index 137854bda336ec91f3cd90f22559b37da092d08a..1194d67eba6b64764cc8c41ebf3d544645c0a1ae 100644 (file)
@@ -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