From 33beece7703acc5f54cb06701d0bcd63aadce2d6 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck Date: Fri, 27 Dec 2024 08:17:40 -0600 Subject: [PATCH] jam/BuildSetup: Gracefully handle arm64, riscv HOST_CPU * HOST_CPU was getting set to "" on arm64 host builds of Haiku which resulted in varying host tool directories objects/linux/x86_64/release vs objects/linux/release * This captures the changes in buildtools abcf50c2 which adds proper arm 64, and riscv 32/64 OSPLAT definitions Change-Id: Ife768fe3e4b1f90748b8f09afd632d4cd9c87d2d Reviewed-on: https://review.haiku-os.org/c/haiku/+/8720 Reviewed-by: waddlesplash --- build/jam/BuildSetup | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup index 2ca8173e96..e1793f01a0 100644 --- a/build/jam/BuildSetup +++ b/build/jam/BuildSetup @@ -234,12 +234,17 @@ if $(HOST_PLATFORM) = linux || $(HOST_PLATFORM) = freebsd } HOST_CPU ?= $(OSPLAT:L) ; - -# Jam doesn't know x86_64, so override HOST_CPU, if 64 bit. +# Jam doesn't know 32 vs 64 bit, so fill in the gaps based on our +# host platform 64-bit knowledge. if $(HOST_CPU) = x86 && $(HOST_PLATFORM_IS_64_BIT) { HOST_CPU = x86_64 ; } - +if $(HOST_CPU) = arm && $(HOST_PLATFORM_IS_64_BIT) { + HOST_CPU = arm64 ; +} +if $(HOST_CPU) = riscv && $(HOST_PLATFORM_IS_64_BIT) { + HOST_CPU = riscv64 ; +} HOST_ARCH ?= $(HOST_CPU) ; HOST_ARCHS = $(HOST_ARCH) ; HOST_KERNEL_ARCH = host ;