RFR: 8327701: Remove the xlc toolchain

Magnus Ihse Bursie ihse at openjdk.org
Fri Mar 8 15:37:02 UTC 2024


On Fri, 8 Mar 2024 15:29:58 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

> As of [JDK-8325880](https://bugs.openjdk.org/browse/JDK-8325880), building the JDK requires version 17 of IBM Open XL C/C++ (xlc). This is in effect clang by another name, and it uses the clang toolchain in the JDK build. Thus the old xlc toolchain is no longer supported, and should be removed.

make/autoconf/flags-cflags.m4 line 687:

> 685:     PICFLAG="-fPIC"
> 686:     PIEFLAG="-fPIE"
> 687:   elif test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then

Just a remark: This code has never been executed, since running with clang on any OS would hit the branch above. Also, the code is syntactically incorrect, missing a trailing `"`.

make/autoconf/flags-cflags.m4 line 695:

> 693:       -D$FLAGS_CPU_LEGACY"
> 694: 
> 695:   if test "x$FLAGS_CPU_BITS" = x64; then

A wise man said: "If the code and the comments contradict each other, then probably both are wrong".

I am here assuming that the comment claiming that this is only needed by xlc is correct. If it turns out that this is needed even with clang on AIX, we'll have to restore the test and update the comment to this fact.

make/autoconf/flags.m4 line 324:

> 322: AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
> 323: [
> 324:   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output

COMPILER_TARGET_BITS_FLAG and COMPILER_BINDCMD_FILE_FLAG was introduced just for xlc, so they are not needed anymore. COMPILER_COMMAND_FILE_FLAG was introduced to support ancient versions of gcc, and then used by xlc as well. It is not needed for gcc anymore, so I remove it.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18172#discussion_r1517871818
PR Review Comment: https://git.openjdk.org/jdk/pull/18172#discussion_r1517873282
PR Review Comment: https://git.openjdk.org/jdk/pull/18172#discussion_r1517874782


More information about the core-libs-dev mailing list