Skip to content

Commit

Permalink
Replace OMR_ENV_OPENXL with OMR_TOOLCHAIN=openxl
Browse files Browse the repository at this point in the history
The environment variable OMR_ENV_OPENXL was created in a previous
contribution to indicate if the C/C++ compiler being used was OpenXL.
However, this can be done in a way that remains consistent to other
platforms by using the already existing OMR_TOOLCHAIN variable instead.

Signed-off-by: midronij <[email protected]>
  • Loading branch information
midronij committed Jan 15, 2025
1 parent b7d59c7 commit 667ba48
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions runtime/gc_glue_java/configure_includes/configure_aix_ppc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ CONFIGURE_ARGS += 'AR=$(AR)'
CONFIGURE_ARGS += 'OMR_HOST_OS=aix'
CONFIGURE_ARGS += 'OMR_HOST_ARCH=ppc'
CONFIGURE_ARGS += 'OMR_TARGET_DATASIZE=$(TEMP_TARGET_DATASIZE)'
CONFIGURE_ARGS += 'OMR_TOOLCHAIN=xlc'
ifeq ($(OMR_ENV_OPENXL),1)

ifneq (,$(findstring ibm-clang,$(notdir $(CC))))
CONFIGURE_ARGS += 'OMR_TOOLCHAIN=openxl'
CONFIGURE_ARGS += 'GLOBAL_CFLAGS=-fstack-protector'
CONFIGURE_ARGS += 'GLOBAL_CXXFLAGS=-fstack-protector'
else
CONFIGURE_ARGS += 'OMR_TOOLCHAIN=xlc'
CONFIGURE_ARGS += 'GLOBAL_CFLAGS=-qstackprotect'
CONFIGURE_ARGS += 'GLOBAL_CXXFLAGS=-qstackprotect'
endif
14 changes: 7 additions & 7 deletions runtime/makelib/targets.mk.aix.inc.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ endif
ifeq ($(j9vm_env_data64),1)
UMA_ASPP_DEBUG += -g
UMA_LIB_LINKER_FLAGS += -X64
ifeq ($(OMR_ENV_OPENXL),1)
ifeq (openxl,$(OMR_TOOLCHAIN))
UMA_CC_MODE += -m64
else
UMA_CC_MODE += -q64
Expand Down Expand Up @@ -102,7 +102,7 @@ else
endif

ifeq (,$(findstring xlclang,$(notdir $(CC))))
ifeq ($(OMR_ENV_OPENXL),1)
ifeq (openxl,$(OMR_TOOLCHAIN))
# for openxl do nothing
else
# xlc options
Expand All @@ -112,7 +112,7 @@ else
# xlclang options
CFLAGS += -qxlcompatmacros
endif
ifeq ($(OMR_ENV_OPENXL),1)
ifeq (openxl,$(OMR_TOOLCHAIN))
#openxl options
CFLAGS += -std=c89 -qarch=ppc -fno-strict-aliasing -fstack-protector
else
Expand All @@ -127,7 +127,7 @@ else
endif

ifeq (,$(findstring xlclang++,$(notdir $(CXX))))
ifeq ($(OMR_ENV_OPENXL),1)
ifeq (openxl,$(OMR_TOOLCHAIN))
# openxl options
CXXFLAGS += -fno-rtti -fno-exceptions
else
Expand All @@ -138,7 +138,7 @@ else
# xlclang++ options
CXXFLAGS += -qxlcompatmacros -fno-rtti -fno-exceptions
endif
ifeq ($(OMR_ENV_OPENXL),1)
ifeq (openxl,$(OMR_TOOLCHAIN))
# openxl options
CXXFLAGS += -std=c++11 -qarch=ppc -fno-strict-aliasing -fstack-protector
else
Expand Down Expand Up @@ -166,7 +166,7 @@ endif
UMA_SYS_LINK_PATH := -L/usr/lib/threads

ifeq ($(j9vm_env_data64),1)
ifeq ($(OMR_ENV_OPENXL),1)
ifeq (openxl,$(OMR_TOOLCHAIN))
UMA_DLL_LINK_FLAGS += -m64
else
UMA_DLL_LINK_FLAGS += -q64
Expand Down Expand Up @@ -205,7 +205,7 @@ $(patsubst %.s,%.o,$(filter %.s,$(UMA_FILES_TO_PREPROCESS))) : %$(UMA_DOT_O) : %

ifdef UMA_TREAT_WARNINGS_AS_ERRORS
ifndef UMA_SUPPRESS_WARNINGS_AS_ERRORS
ifeq ($(OMR_ENV_OPENXL),1)
ifeq (openxl,$(OMR_TOOLCHAIN))
CFLAGS += -Werror
CXXFLAGS += -Werror
else
Expand Down

0 comments on commit 667ba48

Please sign in to comment.