summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-15 10:41:22 +0200
committerPovilas Kanapickas <povilas@radix.lt>2021-12-15 10:41:22 +0200
commit9fe2991075aca3321d59d03f3e45faca6cb718b8 (patch)
tree0ea3d0b16f9bc58656e35af935ce92a479cfe3d6
parent0b67785cd13e65d37416f75ab938bdc49cf4732f (diff)
hw/xfree86: fix sbus build for SPARC
Initially reported downstream in Gentoo. Manifests with errors like: ``` gnu/bin/ld: hw/xfree86/common/libxorg_common.a(xf86fbBus.c.o): in function `xf86ClaimFbSlot': xf86fbBus.c:(.text+0x20): undefined reference to `sbusSlotClaimed' /usr/lib/gcc/sparc-unknown-linux-gnu/11.2.0/../../../../sparc-unknown-linux-gnu/bin/ld: xf86fbBus.c:(.text+0x2c): undefined reference to `sbusSlotClaimed' ``` While we use the headers in meson.build, we don't reference xf86sbusBus.c which defines the missing symbols like sbusSlotClaimed. Bug: https://bugs.gentoo.org/828513 Signed-off-by: Sam James <sam@gentoo.org> (cherry picked from commit 6c1a1fcc4bff90546ebc954f428c6df97005ea50)
-rw-r--r--hw/xfree86/common/meson.build4
-rw-r--r--hw/xfree86/os-support/meson.build2
2 files changed, 5 insertions, 1 deletions
diff --git a/hw/xfree86/common/meson.build b/hw/xfree86/common/meson.build
index 8f68556d8..7dc19c6f9 100644
--- a/hw/xfree86/common/meson.build
+++ b/hw/xfree86/common/meson.build
@@ -71,6 +71,10 @@ endif
if get_option('pciaccess')
srcs_xorg_common += ['xf86pciBus.c', 'xf86VGAarbiter.c']
+
+ if host_machine.cpu() == 'sparc' or host_machine.cpu() == 'sparc64'
+ srcs_xorg_common += 'xf86sbusBus.c'
+ endif
endif
srcs_xorg_common += custom_target(
diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build
index 1f490a668..b6069ee85 100644
--- a/hw/xfree86/os-support/meson.build
+++ b/hw/xfree86/os-support/meson.build
@@ -19,7 +19,7 @@ if get_option('pciaccess')
if host_machine.system() != 'linux'
srcs_xorg_os_support += 'bus/bsd_pci.c'
endif
- if host_machine.cpu() == 'sparc'
+ if host_machine.cpu() == 'sparc' or host_machine.cpu() == 'sparc64'
srcs_xorg_os_support += 'bus/Sbus.c'
install_data('bus/xf86Sbus.h', install_dir: xorgsdkdir)
endif