@@ -54,7 +54,7 @@ AC_DEFUN([OPENJ9_CONFIGURE_CMAKE],
54
54
[
55
55
AC_ARG_WITH ( cmake , [ AS_HELP_STRING ( [ --with-cmake] , [ enable building openJ9 with CMake] ) ] ,
56
56
[
57
- if test "x$with_cmake" == xyes -o "x$with_cmake" = = x ; then
57
+ if test "x$with_cmake" = xyes -o "x$with_cmake" = x ; then
58
58
with_cmake=cmake
59
59
fi
60
60
] ,
@@ -75,6 +75,11 @@ AC_DEFUN([OPENJ9_CONFIGURE_CMAKE],
75
75
# at this point with_cmake should either be no, or the name of the cmake command
76
76
if test "x$with_cmake" = xno ; then
77
77
OPENJ9_ENABLE_CMAKE=false
78
+
79
+ # Currently, mixedrefs mode is only available with CMake enabled
80
+ if test "x$OMR_MIXED_REFERENCES_MODE" != xoff ; then
81
+ AC_MSG_ERROR ( [ [ --with-mixedrefs=[ static|dynamic] requires --with-cmake] ] )
82
+ fi
78
83
else
79
84
OPENJ9_ENABLE_CMAKE=true
80
85
if AS_EXECUTABLE_P([ "$with_cmake"] ) ; then
@@ -342,70 +347,87 @@ AC_DEFUN([OPENJ9_PLATFORM_SETUP],
342
347
AC_ARG_WITH ( noncompressedrefs , [ AS_HELP_STRING ( [ --with-noncompressedrefs] ,
343
348
[ build non-compressedrefs vm (large heap)] ) ] )
344
349
350
+ AC_ARG_WITH ( mixedrefs , [ AS_HELP_STRING ( [ --with-mixedrefs] ,
351
+ [ build mixedrefs vm (--with-mixedrefs=static or --with-mixedrefs=dynamic)] ) ] )
352
+
345
353
# When compiling natively host_cpu and build_cpu are the same. But when
346
354
# cross compiling we need to work with the host_cpu (which is where the final
347
355
# JVM will run).
348
356
OPENJ9_PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
349
357
350
- if test "x$with_noncompressedrefs" = x ; then
351
- OPENJ9_BUILDSPEC="${OPENJDK_BUILD_OS}_${OPENJ9_CPU}_cmprssptrs"
352
- OPENJ9_LIBS_SUBDIR=compressedrefs
353
- else
354
- OPENJ9_BUILDSPEC="${OPENJDK_BUILD_OS}_${OPENJ9_CPU}"
358
+ # Default OPENJ9_BUILD_OS=OPENJDK_BUILD_OS, but override with OpenJ9 equivalent as appropriate
359
+ OPENJ9_BUILD_OS="${OPENJDK_BUILD_OS}"
360
+
361
+ OMR_MIXED_REFERENCES_MODE=off
362
+ if test "x$with_mixedrefs" != x -a "x$with_mixedrefs" != xno; then
363
+ if test "x$with_mixedrefs" = xyes -o "x$with_mixedrefs" = xstatic; then
364
+ OMR_MIXED_REFERENCES_MODE=static
365
+ elif test "x$with_mixedrefs" = xdynamic; then
366
+ OMR_MIXED_REFERENCES_MODE=dynamic
367
+ else
368
+ AC_MSG_ERROR ( [ OpenJ9 supports --with-mixedrefs=static and --with-mixedrefs=dynamic] )
369
+ fi
370
+ OPENJ9_BUILD_MODE_ARCH="${OPENJ9_CPU}_mxdptrs"
371
+ OPENJ9_LIBS_SUBDIR=default
372
+ elif test "x$with_noncompressedrefs" = xyes ; then
373
+ OPENJ9_BUILD_MODE_ARCH="${OPENJ9_CPU}"
355
374
OPENJ9_LIBS_SUBDIR=default
375
+ else
376
+ OPENJ9_BUILD_MODE_ARCH="${OPENJ9_CPU}_cmprssptrs"
377
+ OPENJ9_LIBS_SUBDIR=compressedrefs
356
378
fi
357
379
358
380
if test "x$OPENJ9_CPU" = xx86-64 ; then
359
- if test "x$OPENJDK_BUILD_OS " = xlinux ; then
381
+ if test "x$OPENJ9_BUILD_OS " = xlinux ; then
360
382
OPENJ9_PLATFORM_CODE=xa64
361
- elif test "x$OPENJDK_BUILD_OS " = xwindows ; then
383
+ elif test "x$OPENJ9_BUILD_OS " = xwindows ; then
362
384
OPENJ9_PLATFORM_CODE=wa64
363
- if test "x$OPENJ9_LIBS_SUBDIR" = xdefault ; then
364
- OPENJ9_BUILDSPEC=win_x86-64
365
- else
366
- OPENJ9_BUILDSPEC=win_x86-64_cmprssptrs
367
- fi
368
- elif test "x$OPENJDK_BUILD_OS" = xmacosx ; then
385
+ OPENJ9_BUILD_OS=win
386
+ elif test "x$OPENJ9_BUILD_OS" = xmacosx ; then
369
387
OPENJ9_PLATFORM_CODE=oa64
370
- if test "x$OPENJ9_LIBS_SUBDIR" = xdefault ; then
371
- OPENJ9_BUILDSPEC=osx_x86-64
372
- else
373
- OPENJ9_BUILDSPEC=osx_x86-64_cmprssptrs
374
- fi
388
+ OPENJ9_BUILD_OS=osx
375
389
else
376
- AC_MSG_ERROR ( [ Unsupported OpenJ9 platform ${OPENJDK_BUILD_OS }!] )
390
+ AC_MSG_ERROR ( [ Unsupported OpenJ9 platform ${OPENJ9_BUILD_OS }!] )
377
391
fi
378
392
elif test "x$OPENJ9_CPU" = xppc-64_le ; then
379
393
OPENJ9_PLATFORM_CODE=xl64
380
- if test "x$OPENJ9_LIBS_SUBDIR" != xdefault ; then
381
- OPENJ9_BUILDSPEC="${OPENJDK_BUILD_OS}_ppc-64_cmprssptrs_le"
394
+ if test "x$OMR_MIXED_REFERENCES_MODE" = xoff ; then
395
+ if test "x$OPENJ9_LIBS_SUBDIR" != xdefault ; then
396
+ OPENJ9_BUILD_MODE_ARCH="ppc-64_cmprssptrs_le"
397
+ fi
398
+ else
399
+ OPENJ9_BUILD_MODE_ARCH="ppc-64_mxdptrs_le"
382
400
fi
383
401
elif test "x$OPENJ9_CPU" = x390-64 ; then
384
402
OPENJ9_PLATFORM_CODE=xz64
385
403
elif test "x$OPENJ9_CPU" = xppc-64 ; then
386
404
OPENJ9_PLATFORM_CODE=ap64
387
405
elif test "x$OPENJ9_CPU" = xarm ; then
388
406
OPENJ9_PLATFORM_CODE=xr32
389
- OPENJ9_BUILDSPEC=linux_arm_linaro
407
+ OPENJ9_BUILD_OS=linux
408
+ OPENJ9_BUILD_MODE_ARCH=arm_linaro
390
409
OPENJ9_LIBS_SUBDIR=default
391
410
elif test "x$OPENJ9_CPU" = xaarch64 ; then
392
411
OPENJ9_PLATFORM_CODE=xr64
393
412
if test "x$COMPILE_TYPE" = xcross ; then
394
- OPENJ9_BUILDSPEC ="${OPENJ9_BUILDSPEC }_cross"
413
+ OPENJ9_BUILD_MODE_ARCH ="${OPENJ9_BUILD_MODE_ARCH }_cross"
395
414
fi
396
415
elif test "x$OPENJ9_CPU" = xriscv64 ; then
397
416
OPENJ9_PLATFORM_CODE=rv64
398
417
if test "x$COMPILE_TYPE" = xcross ; then
399
- OPENJ9_BUILDSPEC ="${OPENJ9_BUILDSPEC }_cross"
418
+ OPENJ9_BUILD_MODE_ARCH ="${OPENJ9_BUILD_MODE_ARCH }_cross"
400
419
fi
401
420
else
402
421
AC_MSG_ERROR ( [ Unsupported OpenJ9 cpu ${OPENJ9_CPU}!] )
403
422
fi
404
423
424
+ OPENJ9_BUILDSPEC="${OPENJ9_BUILD_OS}_${OPENJ9_BUILD_MODE_ARCH}"
425
+
405
426
AC_SUBST ( OPENJ9_BUILDSPEC )
406
427
AC_SUBST ( OPENJ9_PLATFORM_CODE )
407
428
AC_SUBST ( COMPILER_VERSION_STRING )
408
429
AC_SUBST ( OPENJ9_LIBS_SUBDIR )
430
+ AC_SUBST ( OMR_MIXED_REFERENCES_MODE )
409
431
] )
410
432
411
433
AC_DEFUN ( [ OPENJ9_CHECK_NASM_VERSION] ,
@@ -452,7 +474,7 @@ AC_DEFUN([OPENJ9_THIRD_PARTY_REQUIREMENTS],
452
474
FREEMARKER_JAR=
453
475
if test "x$OPENJ9_ENABLE_CMAKE" != xtrue ; then
454
476
AC_MSG_CHECKING ( [ that freemarker location is set] )
455
- if test "x$with_freemarker_jar" == x -o "x$with_freemarker_jar" = = xno ; then
477
+ if test "x$with_freemarker_jar" = x -o "x$with_freemarker_jar" = xno ; then
456
478
AC_MSG_RESULT ( [ no] )
457
479
printf "\n"
458
480
printf "The FreeMarker library is required to build the OpenJ9 build tools\n"
0 commit comments