aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Petit <kevin.petit@arm.com>2014-04-28 15:17:43 +0100
committerAmit Pundir <amit.pundir@linaro.org>2014-05-08 02:39:26 +0530
commitbbed211526a50ebc685083da4e6be2ba74ac9b6b (patch)
treedbb2ad4e3179c929d8560101c0ddcfd4bf350ed1
parentee604cb7fb5ab5e28a6f147e096b999e18861f2a (diff)
downloadbuild-bbed211526a50ebc685083da4e6be2ba74ac9b6b.tar.gz
Force 64-bit host builds for arm64
When building for 64-bit targets, we need to build a 64-bit version of the host libraries. In particular, we need dexopt & friends to be 64-bit on the host so that they can generate files which can be ran by 64-bit targets. Change-Id: I386bb107b9570b3e15ee4ad7e613803762927679
-rw-r--r--core/combo/HOST_linux-x86.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk
index 85d536b4b1..e89b0e2646 100644
--- a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -33,11 +33,17 @@ HOST_AR := $(HOST_TOOLCHAIN_PREFIX)ar
endif # $(HOST_TOOLCHAIN_PREFIX)gcc exists
HOST_TOOLCHAIN_FOR_CLANG := prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/
+# By default we build everything in 32-bit if the target is 32-bit or
+# in 64-bit if the target is 64-bit. This gives more consistency
+# between the host tools and the target.
+# BUILD_HOST_64bit can also be set to 1 to override this behaviour
+# for tools like the emulator which can benefit from 64-bit host arch
+# (even when emulating 32-bit targets).
+ifneq ($(filter %64,$(TARGET_ARCH)),)
+BUILD_HOST_64bit=1
+endif
+
ifneq ($(strip $(BUILD_HOST_64bit)),)
-# By default we build everything in 32-bit, because it gives us
-# more consistency between the host tools and the target.
-# BUILD_HOST_64bit=1 overrides it for tool like emulator
-# which can benefit from 64-bit host arch.
HOST_GLOBAL_CFLAGS += -m64 -Wa,--noexecstack
HOST_GLOBAL_LDFLAGS += -m64 -Wl,-z,noexecstack
else