From 2be19c58e93862259020e6c9756f7fa7f2c08904 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Fri, 17 Feb 2017 12:52:31 -0600 Subject: [PATCH] build: Prevent recursive jam loops on host-only #13309 * When --host-only is used, HAIKU_*ARCH is undefined. * Various architecture variables are undefined resulting in architecture dependant code paths getting called recursively. (blah/Jamfile loads blah//Jamfile vs blah/x86/Jamfile) * Another option is setting HAIKU_*ARCH to the host arch if undefined, but that might have unintended impacts. --- build/jam/BuildSetup | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup index cdf1a3c89f..082a307898 100644 --- a/build/jam/BuildSetup +++ b/build/jam/BuildSetup @@ -640,6 +640,14 @@ if $(TARGET_PLATFORM) != haiku { } } + +# Haiku architecture is undefined on host-only builds +# set here to host arch to prevent recusive loops. +if $(HAIKU_HOST_BUILD_ONLY) = 1 { + HAIKU_ARCH = $(HOST_ARCH) ; + HAIKU_KERNEL_ARCH = $(HOST_ARCH) ; +} + # Set TARGET_* variables either from HAIKU_* or HOST_* depending on the # specified TARGET_PLATFORM. Some variables are package architecture dependent # and their name gets a respective suffix. A few variables exist both with and