diff --git a/closed/JPP.gmk b/closed/JPP.gmk index f491abff318..2753eec3d2f 100644 --- a/closed/JPP.gmk +++ b/closed/JPP.gmk @@ -30,14 +30,14 @@ ifeq (true,$(OPENJ9_ENABLE_CRIU_SUPPORT)) JPP_TAGS += CRIU_SUPPORT endif # OPENJ9_ENABLE_CRIU_SUPPORT -ifeq (true,$(BUILD_OPENJCEPLUS)) - JPP_TAGS += OPENJCEPLUS_SUPPORT -endif # BUILD_OPENJCEPLUS - ifeq (true,$(OPENJ9_ENABLE_INLINE_TYPES)) JPP_TAGS += INLINE-TYPES endif # OPENJ9_ENABLE_INLINE_TYPES +ifeq (true,$(BUILD_OPENJCEPLUS)) + JPP_TAGS += OPENJCEPLUS_SUPPORT +endif # BUILD_OPENJCEPLUS + # invoke JPP to preprocess java source files # $1 - configuration # $2 - source directory diff --git a/closed/custom/Main.gmk b/closed/custom/Main.gmk index 4ae5a28972c..28e8f2564f0 100644 --- a/closed/custom/Main.gmk +++ b/closed/custom/Main.gmk @@ -120,4 +120,27 @@ ifneq (,$(HEALTHCENTER_JAR)) ibm.healthcenter-java : ibm.healthcenter-copy endif # HEALTHCENTER_JAR +ifeq (true,$(BUILD_OPENJCEPLUS)) + +JGSKIT_MAKE := jgskit.mak +ifeq ($(call isTargetOs, windows), true) + ifeq ($(call isTargetCpu, x86_64), true) + JGSKIT_MAKE := jgskit.win64.mak + endif +endif + openjceplus-copy : openjceplus-libs + +.PHONY : openjceplus-clean + +openjceplus-clean : + @$(ECHO) Cleaning OpenJCEPlus native + @$(RM) -f \ + $(addprefix $(OPENJCEPLUS_TOPDIR)/src/main/native/, \ + com_ibm_crypto_plus_provider_icc_FastJNIBuffer.h \ + com_ibm_crypto_plus_provider_icc_NativeInterface.h) + $(MAKE) -C $(OPENJCEPLUS_TOPDIR)/src/main/native -f $(JGSKIT_MAKE) cleanAll + +clean : openjceplus-clean + +endif # BUILD_OPENJCEPLUS diff --git a/closed/get_j9_source.sh b/closed/get_j9_source.sh index c877fed5f15..ef0911da8b0 100644 --- a/closed/get_j9_source.sh +++ b/closed/get_j9_source.sh @@ -43,9 +43,9 @@ usage() { echo " -openjceplus-branch the OpenJCEPlus git branch" echo " -openjceplus-sha a commit SHA for the OpenJCEPlus repository" echo " -openjceplus-reference a local repo to use as a clone reference" - echo " -with-gskit-bin the GSKit binary url" - echo " -with-gskit-sdk-bin the GSKIT SDK binary url" - echo " -with-gskit-bin-credential the credential for downloading the GSKit binaries" + echo " -gskit-bin the GSKit binary url" + echo " -gskit-sdk-bin the GSKIT SDK binary url" + echo " -gskit-credential the credential for downloading the GSKit binaries" echo " -parallel (boolean) if 'true' then the clone j9 repository commands run in parallel, default is false" echo "" exit 1 @@ -226,7 +226,7 @@ if [ -n "${git_urls[$openjceplus_source]}" ] ; then else echo echo "GSKit binaries are needed for compiling $openjceplus_source" - echo "Please set -with-gskit-bin, -with-gskit-sdk-bin, and -with-gskit-bin-credential" + echo "Please set -gskit-bin, -gskit-sdk-bin, and -gskit-credential" exit 1 fi diff --git a/closed/make/modules/openjceplus/Copy.gmk b/closed/make/modules/openjceplus/Copy.gmk index fe422132307..ec20171d3d0 100644 --- a/closed/make/modules/openjceplus/Copy.gmk +++ b/closed/make/modules/openjceplus/Copy.gmk @@ -21,29 +21,29 @@ include $(TOPDIR)/closed/CopySupport.gmk ifeq (true,$(BUILD_OPENJCEPLUS)) - # Copy OpenJCEPlus native libraries - $(eval $(call SetupCopyFiles, COPY_JGSKIT_LIBS, \ + # Copy OpenJCEPlus native libraries. + $(eval $(call SetupCopyFiles, OPENJCEPLUS_JGSKIT_LIBS_COPY, \ SRC := $(OPENJCEPLUS_TOPDIR)/target, \ FILES := $(filter %.dll %.so %.x, $(call FindFiles, $(OPENJCEPLUS_TOPDIR)/target)), \ FLATTEN := true, \ DEST := $(LIB_DST_DIR), \ )) - TARGETS += $(COPY_JGSKIT_LIBS) + TARGETS += $(OPENJCEPLUS_JGSKIT_LIBS_COPY) - # Bundle GSKIT library - OCK_DIR := $(TOPDIR)/OpenJCEPlus/ock/jgsk_sdk/lib64 + # Bundle GSKIT library. + OPENJCEPLUS_OCK_DIR := $(TOPDIR)/OpenJCEPlus/ock/jgsk_sdk/lib64 ifeq ($(call isTargetOs, windows), true) - OCK_SUB_DIR := modules_cmds + OPENJCEPLUS_OCK_SUB_DIR := modules_cmds else - OCK_SUB_DIR := modules_libs + OPENJCEPLUS_OCK_SUB_DIR := modules_libs endif - $(eval $(call SetupCopyFiles, COPY_OCK, \ - SRC := $(OCK_DIR), \ - DEST := $(SUPPORT_OUTPUTDIR)/$(OCK_SUB_DIR)/$(MODULE), \ - FILES := $(call FindFiles, $(OCK_DIR)), \ + $(eval $(call SetupCopyFiles, OPENJCEPLUS_OCK_COPY, \ + SRC := $(OPENJCEPLUS_OCK_DIR), \ + DEST := $(SUPPORT_OUTPUTDIR)/$(OPENJCEPLUS_OCK_SUB_DIR)/$(MODULE), \ + FILES := $(call FindFiles, $(OPENJCEPLUS_OCK_DIR)), \ )) - TARGETS += $(COPY_OCK) + TARGETS += $(OPENJCEPLUS_OCK_COPY) endif # BUILD_OPENJCEPLUS diff --git a/closed/make/modules/openjceplus/Lib.gmk b/closed/make/modules/openjceplus/Lib.gmk index 1578ae59f8b..66eb3b209d4 100644 --- a/closed/make/modules/openjceplus/Lib.gmk +++ b/closed/make/modules/openjceplus/Lib.gmk @@ -23,23 +23,23 @@ include LibCommon.gmk ifeq (true,$(BUILD_OPENJCEPLUS)) # Identify the desired JGSKIT target platform. -GSKIT_HOME := $(TOPDIR)/OpenJCEPlus/ock/jgsk_sdk -JGSKIT_TARGET := +GSKIT_HOME := $(OPENJCEPLUS_TOPDIR)/ock/jgsk_sdk +JGSKIT_PLATFORM := JGSKIT_MAKE := jgskit.mak -JGSKIT_MAKE_PATH := $(OPENJCEPLUS_TOPDIR)/src/main/native/ -JCE_CLASSPATH := $(OPENJCEPLUS_TOPDIR)/src/main/java:$(TOPDIR)/src/java.base/share/classes +JGSKIT_MAKE_PATH := $(OPENJCEPLUS_TOPDIR)/src/main/native +JCE_CLASSPATH := $(JDK_OUTPUTDIR)/modules/openjceplus:$(JDK_OUTPUTDIR)/modules/java.base ifeq ($(call isTargetOs, aix), true) - JGSKIT_TARGET := ppc-aix64 + JGSKIT_PLATFORM := ppc-aix64 else ifeq ($(call isTargetOs, linux), true) - ifeq ($(call isTargetCpu, x86_64), true) - JGSKIT_TARGET := x86-linux64 - else ifeq ($(call isTargetCpu, ppc64le), true) - JGSKIT_TARGET := ppcle-linux64 + ifeq ($(call isTargetCpu, ppc64le), true) + JGSKIT_PLATFORM := ppcle-linux64 + else ifeq ($(call isTargetCpu, x86_64), true) + JGSKIT_PLATFORM := x86-linux64 endif else ifeq ($(call isTargetOs, windows), true) ifeq ($(call isTargetCpu, x86_64), true) - JGSKIT_TARGET := win64 + JGSKIT_PLATFORM := win64 JGSKIT_MAKE := jgskit.win64.mak JCE_CLASSPATH := "$(call MixedPath,$(OPENJCEPLUS_TOPDIR)/src/main/java)\;$(call MixedPath,$(TOPDIR)/src/java.base/share/classes)" GSKIT_HOME := $(call MixedPath,$(GSKIT_HOME)) @@ -47,15 +47,19 @@ else ifeq ($(call isTargetOs, windows), true) endif endif -ifeq (,$(JGSKIT_TARGET)) +ifeq (,$(JGSKIT_PLATFORM)) $(error Unsupported platform $(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU)) -endif # JGSKIT_TARGET +endif # JGSKIT_PLATFORM .PHONY : compile-libs compile-libs : @$(ECHO) Compiling OpenJCEPlus native - export PLATFORM=$(JGSKIT_TARGET) JAVA_HOME=$(BOOT_JDK) GSKIT_HOME=$(GSKIT_HOME) JCE_CLASSPATH=$(JCE_CLASSPATH) \ + export \ + GSKIT_HOME=$(GSKIT_HOME) \ + JAVA_HOME=$(BOOT_JDK) \ + JCE_CLASSPATH=$(JCE_CLASSPATH) \ + PLATFORM=$(JGSKIT_PLATFORM) \ && $(MAKE) -j1 -C $(JGSKIT_MAKE_PATH) -f $(JGSKIT_MAKE) all @$(ECHO) OpenJCEplus compile complete