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
This commit is contained in:
OPNA2608
2025-07-29 14:38:52 +00:00
committed by Cosima Neidahl
parent f0150eb8a3
commit 8c2891ae14
+9 -1
View File
@@ -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'