From 8c2891ae14736db08ecbbbbb65302e84abc695cd Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Tue, 29 Jul 2025 15:59:22 +0200 Subject: [PATCH] meson: Actually use host_cpu in host_system, expand fixups Otherwise we'll get system names like `x86-linux`, which is nonesense. Also add fixups for 32-bit ARM, and MIPS. Change-Id: I6bd773bec82dcc54b40bbc018641cd614b272a28 --- meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 522f18415..c3c71b54d 100644 --- a/meson.build +++ b/meson.build @@ -208,6 +208,14 @@ elif host_cpu == 'amd64' host_cpu = 'x86_64' elif host_cpu in ['armv6', 'armv7'] host_cpu += 'l' +elif host_cpu == 'arm' + # Too generic, we use more specific ones + host_cpu = host_machine.cpu() +elif host_cpu in ['mips', 'mips64'] + # LE is suffixed with 'el' + if host_machine.endian() == 'little' + host_cpu += 'el' + endif elif host_cpu == 'ppc' host_cpu = 'powerpc' if host_machine.endian() == 'little' @@ -220,7 +228,7 @@ elif host_cpu == 'ppc64' endif endif -host_system = host_machine.cpu_family() + '-' + host_machine.system() +host_system = host_cpu + '-' + host_machine.system() message('canonical Nix system name:', host_system) is_linux = host_machine.system() == 'linux'