RFR: JDK-8307349: Support xlc17 clang toolchain on AIX

Erik Joelsson erikj at openjdk.org
Wed May 10 13:03:27 UTC 2023


On Wed, 10 May 2023 11:01:24 GMT, JoKern65 <duke at openjdk.org> wrote:

> The new xlc17 compiler should be supported to build OpenJDK on AIX. This compiler, compared to the currently supported xlc16, has a significantly more recent clang (xlc 17.1.1 uses clang 15) included.
> 1. Because the frontend interface of the new compiler (c-flags, Ld-Flags) has changed from an xlc to a clang interface we decided to use the clang toolchain for the new xlc17 compiler.
> 2. Unfortunately, the system headers are mainly unchanged, so they do not harmonize with the src/hotspot/share/utilities/globalDefinitions_gcc.hpp which would be used if we totally switch to clang toolchain. So we keep the HOTSPOT_TOOLCHAIN_TYPE=xlc
> 3. In src/hotspot/share/utilities/globalDefinitions_xlc.hpp we introduce a new define AIX_XLC_GE_17 which is set if we build with the new xlc17 on AIX. This define will be used in following PRs.

Looks ok, just some whitespace suggestions.

make/autoconf/flags-ldflags.m4 line 95:

> 93:   fi
> 94: 
> 95:   if (test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang) && test "x$OPENJDK_TARGET_OS" != xaix; then

Suggestion:

  if (test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang) \
      && test "x$OPENJDK_TARGET_OS" != xaix; then

make/hotspot/lib/JvmOverrideFiles.gmk line 116:

> 114:   else
> 115:    BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -qnoinline
> 116:   endif

Suggestion:

  ifeq ($(TOOLCHAIN_TYPE), clang)
    BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -fno-inline
  else
    BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -qnoinline
  endif

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

Marked as reviewed by erikj (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13898#pullrequestreview-1420576356
PR Review Comment: https://git.openjdk.org/jdk/pull/13898#discussion_r1189867146
PR Review Comment: https://git.openjdk.org/jdk/pull/13898#discussion_r1189874551


More information about the hotspot-dev mailing list