Build native code for the host.
Nothing too alarming, except for a change to deal with code
that assumed imr_multiaddr and imr_interface in ip_mreq were
uint32_t (like in the kernel UAPI) and not in_addr like they
are in glibc.
Change-Id: I98f7208939df12edb086e6cdf6f09cec0527ec50
diff --git a/NativeCode.mk b/NativeCode.mk
index 3ad4e1a..f771cee 100644
--- a/NativeCode.mk
+++ b/NativeCode.mk
@@ -65,12 +65,11 @@
core_src_files :=
openjdk_core_src_files :=
-#Include the sub.m in openjdk.
+#Include the sub.mk for openjdk.
$(foreach dir, \
ojluni/src/main/native, \
$(eval $(call include-openjdk-native-dir,$(dir))))
-
# Include the sub.mk files.
$(foreach dir, \
dalvik/src/main/native luni/src/main/native, \
@@ -165,6 +164,19 @@
LOCAL_MULTILIB := both
include $(BUILD_HOST_SHARED_LIBRARY)
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := $(openjdk_core_src_files)
+LOCAL_C_INCLUDES := $(core_c_includes)
+LOCAL_CFLAGS := -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DLINUX -D__GLIBC__ # Sigh.
+LOCAL_SHARED_LIBRARIES := $(core_shared_libraries) libcrypto-host libz-host
+LOCAL_SHARED_LIBRARIES += libart libnativehelper
+LOCAL_STATIC_LIBRARIES := $(core_static_libraries) libfdlibm
+LOCAL_MODULE_TAGS := optional
+LOCAL_LDLIBS += -ldl -lpthread
+LOCAL_MODULE := libopenjdkjavacore
+LOCAL_MULTILIB := both
+include $(BUILD_HOST_SHARED_LIBRARY)
+
ifeq ($(LIBCORE_SKIP_TESTS),)
include $(CLEAR_VARS)
LOCAL_CLANG := true