2323# questions.
2424#
2525
26- # ===========================================================================
27- # (c) Copyright IBM Corp. 2025, 2025 All Rights Reserved
28- # ===========================================================================
29-
3026# ###############################################################################
3127#
3228# Setup flags for C/C++ compiler
@@ -56,9 +52,6 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
5652 SHARED_LIBRARY_FLAGS='-shared'
5753 fi
5854
59- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
60- SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
61-
6255 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
6356 SHARED_LIBRARY_FLAGS="-dll"
6457 fi
@@ -122,8 +115,6 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
122115
123116 CFLAGS_DEBUG_SYMBOLS="-g ${GDWARF_FLAGS}"
124117 ASFLAGS_DEBUG_SYMBOLS="-g"
125- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
126- CFLAGS_DEBUG_SYMBOLS="-g1"
127118 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
128119 CFLAGS_DEBUG_SYMBOLS="-Z7"
129120 fi
@@ -189,11 +180,7 @@ AC_DEFUN([DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS],
189180AC_DEFUN ( [ FLAGS_SETUP_WARNINGS] ,
190181[
191182 # Set default value.
192- if test "x$TOOLCHAIN_TYPE" != xxlc; then
193- WARNINGS_AS_ERRORS_DEFAULT=true
194- else
195- WARNINGS_AS_ERRORS_DEFAULT=false
196- fi
183+ WARNINGS_AS_ERRORS_DEFAULT=true
197184
198185 UTIL_ARG_ENABLE(NAME: warnings-as-errors, DEFAULT: $WARNINGS_AS_ERRORS_DEFAULT,
199186 RESULT: WARNINGS_AS_ERRORS,
@@ -248,15 +235,6 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
248235 # false positives.
249236 DISABLED_WARNINGS="unknown-warning-option unused-parameter"
250237 ;;
251-
252- xlc)
253- DISABLE_WARNING_PREFIX="-Wno-"
254- CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
255-
256- # Possibly a better subset than "all" is "lan:trx:ret:zea:cmp:ret"
257- WARNINGS_ENABLE_ALL="-qinfo=all -qformat=all"
258- DISABLED_WARNINGS=""
259- ;;
260238 esac
261239 AC_SUBST ( DISABLE_WARNING_PREFIX )
262240 AC_SUBST ( BUILD_CC_DISABLE_WARNING_PREFIX )
@@ -330,15 +308,6 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
330308 C_O_FLAG_DEBUG_JVM="${C_O_FLAG_DEBUG_JVM} ${DISABLE_FORTIFY_CFLAGS}"
331309 C_O_FLAG_NONE="${C_O_FLAG_NONE} ${DISABLE_FORTIFY_CFLAGS}"
332310 fi
333- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
334- C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
335- C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
336- C_O_FLAG_HI="-O3 -qinline -qinlglue"
337- C_O_FLAG_NORM="-O2"
338- C_O_FLAG_DEBUG="-qnoopt"
339- # FIXME: Value below not verified.
340- C_O_FLAG_DEBUG_JVM=""
341- C_O_FLAG_NONE="-qnoopt"
342311 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
343312 C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
344313 C_O_FLAG_HIGHEST="-O2"
@@ -482,13 +451,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
482451 else
483452 DEBUG_CFLAGS_JDK="-DDEBUG"
484453
485- if test "x$TOOLCHAIN_TYPE" = xxlc; then
486- # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
487- # Hotspot now overflows its 64K TOC (currently only for debug),
488- # so for debug we build with '-qpic=large -bbigtoc'.
489- DEBUG_CFLAGS_JVM="-qpic=large"
490- fi
491-
492454 if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang ; then
493455 INIT_PATTERN_FLAG="-ftrivial-auto-var-init=pattern"
494456 FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ $INIT_PATTERN_FLAG] ,
@@ -515,9 +477,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
515477 ALWAYS_DEFINES_JVM="-D_GNU_SOURCE -D_REENTRANT"
516478 elif test "x$TOOLCHAIN_TYPE" = xclang; then
517479 ALWAYS_DEFINES_JVM="-D_GNU_SOURCE"
518- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
519- ALWAYS_DEFINES_JVM="-D_REENTRANT"
520- ALWAYS_DEFINES_JDK="-D_GNU_SOURCE -D_REENTRANT -DSTDC"
521480 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
522481 # _WIN32_WINNT=0x0602 means access APIs for Windows 8 and above. See
523482 # https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
@@ -582,12 +541,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
582541
583542 TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -fvisibility=hidden -fstack-protector"
584543
585- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
586- # Suggested additions: -qsrcmsg to get improved error reporting
587- # set -qtbtable=full for a better traceback table/better stacks in hs_err when xlc16 is used
588- TOOLCHAIN_CFLAGS_JDK="-qtbtable=full -qchars=signed -qfullpath -qsaveopt -qstackprotect" # add on both CFLAGS
589- TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced -fno-exceptions \
590- -qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect"
591544 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
592545 TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -MP"
593546 TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -Zc:wchar_t-"
@@ -604,7 +557,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
604557 TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK $CHARSET_CFLAGS"
605558
606559 # CFLAGS C language level for JDK sources (hotspot only uses C++)
607- if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc ; then
560+ if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
608561 LANGSTD_CFLAGS="-std=c11"
609562 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
610563 LANGSTD_CFLAGS="-std:c11"
@@ -616,8 +569,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
616569 LANGSTD_CXXFLAGS="-std=c++17"
617570 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
618571 LANGSTD_CXXFLAGS="-std:c++17"
619- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
620- LANGSTD_CXXFLAGS="-std=c++14"
621572 else
622573 AC_MSG_ERROR ( [ Cannot enable C++17 for this toolchain] )
623574 fi
@@ -638,8 +589,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
638589 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
639590 WARNING_CFLAGS="$WARNINGS_ENABLE_ALL"
640591
641- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
642- WARNING_CFLAGS="" # currently left empty
643592 fi
644593
645594 # Set some additional per-OS defines.
@@ -664,31 +613,16 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
664613 if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
665614 PICFLAG="-fPIC"
666615 PIEFLAG="-fPIE"
667- elif test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
668- JVM_PICFLAG="-fpic -mcmodel=large -Wl,-bbigtoc
669- JDK_PICFLAG="-fpic
670- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
671- # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
672- # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
673- # will have to patch this single instruction with a call to some out-of-order code which
674- # does the load from the TOC. This is of course slower, and we also would have
675- # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
676- # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
677- # can be patched directly by the linker and does not require a jump to out-of-order code.
678- #
679- # Since large TOC causes perf. overhead, only pay it where we must. Currently this is
680- # for all libjvm variants (both gtest and normal) but no other binaries. So, build
681- # libjvm with -qpic=large and link with -bbigtoc.
682- JVM_PICFLAG="-qpic=large"
683- JDK_PICFLAG="-qpic"
684616 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
685617 PICFLAG=""
686618 fi
687619
688- if test "x$TOOLCHAIN_TYPE" != xxlc; then
620+ if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
621+ JVM_PICFLAG="-fpic -mcmodel=large"
622+ else
689623 JVM_PICFLAG="$PICFLAG"
690- JDK_PICFLAG="$PICFLAG"
691624 fi
625+ JDK_PICFLAG="$PICFLAG"
692626
693627 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
694628 # Linking is different on macOS
@@ -718,8 +652,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
718652 $1 _DEFINES_CPU_JDK="${$1 _DEFINES_CPU_JDK} -DARCH='\"$FLAGS_CPU_LEGACY\"' \
719653 -D$FLAGS_CPU_LEGACY"
720654
721- if test "x$FLAGS_CPU_BITS" = x64 && test "x$FLAGS_OS" != xaix; then
722- # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
655+ if test "x$FLAGS_CPU_BITS" = x64; then
723656 $1 _DEFINES_CPU_JDK="${$1 _DEFINES_CPU_JDK} -D_LP64=1"
724657 $1 _DEFINES_CPU_JVM="${$1 _DEFINES_CPU_JVM} -D_LP64=1"
725658 fi
@@ -809,11 +742,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
809742 $1 _CFLAGS_CPU="-mcpu=pwr8"
810743 fi
811744
812- elif test "x$TOOLCHAIN_TYPE" = xxlc; then
813- if test "x$FLAGS_CPU" = xppc64; then
814- $1 _CFLAGS_CPU_JVM="-qarch=ppc64"
815- fi
816-
817745 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
818746 if test "x$FLAGS_CPU" = xx86; then
819747 $1 _CFLAGS_CPU_JVM="-arch:IA32"
0 commit comments