From 76c4d6e9fa12372fde01fb352a598e42c9928f77 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 28 Aug 2017 17:51:59 -0400 Subject: [PATCH] Add -xarch options to linker flags (Issue 472) Also see https://docs.oracle.com/cd/E19205-01/819-5267/bkabt/index.html --- GNUmakefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index a31cc0ef..b2ec5c69 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -225,20 +225,24 @@ ifeq ($(SUN_COMPILER),1) ifeq ($(COUNT),0) SSSE3_FLAG = -xarch=ssse3 -D__SSSE3__=1 ARIA_FLAG = -xarch=ssse3 -D__SSSE3__=1 + LDFLAGS += -xarch=ssse3 endif COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=sse4_2 -xdumpmacros /dev/null 2>&1 | $(EGREP) -i -c "illegal value ignored") ifeq ($(COUNT),0) BLAKE2_FLAG = -xarch=sse4_2 -D__SSE4_2__=1 CRC_FLAG = -xarch=sse4_2 -D__SSE4_2__=1 + LDFLAGS += -xarch=sse4_2 endif COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=aes -xdumpmacros /dev/null 2>&1 | $(EGREP) -i -c "illegal value ignored") ifeq ($(COUNT),0) GCM_FLAG = -xarch=aes -D__PCLMUL__=1 AES_FLAG = -xarch=aes -D__AES__=1 + LDFLAGS += -xarch=aes endif COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=sha -xdumpmacros /dev/null 2>&1 | $(EGREP) -i -c "illegal value ignored") ifeq ($(COUNT),0) SHA_FLAG = -xarch=sha -D__SHA__=1 + LDFLAGS += -xarch=sha endif endif # 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 CXXFLAGS += -DCRYPTOPP_INCLUDE_VECTOR_CC endif -#ifneq ($SUNCC_512_OR_LATER),0) -#CXXFLAGS += -xarch=aes -D__AES__=1 -xarch=no%sse4_1 -xarch=no%sse4_2 -#endif AR = $(CXX) ARFLAGS = -xar -o RANLIB = true