Skip to content

Commit bc373c3

Browse files
committed
Copy the compressed/full GC/GCCHK libs based on pointer mode
If compressed mode, only copy compressed GC/GCCHK lib. If full mode, only copy full GC/GCCHK lib. If mixed mode, copy both compressed and full GC/GCCHK libs. Signed-off-by: Sharon Wang <[email protected]>
1 parent e742126 commit bc373c3

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

closed/autoconf/custom-hook.m4

+6-5
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ AC_DEFUN([OPENJ9_PLATFORM_SETUP],
350350
# JVM will run).
351351
OPENJ9_PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
352352
353-
ENABLE_MIXED_REFERENCES=false
353+
OPENJ9_ENABLE_MIXED_REFERENCES=false
354354
if test "x$with_mixedrefs" = x; then
355355
if test "x$with_noncompressedrefs" = x ; then
356356
OPENJ9_BUILDSPEC="${OPENJDK_BUILD_OS}_${OPENJ9_CPU}_cmprssptrs"
@@ -360,7 +360,7 @@ AC_DEFUN([OPENJ9_PLATFORM_SETUP],
360360
OPENJ9_LIBS_SUBDIR=default
361361
fi
362362
else
363-
ENABLE_MIXED_REFERENCES=true
363+
OPENJ9_ENABLE_MIXED_REFERENCES=true
364364
OPENJ9_BUILDSPEC="${OPENJDK_BUILD_OS}_${OPENJ9_CPU}_mxdptrs"
365365
OPENJ9_LIBS_SUBDIR=default
366366
fi
@@ -370,7 +370,7 @@ AC_DEFUN([OPENJ9_PLATFORM_SETUP],
370370
OPENJ9_PLATFORM_CODE=xa64
371371
elif test "x$OPENJDK_BUILD_OS" = xwindows ; then
372372
OPENJ9_PLATFORM_CODE=wa64
373-
if test "x$ENABLE_MIXED_REFERENCES" = xfalse ; then
373+
if test "x$OPENJ9_ENABLE_MIXED_REFERENCES" = xfalse ; then
374374
if test "x$OPENJ9_LIBS_SUBDIR" = xdefault ; then
375375
OPENJ9_BUILDSPEC=win_x86-64
376376
else
@@ -381,7 +381,7 @@ AC_DEFUN([OPENJ9_PLATFORM_SETUP],
381381
fi
382382
elif test "x$OPENJDK_BUILD_OS" = xmacosx ; then
383383
OPENJ9_PLATFORM_CODE=oa64
384-
if test "x$ENABLE_MIXED_REFERENCES" = xfalse ; then
384+
if test "x$OPENJ9_ENABLE_MIXED_REFERENCES" = xfalse ; then
385385
if test "x$OPENJ9_LIBS_SUBDIR" = xdefault ; then
386386
OPENJ9_BUILDSPEC=osx_x86-64
387387
else
@@ -395,7 +395,7 @@ AC_DEFUN([OPENJ9_PLATFORM_SETUP],
395395
fi
396396
elif test "x$OPENJ9_CPU" = xppc-64_le ; then
397397
OPENJ9_PLATFORM_CODE=xl64
398-
if test "x$ENABLE_MIXED_REFERENCES" = xfalse ; then
398+
if test "x$OPENJ9_ENABLE_MIXED_REFERENCES" = xfalse ; then
399399
if test "x$OPENJ9_LIBS_SUBDIR" != xdefault ; then
400400
OPENJ9_BUILDSPEC="${OPENJDK_BUILD_OS}_ppc-64_cmprssptrs_le"
401401
fi
@@ -428,6 +428,7 @@ AC_DEFUN([OPENJ9_PLATFORM_SETUP],
428428
AC_SUBST(OPENJ9_PLATFORM_CODE)
429429
AC_SUBST(COMPILER_VERSION_STRING)
430430
AC_SUBST(OPENJ9_LIBS_SUBDIR)
431+
AC_SUBST(OPENJ9_ENABLE_MIXED_REFERENCES)
431432
])
432433

433434
AC_DEFUN([OPENJ9_CHECK_NASM_VERSION],

closed/autoconf/custom-spec.gmk.in

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ OPENJ9_PLATFORM_CODE := @OPENJ9_PLATFORM_CODE@
8585

8686
OPENJ9_LIBS_SUBDIR := @OPENJ9_LIBS_SUBDIR@
8787

88+
# Mixed References Mode
89+
OPENJ9_ENABLE_MIXED_REFERENCES := @OPENJ9_ENABLE_MIXED_REFERENCES@
90+
8891
# Export autoconf cache variables for CC/CXX.
8992
# This is for the case where ccache is enabled.
9093
# It ensures that OMR autoconf uses the compiler, not ccache.

closed/custom/copy/Copy-java.base.gmk

+14-4
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,23 @@ $(call openj9_copy_files_and_debuginfos, \
5959
# CPU targets without JIT support.
6060
NO_JIT_CPUS := riscv64
6161

62+
# Decide which GC lib(s) to copy
63+
POINTER_MODE := mixed
64+
ifeq (false,$(OPENJ9_ENABLE_MIXED_REFERENCES))
65+
ifeq (compressedrefs,$(OPENJ9_LIBS_SUBDIR))
66+
POINTER_MODE := compressed
67+
else
68+
POINTER_MODE := full
69+
endif
70+
endif
71+
6272
$(call openj9_copy_shlibs, \
6373
$(if $(filter zos,$(OPENJDK_TARGET_OS)),j9a2e) \
6474
j9dmp29 \
65-
j9gc29 \
66-
j9gc_full29 \
67-
j9gcchk29 \
68-
j9gcchk_full29 \
75+
$(if $(filter compressed mixed,$(POINTER_MODE)),j9gc29) \
76+
$(if $(filter full mixed,$(POINTER_MODE)),j9gc_full29) \
77+
$(if $(filter compressed mixed,$(POINTER_MODE)),j9gcchk29) \
78+
$(if $(filter full mixed,$(POINTER_MODE)),j9gcchk_full29) \
6979
j9hookable29 \
7080
$(if $(filter zos,$(OPENJDK_TARGET_OS)),j9ifa29) \
7181
$(if $(filter $(NO_JIT_CPUS),$(OPENJDK_TARGET_CPU)),,j9jit29) \

0 commit comments

Comments
 (0)