From 745bfad078719154819edab03eac28864c573bc7 Mon Sep 17 00:00:00 2001 From: Violeta Sebe Date: Thu, 18 Apr 2019 13:58:59 -0400 Subject: [PATCH] Enable XLC 16.1 Clang-based toolchain for AIX platforms - replace -qlanglvl=extended with -qlanglvl=extended0x - remove unsupported options: -qinfo, -qmbcs, -qnotempinc - add -qxlcompatmacros -fno-rtti -fno-exceptions options to C/C++ flags - add -qlanglvl=extc99 option to *.spp rule compilation - set xlclang++ as linker - add xlc 16 to path and set environment variables for pipelines for JDK 13 and next [ci skip] Signed-off-by: Violeta Sebe --- buildenv/jenkins/variables/defaults.yml | 4 ++-- buildspecs/aix_ppc-64.spec | 4 ++-- buildspecs/aix_ppc-64_cmprssptrs.spec | 4 ++-- buildspecs/aix_ppc.spec | 4 ++-- .../compiler/build/toolcfg/aix-xlc/common.mk | 16 +++++++++++++-- .../configure_includes/configure_aix_ppc.mk | 2 +- runtime/makelib/targets.mk.aix.inc.ftl | 20 +++++++++++++++++-- 7 files changed, 41 insertions(+), 13 deletions(-) diff --git a/buildenv/jenkins/variables/defaults.yml b/buildenv/jenkins/variables/defaults.yml index 2f8e29f8f89..ed073625b46 100644 --- a/buildenv/jenkins/variables/defaults.yml +++ b/buildenv/jenkins/variables/defaults.yml @@ -239,8 +239,8 @@ ppc64_aix: 8: 'PATH+XLC=/opt/IBM/xlC/13.1.3/bin:/opt/IBM/xlc/13.1.3/bin' 11: 'PATH+XLC=/opt/IBM/xlC/13.1.3/bin:/opt/IBM/xlc/13.1.3/bin' 12: 'PATH+XLC=/opt/IBM/xlC/13.1.3/bin:/opt/IBM/xlc/13.1.3/bin' - 13: 'PATH+XLC=/opt/IBM/xlC/13.1.3/bin:/opt/IBM/xlc/13.1.3/bin' - next: 'PATH+XLC=/opt/IBM/xlC/13.1.3/bin:/opt/IBM/xlc/13.1.3/bin' + 13: 'PATH+XLC=/opt/IBM/xlC/16.1.0/bin:/opt/IBM/xlc/16.1.0/bin CC=xlclang CXX=xlclang++' + next: 'PATH+XLC=/opt/IBM/xlC/16.1.0/bin:/opt/IBM/xlc/16.1.0/bin CC=xlclang CXX=xlclang++' excluded_tests: 8: ? special.system diff --git a/buildspecs/aix_ppc-64.spec b/buildspecs/aix_ppc-64.spec index b6e94d78d77..3aa8421b2ab 100644 --- a/buildspecs/aix_ppc-64.spec +++ b/buildspecs/aix_ppc-64.spec @@ -93,8 +93,8 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti - - + + diff --git a/buildspecs/aix_ppc-64_cmprssptrs.spec b/buildspecs/aix_ppc-64_cmprssptrs.spec index 6bf5521eeea..26167f1e640 100644 --- a/buildspecs/aix_ppc-64_cmprssptrs.spec +++ b/buildspecs/aix_ppc-64_cmprssptrs.spec @@ -91,8 +91,8 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti - - + + diff --git a/buildspecs/aix_ppc.spec b/buildspecs/aix_ppc.spec index 92e4381d13a..dc7553f9431 100644 --- a/buildspecs/aix_ppc.spec +++ b/buildspecs/aix_ppc.spec @@ -93,8 +93,8 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti - - + + diff --git a/runtime/compiler/build/toolcfg/aix-xlc/common.mk b/runtime/compiler/build/toolcfg/aix-xlc/common.mk index c8318883d5f..db48eebbcf7 100644 --- a/runtime/compiler/build/toolcfg/aix-xlc/common.mk +++ b/runtime/compiler/build/toolcfg/aix-xlc/common.mk @@ -71,9 +71,7 @@ CX_DEFINES+=\ CX_FLAGS+=\ -qarch=$(CX_ARCH) \ -qtls \ - -qnotempinc \ -qenum=small \ - -qmbcs \ -qlanglvl=extended0x \ -qfuncsect \ -qsuppress=1540-1087:1540-1088:1540-1090:1540-029:1500-029 \ @@ -114,6 +112,20 @@ ifeq ($(BUILD_CONFIG),prod) CX_FLAGS+=$(CX_FLAGS_PROD) endif +ifeq (,$(findstring xlclang,$(notdir $(CC)))) + # xlc options + CX_FLAGS+=-qnotempinc -qmbcs +else + # xlclang + CX_FLAGS+=-qxlcompatmacros + SPP_FLAGS+=-qlanglvl=extc99 +endif + +ifneq (,$(findstring xlclang++,$(notdir $(CXX)))) + # xlclang++ options + CXX_FLAGS+=-fno-rtti +endif + C_CMD?=$(CC) C_INCLUDES=$(PRODUCT_INCLUDES) C_DEFINES+=$(CX_DEFINES) $(CX_DEFINES_EXTRA) $(C_DEFINES_EXTRA) diff --git a/runtime/gc_glue_java/configure_includes/configure_aix_ppc.mk b/runtime/gc_glue_java/configure_includes/configure_aix_ppc.mk index 8a32208bcb3..c229f27dd3e 100644 --- a/runtime/gc_glue_java/configure_includes/configure_aix_ppc.mk +++ b/runtime/gc_glue_java/configure_includes/configure_aix_ppc.mk @@ -110,7 +110,7 @@ CONFIGURE_ARGS += 'CC=$(CC)' CONFIGURE_ARGS += 'CXX=$(CXX)' CONFIGURE_ARGS += 'CCLINKEXE=$$(CC)' CONFIGURE_ARGS += 'CCLINKSHARED=ld' -CONFIGURE_ARGS += 'CXXLINKEXE=$$(CC)' +CONFIGURE_ARGS += 'CXXLINKEXE=$$(CXX)' CONFIGURE_ARGS += 'CXXLINKSHARED=makeC++SharedLib_r' CONFIGURE_ARGS += 'AR=$(AR)' diff --git a/runtime/makelib/targets.mk.aix.inc.ftl b/runtime/makelib/targets.mk.aix.inc.ftl index 3ee53d1c347..32d4d8ee675 100644 --- a/runtime/makelib/targets.mk.aix.inc.ftl +++ b/runtime/makelib/targets.mk.aix.inc.ftl @@ -92,7 +92,15 @@ ifdef I5_VERSION else CFLAGS += -s $(UMA_CC_MODE) endif -CFLAGS += -q mbcs -qlanglvl=extended -qarch=ppc -qinfo=pro -qalias=noansi -qxflag=LTOL:LTOL0 -qsuppress=1506-1108 + +ifeq (,$(findstring xlclang,$(notdir $(CC)))) + # xlc options + CFLAGS += -q mbcs -qlanglvl=extended -qinfo=pro +else + # xlclang options + CFLAGS += -qlanglvl=extended0x -qxlcompatmacros +endif +CFLAGS += -qarch=ppc -qalias=noansi -qxflag=LTOL:LTOL0 -qsuppress=1506-1108 CFLAGS += -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE -DRS6000 -DAIXPPC -D_LARGE_FILES ifdef I5_VERSION @@ -100,7 +108,15 @@ ifdef I5_VERSION else CXXFLAGS += -s $(UMA_CC_MODE) endif -CXXFLAGS += -q mbcs -qlanglvl=extended -qarch=ppc -qinfo=pro -qalias=noansi -qxflag=LTOL:LTOL0 -qsuppress=1506-1108 + +ifeq (,$(findstring xlclang++,$(notdir $(CXX)))) + # xlc++ options + CXXFLAGS += -q mbcs -qlanglvl=extended -qinfo=pro +else + # xlclang++ options + CXXFLAGS += -qlanglvl=extended0x -qxlcompatmacros -fno-rtti -fno-exceptions +endif +CXXFLAGS += -qarch=ppc -qalias=noansi -qxflag=LTOL:LTOL0 -qsuppress=1506-1108 CXXFLAGS += -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE -DRS6000 -DAIXPPC -D_LARGE_FILES CPPFLAGS += -D_XOPEN_SOURCE_EXTENDED=1 -D_ALL_SOURCE -DRS6000 -DAIXPPC -D_LARGE_FILES