merge from open-source master
Change-Id: Id3161ac44e0eaba0184b3d2d4af43e4e40d26e90
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index bbd78ba..f277ea5 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -17,6 +17,12 @@
# Configuration for Darwin (Mac OS X) on x86.
# Included by combo/select.mk
+# We build everything in 32-bit, because some host tools are
+# 32-bit-only anyway (emulator, acc), and because it gives us
+# more consistency between the host tools and the target.
+HOST_GLOBAL_CFLAGS += -m32
+HOST_GLOBAL_LDFLAGS += -m32
+
HOST_GLOBAL_CFLAGS += -fPIC
HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error
@@ -38,6 +44,7 @@
$(HOST_CXX) \
-dynamiclib -single_module -read_only_relocs suppress \
$(HOST_GLOBAL_LD_DIRS) \
+ $(HOST_GLOBAL_LDFLAGS) \
$(PRIVATE_ALL_OBJECTS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \
@@ -53,6 +60,7 @@
-o $@ \
-Wl,-dynamic -headerpad_max_install_names \
$(HOST_GLOBAL_LD_DIRS) \
+ $(HOST_GLOBAL_LDFLAGS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \
$(PRIVATE_ALL_OBJECTS) \
$(call normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \