Skip to content

Commit c264177

Browse files
author
Cheng Jin
committed
Update configure scripts for RISC-V (closed)
The changes are to modify the scripts intended for OpenJ9 to enable RISC-V from the configuration perspective. Issue: ibmruntimes#218 Signed-off-by: Cheng Jin <[email protected]>
1 parent 3cc03bc commit c264177

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

closed/OpenJ9.gmk

+4-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ $(call openj9_add_jdk_shlibs, java.base, \
196196
j9gc29 \
197197
j9gcchk29 \
198198
j9hookable29 \
199-
j9jit29 \
200199
j9jnichk29 \
201200
j9jvmti29 \
202201
j9prt29 \
@@ -211,6 +210,10 @@ $(call openj9_add_jdk_shlibs, java.base, \
211210
omrsig \
212211
)
213212

213+
ifneq (riscv64, $(OPENJDK_TARGET_CPU))
214+
$(call openj9_add_jdk_shlibs, java.base, j9jit29)
215+
endif
216+
214217
ifeq (windows,$(OPENJDK_TARGET_OS))
215218
$(call openj9_add_jdk_lib, java.base, lib/$(call STATIC_LIBRARY,jsig))
216219
$(eval $(call openj9_add_jdk_rules, \

closed/autoconf/custom-hook.m4

+25-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ AC_DEFUN([OPENJ9_CONFIGURE_DDR],
226226
OPENJ9_ENABLE_DDR=false
227227
elif test "x$enable_ddr" = x ; then
228228
case "$OPENJ9_PLATFORM_CODE" in
229-
ap64|oa64|wa64|xa64|xl64|xz64)
229+
ap64|oa64|rv64|wa64|xa64|xl64|xz64)
230230
AC_MSG_RESULT([yes (default for $OPENJ9_PLATFORM_CODE)])
231231
OPENJ9_ENABLE_DDR=true
232232
;;
@@ -264,6 +264,9 @@ AC_DEFUN([OPENJ9_PLATFORM_EXTRACT_VARS_FROM_CPU],
264264
aarch64)
265265
OPENJ9_CPU=aarch64
266266
;;
267+
riscv64)
268+
OPENJ9_CPU=riscv64
269+
;;
267270
*)
268271
AC_MSG_ERROR([unsupported OpenJ9 cpu $1])
269272
;;
@@ -328,6 +331,11 @@ AC_DEFUN_ONCE([OPENJ9_PLATFORM_SETUP],
328331
if test "x$COMPILE_TYPE" = xcross ; then
329332
OPENJ9_BUILDSPEC="${OPENJ9_BUILDSPEC}_cross"
330333
fi
334+
elif test "x$OPENJ9_CPU" = xriscv64 ; then
335+
OPENJ9_PLATFORM_CODE=rv64
336+
if test "x$COMPILE_TYPE" = xcross ; then
337+
OPENJ9_BUILDSPEC="${OPENJ9_BUILDSPEC}_cross"
338+
fi
331339
else
332340
AC_MSG_ERROR([Unsupported OpenJ9 cpu ${OPENJ9_CPU}!])
333341
fi
@@ -551,6 +559,22 @@ AC_DEFUN([CONFIGURE_OPENSSL],
551559
OPENSSL_BUNDLE_LIB_PATH="${OPENSSL_DIR}/lib"
552560
fi
553561
fi
562+
elif test -s "$OPENSSL_DIR/lib64/${LIBRARY_PREFIX}crypto${SHARED_LIBRARY_SUFFIX}" ; then
563+
OPENSSL_CFLAGS="-I${OPENSSL_DIR}/include"
564+
if test "x$BUNDLE_OPENSSL" = xyes ; then
565+
# On Mac OSX, create local copy of the crypto library to update @rpath
566+
# as the default is /usr/local/lib.
567+
if test "x$OPENJDK_BUILD_OS" = xmacosx ; then
568+
LOCAL_CRYPTO="$TOPDIR/openssl"
569+
$MKDIR -p "${LOCAL_CRYPTO}"
570+
$CP "${OPENSSL_DIR}/lib64/libcrypto.1.1.dylib" "${LOCAL_CRYPTO}"
571+
$CP "${OPENSSL_DIR}/lib64/libcrypto.1.0.0.dylib" "${LOCAL_CRYPTO}"
572+
$CP -a "${OPENSSL_DIR}/lib64/libcrypto.dylib" "${LOCAL_CRYPTO}"
573+
OPENSSL_BUNDLE_LIB_PATH="${LOCAL_CRYPTO}"
574+
else
575+
OPENSSL_BUNDLE_LIB_PATH="${OPENSSL_DIR}/lib64"
576+
fi
577+
fi
554578
elif test -s "$OPENSSL_DIR/${LIBRARY_PREFIX}crypto${SHARED_LIBRARY_SUFFIX}" ; then
555579
OPENSSL_CFLAGS="-I${OPENSSL_DIR}/include"
556580
if test "x$BUNDLE_OPENSSL" = xyes ; then

closed/autoconf/custom-spec.gmk.in

+6
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,9 @@ ifeq (true,$(OPENJ9_ENABLE_CMAKE))
121121
else
122122
OPENJ9_VM_BUILD_DIR := $(OUTPUTDIR)/vm
123123
endif
124+
125+
ifeq (riscv64,$(OPENJDK_TARGET_CPU))
126+
ifeq (cross,$(COMPILE_TYPE))
127+
export SYSROOT_CFLAGS
128+
endif
129+
endif

0 commit comments

Comments
 (0)