Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
taoliult committed Dec 11, 2023
1 parent e5735e5 commit 475852e
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 55 deletions.
8 changes: 4 additions & 4 deletions closed/JPP.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ ifeq (true,$(OPENJ9_ENABLE_CRIU_SUPPORT))
JPP_TAGS += CRIU_SUPPORT
endif # OPENJ9_ENABLE_CRIU_SUPPORT

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

ifeq (true,$(OPENJ9_ENABLE_OPENJDK_METHODHANDLES))
JPP_TAGS += OPENJDK_METHODHANDLES
endif # OPENJ9_ENABLE_OPENJDK_METHODHANDLES

# invoke JPP to preprocess java source files
# $1 - configuration
# $2 - source directory
Expand Down
23 changes: 17 additions & 6 deletions closed/autoconf/custom-hook.m4
Original file line number Diff line number Diff line change
Expand Up @@ -830,14 +830,25 @@ AC_DEFUN([OPENJ9_GENERATE_TOOL_WRAPPERS],

AC_DEFUN([OPENJCEPLUS_SETUP],
[
AC_ARG_ENABLE([openjceplus], [AS_HELP_STRING([--enable-openjceplus],
[enable OpenJCEPlus integration @<:@disabled@:>@])])
AC_MSG_CHECKING([for OpenJCEPlus])
if test -d "$TOPDIR/OpenJCEPlus" ; then
BUILD_OPENJCEPLUS=true
AC_MSG_RESULT([yes])
else
BUILD_OPENJCEPLUS=false
if test "x$enable_openjceplus" = xyes ; then
if test -d "$TOPDIR/OpenJCEPlus" ; then
AC_MSG_RESULT([yes (explicitly set)])
BUILD_OPENJCEPLUS=true
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([OpenJCEPlus not found at $TOPDIR/OpenJCEPlus])
fi
elif test "x$enable_openjceplus" = xno ; then
AC_MSG_RESULT([no])
BUILD_OPENJCEPLUS=false
elif test "x$enable_openjceplus" = x ; then
AC_MSG_RESULT([no (default)])
BUILD_OPENJCEPLUS=false
else
AC_MSG_ERROR([--enable-openjceplus accepts no argument])
fi
AC_SUBST(BUILD_OPENJCEPLUS)
])
21 changes: 8 additions & 13 deletions closed/custom/Main.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +112,20 @@ 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
ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86_64)), true)
OPENJCEPLUS_JGSKIT_MAKE := jgskit.win64.mak
else
OPENJCEPLUS_JGSKIT_MAKE := jgskit.mak
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
@$(ECHO) Cleaning OpenJCEPlus native code
$(MAKE) -C $(OPENJCEPLUS_TOPDIR)/src/main/native -f $(OPENJCEPLUS_JGSKIT_MAKE) cleanAll

clean-openjceplus : openjceplus-clean

endif # BUILD_OPENJCEPLUS
19 changes: 9 additions & 10 deletions closed/get_j9_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ if [ ${pflag} = true ] ; then
wait
fi

# Download OCK binaries and create Java module folder
# Download OCK binaries and create Java module folder.
openjceplus_source=OpenJCEPlus
if [ -n "${git_urls[$openjceplus_source]}" ] ; then

Expand All @@ -219,23 +219,22 @@ if [ -n "${git_urls[$openjceplus_source]}" ] ; then
cd $openjceplus_source
mkdir -p ock/jgsk_sdk/lib64

if [ $gskit_credential ]; then
# Download GSKit binaries from artifactory
curl -vk -u "$gskit_credential" -X GET $gskit_bin > ./ock/jgsk_crypto.tar
curl -vk -u "$gskit_credential" -X GET $gskit_sdk_bin > ./ock/jgsk_crypto_sdk.tar
if [ -n "$gskit_credential" ] ; then
curl -u "$gskit_credential" $gskit_bin > ock/jgsk_crypto.tar
curl -u "$gskit_credential" $gskit_sdk_bin > ock/jgsk_crypto_sdk.tar
else
echo
echo "GSKit binaries are needed for compiling $openjceplus_source"
echo "Please set -gskit-bin, -gskit-sdk-bin, and -gskit-credential"
exit 1
fi

tar -xf ./ock/jgsk_crypto_sdk.tar -C ./ock/
tar -xf ./ock/jgsk_crypto.tar -C ./ock/jgsk_sdk/lib64/
tar -xf ock/jgsk_crypto_sdk.tar -C ock
tar -xf ock/jgsk_crypto.tar -C ock/jgsk_sdk/lib64

