From f866b46b5640933902e7dba41362debee561f476 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 25 Sep 2025 16:37:36 -0700 Subject: [PATCH] xfree86: fix meson build on 64-bit Solaris/SPARC systems For cpu_family(), meson returns "sparc" for 32-bit sparc, and "sparc64" for 64-bit sparc, regardless of the OS in use. For cpu(), meson returns values like "sun4v" on Solaris/SPARC, and doesn't promise stability of the values, or portability across OS'es, unlike cpu_family(). Signed-off-by: Alan Coopersmith (cherry picked from commit 908f0a488d2fc35f0c4fa69e64492de3fb3cf89c) Part-of: --- hw/xfree86/common/meson.build | 2 +- hw/xfree86/os-support/meson.build | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/common/meson.build b/hw/xfree86/common/meson.build index 7dc19c6f9..d9979a2c6 100644 --- a/hw/xfree86/common/meson.build +++ b/hw/xfree86/common/meson.build @@ -72,7 +72,7 @@ endif if get_option('pciaccess') srcs_xorg_common += ['xf86pciBus.c', 'xf86VGAarbiter.c'] - if host_machine.cpu() == 'sparc' or host_machine.cpu() == 'sparc64' + if host_machine.cpu_family() in ['sparc', 'sparc64'] srcs_xorg_common += 'xf86sbusBus.c' endif endif diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build index b6069ee85..236f5de66 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' or host_machine.cpu() == 'sparc64' + if host_machine.cpu_family() in ['sparc', 'sparc64'] srcs_xorg_os_support += 'bus/Sbus.c' install_data('bus/xf86Sbus.h', install_dir: xorgsdkdir) endif @@ -81,7 +81,7 @@ elif host_machine.system() == 'sunos' srcs_xorg_os_support += 'shared/agp_noop.c' endif - if host_machine.cpu_family() == 'sparc' + if host_machine.cpu_family() in ['sparc', 'sparc64'] srcs_xorg_os_support += 'solaris/solaris-sparcv8plus.S' elif host_machine.cpu_family() == 'x86_64' srcs_xorg_os_support += 'solaris/solaris-amd64.S'