From c479bccdb431e7ee4954828e938776ddc17c9b04 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Thu, 4 Dec 2008 17:24:38 -0700 Subject: [PATCH] support cross-platform bootimage build (as long as the build arch matches the target arch --- makefile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index c7b6f30991..42b29c807e 100644 --- a/makefile +++ b/makefile @@ -230,12 +230,17 @@ endif bootimage-generator-sources = $(src)/bootimage.cpp bootimage-generator-objects = \ $(call cpp-objects,$(bootimage-generator-sources),$(src),$(native-build)) -bootimage-generator = $(native-build)/bootimage-generator +bootimage-generator = \ + $(build)/$(build-platform)-$(build-arch)-compile-fast/bootimage-generator bootimage-bin = $(native-build)/bootimage.bin bootimage-object = $(native-build)/bootimage-bin.o ifeq ($(bootimage),true) + ifneq ($(build-arch),$(arch)) + error "can't cross-build a bootimage" + endif + vm-classpath-object = $(bootimage-object) cflags += -DBOOT_IMAGE=\"bootimageBin\" else @@ -450,7 +455,16 @@ else endif $(strip) $(strip-all) $(@) -$(bootimage-generator): \ +$(bootimage-generator): + (unset MAKEFLAGS && \ + make mode=fast process=compile \ + arch=$(build-arch) \ + platform=$(build-platform) \ + bootimage-generator= \ + build-bootimage-generator=$(bootimage-generator) \ + $(bootimage-generator)) + +$(build-bootimage-generator): \ $(vm-objects) $(classpath-object) $(jni-objects) $(heapwalk-objects) \ $(bootimage-generator-objects) @echo "linking $(@)"