Reduce IBM XL C/C++ compiler to -O2

Early versions of IBM XL C/C++ for AIX, V13.1 fail some self tests, like TEA and XTEA
pull/507/head
Jeffrey Walton 2017-09-09 17:22:42 -04:00
parent e6f19111e0
commit ba569b55ca
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 16 additions and 11 deletions

View File

@ -332,6 +332,22 @@ ifeq ($(IS_ARMV8),1)
endif
endif
# PowerPC and PowerPC-64
ifeq ($(XLC_COMPILER),1)
# http://www-01.ibm.com/support/docview.wss?uid=swg21007500
ifeq ($(findstring -qrtti,$(CXXFLAGS)),)
CXXFLAGS += -qrtti
endif
# -fPIC causes link errors dues to unknown option
ifneq ($(findstring -fPIC,$(CXXFLAGS)),)
CXXFLAGS := $(CXXFLAGS:-fPIC=-qpic)
endif
# Warnings and intermittent failures on early IBM XL C/C++
ifneq ($(findstring -O3,$(CXXFLAGS)),)
CXXFLAGS := $(CXXFLAGS:-O3=-O2)
endif
endif
endif # IS_X86
###########################################################
@ -352,17 +368,6 @@ ifeq ($(XLC_COMPILER)$(IS_ARM32),00)
endif
endif
ifeq ($(XLC_COMPILER),1)
# http://www-01.ibm.com/support/docview.wss?uid=swg21007500
ifeq ($(findstring -qrtti,$(CXXFLAGS)),)
CXXFLAGS += -qrtti
endif
# -fPIC causes link errors dues to unknown option
ifneq ($(findstring -fPIC,$(CXXFLAGS)),)
CXXFLAGS := $(CXXFLAGS:-fPIC=-qpic)
endif
endif
# For SunOS, create a Mapfile that allows our object files
# to contain additional bits (like SSE4 and AES on old Xeon)
# http://www.oracle.com/technetwork/server-storage/solaris/hwcap-modification-139536.html