Fix SunCC 12.2 compile error

This commit is contained in:
Jeffrey Walton 2016-08-22 08:53:01 -04:00
parent 83b8d51487
commit c1b692af13

View File

@ -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)