From 71c7824e806b1f216a2a90e12d3d3b7de9d1a7a9 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 27 Aug 2026 09:59:44 -0700 Subject: [PATCH] meson: check cpu_family() instead of cpu() meson documents the values returned by cpu_family() as stable, but not those returned by cpu(): https://mesonbuild.com/Reference-tables.html#cpu-families https://mesonbuild.com/Reference-manual_builtin_host_machine.html We already use cpu_family() in most instances, but had missed a few. Signed-off-by: Alan Coopersmith Part-of: --- hw/xfree86/int10/meson.build | 2 +- meson.build | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/xfree86/int10/meson.build b/hw/xfree86/int10/meson.build index a309e9b536..ac47baa652 100644 --- a/hw/xfree86/int10/meson.build +++ b/hw/xfree86/int10/meson.build @@ -10,7 +10,7 @@ srcs_xorg_int10 = [ int10_c_args = [xorg_c_args] int10_link = [] -if host_machine.cpu() == 'i386' or host_machine.cpu() == 'x86_64' +if host_machine.cpu_family() == 'i386' or host_machine.cpu_family() == 'x86_64' int10_c_args += '-D_PC' endif diff --git a/meson.build b/meson.build index ba308f594f..19c439a6fa 100644 --- a/meson.build +++ b/meson.build @@ -324,10 +324,10 @@ message('IPv6 support: ' + (build_ipv6 ? 'YES' : 'NO')) int10 = get_option('int10') if int10 == 'auto' int10 = 'x86emu' - if host_machine.cpu() == 'ppc' and host_machine.system() == 'freebsd' + if host_machine.cpu_family() == 'ppc' and host_machine.system() == 'freebsd' int10 = 'stub' endif - if host_machine.cpu() == 'arm' + if host_machine.cpu_family() == 'arm' int10 = 'stub' endif endif @@ -614,9 +614,9 @@ endif build_acpi = false if (get_option('linux_acpi') == true and host_machine.system() == 'linux') - if (host_machine.cpu() == 'x86' or - host_machine.cpu() == 'x86_64' or - host_machine.cpu() == 'ia64') + if (host_machine.cpu_family() == 'x86' or + host_machine.cpu_family() == 'x86_64' or + host_machine.cpu_family() == 'ia64') build_acpi = true endif endif