From ba569b55cab52881a4f9c10c97d9ed670a571e45 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 9 Sep 2017 17:22:42 -0400 Subject: [PATCH] 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 --- GNUmakefile | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index dfc9f69a..3d560661 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -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