HOST_OPENJDK_BIN_LICENSE = GPL-2.0+ with exception
HOST_OPENJDK_BIN_LICENSE_FILES = legal/java.prefs/LICENSE legal/java.prefs/ASSEMBLY_EXCEPTION
+HOST_OPENJDK_BIN_ROOT_DIR = $(HOST_DIR)/usr/lib/jvm
+
# unpack200 has an invalid RPATH and relies on libzlib. When
# host-libzlib is installed on the system, the error "ERROR: package
# host-libzlib installs executables without proper RPATH: will occur.
# Because unpack200 is a deprecated tool, removing it to fix this
# issue is safe.
define HOST_OPENJDK_BIN_INSTALL_CMDS
- mkdir -p $(HOST_DIR)/bin
- cp -dpfr $(@D)/bin/* $(HOST_DIR)/bin/
- mkdir -p $(HOST_DIR)/lib
- cp -dpfr $(@D)/lib/* $(HOST_DIR)/lib/
- $(RM) -f $(HOST_DIR)/bin/unpack200
+ mkdir -p $(HOST_OPENJDK_BIN_ROOT_DIR)
+ cp -dpfr $(@D)/* $(HOST_OPENJDK_BIN_ROOT_DIR)
+ $(RM) -f $(HOST_OPENJDK_BIN_ROOT_DIR)/bin/unpack200
endef
$(eval $(host-generic-package))
+
+# variables used by other packages
+JAVAC = $(HOST_OPENJDK_BIN_ROOT_DIR)/bin/javac
--enable-openjdk-only \
--enable-unlimited-crypto \
--openjdk-target=$(GNU_TARGET_NAME) \
- --with-boot-jdk=$(HOST_DIR) \
+ --with-boot-jdk=$(HOST_OPENJDK_BIN_ROOT_DIR) \
--with-stdc++lib=dynamic \
--with-debug-level=release \
--with-devkit=$(HOST_DIR) \
define OPENJDK_JNI_TEST_BUILD_CMDS
# Compile Java classes and generate native headers
- $(HOST_DIR)/bin/javac -d $(@D) -h $(@D) \
+ $(JAVAC) -d $(@D) -h $(@D) \
$(OPENJDK_JNI_TEST_PKGDIR)/JniTest.java \
$(OPENJDK_JNI_TEST_PKGDIR)/JniWrapper.java \
$(OPENJDK_JNI_TEST_PKGDIR)/JniHelper.java