# Create OpenJCEPlus Java module folder
mkdir -p ./src/main/openjceplus/share/classes/
cp -r ./src/main/java/* ./src/main/openjceplus/share/classes/
# Create OpenJCEPlus Java module folder.
mkdir -p src/main/openjceplus/share/classes
cp -r src/main/java/* src/main/openjceplus/share/classes/

cd ..
fi
Expand Down
2 changes: 1 addition & 1 deletion closed/make/copy/Copy-openjceplus.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ifeq (true,$(BUILD_OPENJCEPLUS))
TARGETS += $(OPENJCEPLUS_JGSKIT_LIBS_COPY)

# Bundle GSKIT library.
OPENJCEPLUS_OCK_DIR := $(TOPDIR)/OpenJCEPlus/ock/jgsk_sdk/lib64
OPENJCEPLUS_OCK_DIR := $(OPENJCEPLUS_TOPDIR)/ock/jgsk_sdk/lib64
ifeq ($(call isTargetOs, windows), true)
OPENJCEPLUS_OCK_SUB_DIR := modules_cmds
else
Expand Down
43 changes: 22 additions & 21 deletions closed/make/lib/Lib-openjceplus.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,45 @@ include LibCommon.gmk
ifeq (true,$(BUILD_OPENJCEPLUS))

# Identify the desired JGSKIT target platform.
GSKIT_HOME := $(OPENJCEPLUS_TOPDIR)/ock/jgsk_sdk
JGSKIT_PLATFORM :=
JGSKIT_MAKE := jgskit.mak
JGSKIT_MAKE_PATH := $(OPENJCEPLUS_TOPDIR)/src/main/native
JCE_CLASSPATH := $(JDK_OUTPUTDIR)/modules/openjceplus:$(JDK_OUTPUTDIR)/modules/java.base
OPENJCEPLUS_BOOT_JDK := $(BOOT_JDK)
OPENJCEPLUS_GSKIT_HOME := $(OPENJCEPLUS_TOPDIR)/ock/jgsk_sdk
OPENJCEPLUS_JCE_CLASSPATH := $(JDK_OUTPUTDIR)/modules/openjceplus:$(JDK_OUTPUTDIR)/modules/java.base
OPENJCEPLUS_JGSKIT_MAKE := jgskit.mak
OPENJCEPLUS_JGSKIT_MAKE_PATH := $(OPENJCEPLUS_TOPDIR)/src/main/native
OPENJCEPLUS_JGSKIT_PLATFORM :=

ifeq ($(call isTargetOs, aix), true)
JGSKIT_PLATFORM := ppc-aix64
OPENJCEPLUS_JGSKIT_PLATFORM := ppc-aix64
else ifeq ($(call isTargetOs, linux), true)
ifeq ($(call isTargetCpu, ppc64le), true)
JGSKIT_PLATFORM := ppcle-linux64
OPENJCEPLUS_JGSKIT_PLATFORM := ppcle-linux64
else ifeq ($(call isTargetCpu, x86_64), true)
JGSKIT_PLATFORM := x86-linux64
OPENJCEPLUS_JGSKIT_PLATFORM := x86-linux64
endif
else ifeq ($(call isTargetOs, windows), true)
ifeq ($(call isTargetCpu, x86_64), true)
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))
BOOT_JDK := $(call MixedPath,$(BOOT_JDK))
OPENJCEPLUS_BOOT_JDK := $(call MixedPath,$(OPENJCEPLUS_BOOT_JDK))
OPENJCEPLUS_GSKIT_HOME := $(call MixedPath,$(OPENJCEPLUS_GSKIT_HOME))
OPENJCEPLUS_JCE_CLASSPATH := "$(call MixedPath,$(JDK_OUTPUTDIR)/modules/openjceplus)\;$(call MixedPath,$(JDK_OUTPUTDIR)/modules/java.base)"
OPENJCEPLUS_JGSKIT_MAKE := jgskit.win64.mak
OPENJCEPLUS_JGSKIT_PLATFORM := win64
endif
endif

ifeq (,$(JGSKIT_PLATFORM))
ifeq (,$(OPENJCEPLUS_JGSKIT_PLATFORM))
$(error Unsupported platform $(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU))
endif # JGSKIT_PLATFORM
endif # OPENJCEPLUS_JGSKIT_PLATFORM

.PHONY : compile-libs

compile-libs :
@$(ECHO) Compiling OpenJCEPlus native
@$(ECHO) Compiling OpenJCEPlus native code
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
GSKIT_HOME=$(OPENJCEPLUS_GSKIT_HOME) \
JAVA_HOME=$(OPENJCEPLUS_BOOT_JDK) \
JCE_CLASSPATH=$(OPENJCEPLUS_JCE_CLASSPATH) \
PLATFORM=$(OPENJCEPLUS_JGSKIT_PLATFORM) \
&& $(MAKE) -j1 -C $(OPENJCEPLUS_JGSKIT_MAKE_PATH) -f $(OPENJCEPLUS_JGSKIT_MAKE) all
@$(ECHO) OpenJCEplus compile complete

TARGETS += compile-libs
Expand Down

0 comments on commit 475852e

Please sign in to comment.