summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2014-03-21 22:11:08 -0700
committerColin Cross <ccross@android.com>2014-03-21 22:11:08 -0700
commit93a264eba965b0c6072369a7001f8d8c647a73c3 (patch)
treed109df85b810b6565f8628b215aab7b7c6ba47dd
parentc6a926398c25da1c00dd526628c48ddba1792008 (diff)
downloadandroid_dalvik-93a264eba965b0c6072369a7001f8d8c647a73c3.tar.gz
android_dalvik-93a264eba965b0c6072369a7001f8d8c647a73c3.tar.bz2
android_dalvik-93a264eba965b0c6072369a7001f8d8c647a73c3.zip
dalvik: let 32-bit dalvik build on multilib targets
Set LOCAL_32_BIT_ONLY for all target modules Use LOCAL_LDFLAGS_x86 instead of ifeq ($(TARGET_ARCH),x86) Set dvm_arch to TARGET_2ND_ARCH instead of TARGET_ARCH on 64-bit targets This will allow "make checkbuild" to succeed on 64-bit platforms. Change-Id: Idd51dda26b54855c0c8640f8fcfbf4274baf8845
-rw-r--r--dexdump/Android.mk2
-rw-r--r--dexlist/Android.mk1
-rw-r--r--dexopt/Android.mk1
-rw-r--r--libdex/Android.mk1
-rw-r--r--tools/gdbjithelper/Android.mk1
-rw-r--r--unit-tests/Android.mk1
-rw-r--r--vm/Android.mk44
-rw-r--r--vm/ReconfigureDvm.mk6
-rw-r--r--vm/compiler/codegen/x86/libenc/Android.mk1
9 files changed, 33 insertions, 25 deletions
diff --git a/dexdump/Android.mk b/dexdump/Android.mk
index a6c954539..9aa4ae913 100644
--- a/dexdump/Android.mk
+++ b/dexdump/Android.mk
@@ -42,6 +42,7 @@ LOCAL_STATIC_LIBRARIES := $(dexdump_static_libraries)
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
LOCAL_MODULE_TAGS := optional
LOCAL_LDLIBS +=
+LOCAL_32_BIT_ONLY := true
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
@@ -51,6 +52,7 @@ LOCAL_C_INCLUDES := $(dexdump_c_includes)
LOCAL_STATIC_LIBRARIES := $(dexdump_static_libraries)
LOCAL_SHARED_LIBRARIES := libutils
LOCAL_MODULE_TAGS := optional
+LOCAL_32_BIT_ONLY := true
include $(BUILD_STATIC_LIBRARY)
endif # !SDK_ONLY
diff --git a/dexlist/Android.mk b/dexlist/Android.mk
index 5c3be63bd..19b52d06d 100644
--- a/dexlist/Android.mk
+++ b/dexlist/Android.mk
@@ -34,6 +34,7 @@ LOCAL_C_INCLUDES := $(dexdump_c_includes)
LOCAL_SHARED_LIBRARIES := libcutils libz libutils
LOCAL_STATIC_LIBRARIES := $(dexdump_static_libraries)
LOCAL_LDLIBS +=
+LOCAL_32_BIT_ONLY := true
#include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
diff --git a/dexopt/Android.mk b/dexopt/Android.mk
index 60cb13644..1dca215a5 100644
--- a/dexopt/Android.mk
+++ b/dexopt/Android.mk
@@ -42,6 +42,7 @@ LOCAL_MODULE := dexopt
LOCAL_C_INCLUDES += external/stlport/stlport bionic/ bionic/libstdc++/include
LOCAL_SHARED_LIBRARIES += libstlport
+LOCAL_32_BIT_ONLY := true
include $(BUILD_EXECUTABLE)
ifeq ($(WITH_HOST_DALVIK),true)
diff --git a/libdex/Android.mk b/libdex/Android.mk
index 0a4639627..d07af63ec 100644
--- a/libdex/Android.mk
+++ b/libdex/Android.mk
@@ -54,6 +54,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := libziparchive
LOCAL_SHARED_LIBRARIES := libutils
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libdex
+LOCAL_32_BIT_ONLY := true
include $(BUILD_STATIC_LIBRARY)
endif # !SDK_ONLY
diff --git a/tools/gdbjithelper/Android.mk b/tools/gdbjithelper/Android.mk
index 087bc8f45..cf199073e 100644
--- a/tools/gdbjithelper/Android.mk
+++ b/tools/gdbjithelper/Android.mk
@@ -19,4 +19,5 @@ LOCAL_SRC_FILES := gdbjithelper.c
LOCAL_CFLAGS += -O0 -g
LOCAL_MODULE := gdbjithelper
LOCAL_MODULE_TAGS := eng
+LOCAL_32_BIT_ONLY := true
include $(BUILD_EXECUTABLE)
diff --git a/unit-tests/Android.mk b/unit-tests/Android.mk
index 1e14c0806..c716244b6 100644
--- a/unit-tests/Android.mk
+++ b/unit-tests/Android.mk
@@ -33,6 +33,7 @@ LOCAL_C_INCLUDES += $(test_c_includes)
LOCAL_MODULE := $(test_module)
LOCAL_SRC_FILES := $(test_src_files)
LOCAL_SHARED_LIBRARIES += libcutils libdvm
+LOCAL_32_BIT_ONLY := true
include $(BUILD_NATIVE_TEST)
# Build for the host.
diff --git a/vm/Android.mk b/vm/Android.mk
index 909190c69..3396dd6d7 100644
--- a/vm/Android.mk
+++ b/vm/Android.mk
@@ -46,9 +46,7 @@ include $(LOCAL_PATH)/ReconfigureDvm.mk
# Overwrite default settings
LOCAL_MODULE := libdvm
LOCAL_CFLAGS += $(target_smp_flag)
-ifeq ($(TARGET_ARCH),x86)
-LOCAL_LDFLAGS += -Wl,--no-fatal-warnings
-endif
+LOCAL_LDFLAGS_x86 += -Wl,--no-fatal-warnings
# Define WITH_ADDRESS_SANITIZER to build an ASan-instrumented version of the
# library in /system/lib/asan/libdvm.so.
@@ -61,6 +59,7 @@ endif
# TODO: split out the asflags.
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+LOCAL_32_BIT_ONLY := true
include $(BUILD_SHARED_LIBRARY)
# Derivation #1
@@ -71,27 +70,23 @@ LOCAL_CFLAGS += -UNDEBUG -DDEBUG=1 -DLOG_NDEBUG=1 -DWITH_DALVIK_ASSERT \
# TODO: split out the asflags.
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
LOCAL_MODULE := libdvm_assert
-ifeq ($(TARGET_ARCH),x86)
-LOCAL_LDFLAGS += -Wl,--no-fatal-warnings
-endif
+LOCAL_LDFLAGS_x86 += -Wl,--no-fatal-warnings
+LOCAL_32_BIT_ONLY := true
include $(BUILD_SHARED_LIBRARY)
-ifneq ($(dvm_arch),mips) # MIPS support for self-verification is incomplete
-
- # Derivation #2
- # Enable assertions and JIT self-verification
- include $(LOCAL_PATH)/ReconfigureDvm.mk
- LOCAL_CFLAGS += -UNDEBUG -DDEBUG=1 -DLOG_NDEBUG=1 -DWITH_DALVIK_ASSERT \
- -DWITH_SELF_VERIFICATION $(target_smp_flag)
- # TODO: split out the asflags.
- LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
- LOCAL_MODULE := libdvm_sv
- ifeq ($(TARGET_ARCH),x86)
- LOCAL_LDFLAGS += -Wl,--no-fatal-warnings
- endif
- include $(BUILD_SHARED_LIBRARY)
-
-endif # dvm_arch!=mips
+# Derivation #2
+# Enable assertions and JIT self-verification
+include $(LOCAL_PATH)/ReconfigureDvm.mk
+LOCAL_CFLAGS += -UNDEBUG -DDEBUG=1 -DLOG_NDEBUG=1 -DWITH_DALVIK_ASSERT \
+ -DWITH_SELF_VERIFICATION $(target_smp_flag)
+# TODO: split out the asflags.
+LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
+LOCAL_MODULE := libdvm_sv
+LOCAL_LDFLAGS_x86 += -Wl,--no-fatal-warnings
+# MIPS support for self-verification is incomplete
+LOCAL_MODULE_UNSUPPORTED_ARCH := mips
+LOCAL_32_BIT_ONLY := true
+include $(BUILD_SHARED_LIBRARY)
# Derivation #3
# Compile out the JIT
@@ -101,9 +96,8 @@ LOCAL_CFLAGS += $(target_smp_flag)
# TODO: split out the asflags.
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
LOCAL_MODULE := libdvm_interp
-ifeq ($(TARGET_ARCH),x86)
-LOCAL_LDFLAGS += -Wl,--no-fatal-warnings
-endif
+LOCAL_LDFLAGS_x86 += -Wl,--no-fatal-warnings
+LOCAL_32_BIT_ONLY := true
include $(BUILD_SHARED_LIBRARY)
diff --git a/vm/ReconfigureDvm.mk b/vm/ReconfigureDvm.mk
index d7ad1ccc9..9f19407cc 100644
--- a/vm/ReconfigureDvm.mk
+++ b/vm/ReconfigureDvm.mk
@@ -16,8 +16,14 @@ include $(CLEAR_VARS)
# Variables used in the included Dvm.mk.
dvm_os := $(TARGET_OS)
+ifndef TARGET_2ND_ARCH
dvm_arch := $(TARGET_ARCH)
dvm_arch_variant := $(TARGET_ARCH_VARIANT)
+else
+# Dalvik doesn't support 64-bit architectures, fall back to the 32-bit 2nd arch
+dvm_arch := $(TARGET_2ND_ARCH)
+dvm_arch_variant := $(TARGET_2ND_ARCH_VARIANT)
+endif
include $(LOCAL_PATH)/Dvm.mk
diff --git a/vm/compiler/codegen/x86/libenc/Android.mk b/vm/compiler/codegen/x86/libenc/Android.mk
index 6fe9cdbb4..85bea56df 100644
--- a/vm/compiler/codegen/x86/libenc/Android.mk
+++ b/vm/compiler/codegen/x86/libenc/Android.mk
@@ -43,6 +43,7 @@ LOCAL_SRC_FILES := $(enc_src_files)
LOCAL_C_INCLUDES += $(enc_include_files)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libenc
+LOCAL_32_BIT_ONLY := true
include $(BUILD_STATIC_LIBRARY)
endif # !SDK_ONLY