Skip to content
Permalink
Browse files
8218965: aix: support xlclang++ in the compiler detection
Reviewed-by: mdoerr
Backport-of: d9463e6
  • Loading branch information
backwaterred authored and TheRealMDoerr committed Apr 5, 2022
1 parent f42e3d2 commit 061c08348a4babe66ce1d5481b6c5d34e752c4cc
Showing 2 changed files with 27 additions and 1 deletion.
@@ -121,7 +121,11 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
# -g0 enables debug symbols without disabling inlining.
CFLAGS_DEBUG_SYMBOLS="-g0 -xs"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
CFLAGS_DEBUG_SYMBOLS="-g"
if test "x$XLC_USES_CLANG" = xtrue; then
CFLAGS_DEBUG_SYMBOLS="-g1"
else
CFLAGS_DEBUG_SYMBOLS="-g"
fi
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
CFLAGS_DEBUG_SYMBOLS="-Z7 -d2Zi+"
fi
@@ -278,6 +278,20 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
fi
AC_SUBST(TOOLCHAIN_TYPE)
# on AIX, check for xlclang++ on the PATH and TOOLCHAIN_PATH and use it if it is available
if test "x$OPENJDK_TARGET_OS" = xaix; then
if test "x$TOOLCHAIN_PATH" != x; then
XLC_TEST_PATH=${TOOLCHAIN_PATH}/
fi
XLCLANG_VERSION_OUTPUT=`${XLC_TEST_PATH}xlclang++ -qversion 2>&1 | $HEAD -n 1`
$ECHO "$XLCLANG_VERSION_OUTPUT" | $GREP "IBM XL C/C++ for AIX" > /dev/null
if test $? -eq 0; then
AC_MSG_NOTICE([xlclang++ output: $XLCLANG_VERSION_OUTPUT])
XLC_USES_CLANG=true
fi
fi
TOOLCHAIN_CC_BINARY_clang="clang"
TOOLCHAIN_CC_BINARY_gcc="gcc"
TOOLCHAIN_CC_BINARY_microsoft="cl"
@@ -290,6 +304,14 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
TOOLCHAIN_CXX_BINARY_solstudio="CC"
TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
if test "x$OPENJDK_TARGET_OS" = xaix; then
if test "x$XLC_USES_CLANG" = xtrue; then
AC_MSG_NOTICE([xlclang++ detected, using it])
TOOLCHAIN_CC_BINARY_xlc="xlclang"
TOOLCHAIN_CXX_BINARY_xlc="xlclang++"
fi
fi
# Use indirect variable referencing
toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}

1 comment on commit 061c083

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 061c083 Apr 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.