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.
This commit is contained in:
Alexander von Gluck IV 2017-02-17 12:52:31 -06:00
parent 27b0f5295d
commit 2be19c58e9
1 changed files with 8 additions and 0 deletions

View File

@ -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