Add -xarch options to linker flags (Issue 472)

Also see https://docs.oracle.com/cd/E19205-01/819-5267/bkabt/index.html
pull/477/head
Jeffrey Walton 2017-08-28 17:51:59 -04:00
parent a3b035b6a8
commit 76c4d6e9fa
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 4 additions and 3 deletions

View File

@ -225,20 +225,24 @@ ifeq ($(SUN_COMPILER),1)
ifeq ($(COUNT),0) ifeq ($(COUNT),0)
SSSE3_FLAG = -xarch=ssse3 -D__SSSE3__=1 SSSE3_FLAG = -xarch=ssse3 -D__SSSE3__=1
ARIA_FLAG = -xarch=ssse3 -D__SSSE3__=1 ARIA_FLAG = -xarch=ssse3 -D__SSSE3__=1
LDFLAGS += -xarch=ssse3
endif endif
COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=sse4_2 -xdumpmacros /dev/null 2>&1 | $(EGREP) -i -c "illegal value ignored") COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=sse4_2 -xdumpmacros /dev/null 2>&1 | $(EGREP) -i -c "illegal value ignored")
ifeq ($(COUNT),0) ifeq ($(COUNT),0)
BLAKE2_FLAG = -xarch=sse4_2 -D__SSE4_2__=1 BLAKE2_FLAG = -xarch=sse4_2 -D__SSE4_2__=1
CRC_FLAG = -xarch=sse4_2 -D__SSE4_2__=1 CRC_FLAG = -xarch=sse4_2 -D__SSE4_2__=1
LDFLAGS += -xarch=sse4_2
endif endif
COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=aes -xdumpmacros /dev/null 2>&1 | $(EGREP) -i -c "illegal value ignored") COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=aes -xdumpmacros /dev/null 2>&1 | $(EGREP) -i -c "illegal value ignored")
ifeq ($(COUNT),0) ifeq ($(COUNT),0)
GCM_FLAG = -xarch=aes -D__PCLMUL__=1 GCM_FLAG = -xarch=aes -D__PCLMUL__=1
AES_FLAG = -xarch=aes -D__AES__=1 AES_FLAG = -xarch=aes -D__AES__=1
LDFLAGS += -xarch=aes
endif endif
COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=sha -xdumpmacros /dev/null 2>&1 | $(EGREP) -i -c "illegal value ignored") COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=sha -xdumpmacros /dev/null 2>&1 | $(EGREP) -i -c "illegal value ignored")
ifeq ($(COUNT),0) ifeq ($(COUNT),0)
SHA_FLAG = -xarch=sha -D__SHA__=1 SHA_FLAG = -xarch=sha -D__SHA__=1
LDFLAGS += -xarch=sha
endif endif
endif endif
# End SunCC # End SunCC
@ -399,9 +403,6 @@ ifneq ($(SUN_CC10_BUGGY),0)
# remove it if you get "already had a body defined" errors in vector.cc # remove it if you get "already had a body defined" errors in vector.cc
CXXFLAGS += -DCRYPTOPP_INCLUDE_VECTOR_CC CXXFLAGS += -DCRYPTOPP_INCLUDE_VECTOR_CC
endif endif
#ifneq ($SUNCC_512_OR_LATER),0)
#CXXFLAGS += -xarch=aes -D__AES__=1 -xarch=no%sse4_1 -xarch=no%sse4_2
#endif
AR = $(CXX) AR = $(CXX)
ARFLAGS = -xar -o ARFLAGS = -xar -o
RANLIB = true RANLIB = true