From c1b692af131a0a3f950f8b2f3e7c81418ba8afef Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 22 Aug 2016 08:53:01 -0400 Subject: [PATCH] Fix SunCC 12.2 compile error --- GNUmakefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 908d8f84..0f8586c6 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -38,7 +38,8 @@ MACPORTS_COMPILER := $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "macports") # Sun Studio 12.0 (0x0510) and 12.3 (0x0512) SUNCC_120_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[0-9]|5\.[2-9]|6\.)") SUNCC_122_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[1-9]|5\.[2-9]|6\.)") -SUNCC_123_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[2-9]|5\.[2-9]|6\.)") +SUNCC_123_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[3-9]|5\.[2-9]|6\.)") +SUNCC_124_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[4-9]|5\.[2-9]|6\.)") HAS_SOLIB_VERSION := $(IS_LINUX) @@ -284,9 +285,12 @@ endif ifneq ($(SUN_COMPILER),0) # override flags for CC Sun C++ compiler IS_64 := $(shell isainfo -b 2>/dev/null | grep -i -c "64") ifeq ($(IS_64),1) -CXXFLAGS += -native -m64 +CXXFLAGS += -m64 else ifeq ($(IS_64),0) -CXXFLAGS += -native -m32 +CXXFLAGS += -m32 +endif +ifneq ($(SUNCC_124_OR_LATER),0) +CXXFLAGS += -native endif # Add for non-i386 ifneq ($(IS_X86),1)