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 6c1a1fcc4b)
This commit is contained in:
Sam James 2021-12-15 10:41:22 +02:00 committed by Povilas Kanapickas
parent 0b67785cd1
commit 9fe2991075
2 changed files with 5 additions and 1 deletions

View File

@ -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(

View File

@ -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