diff options
Diffstat (limited to 'coreconf/config.mk')
-rw-r--r-- | coreconf/config.mk | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/coreconf/config.mk b/coreconf/config.mk index 2ee4797bb..741bbee2e 100644 --- a/coreconf/config.mk +++ b/coreconf/config.mk @@ -131,6 +131,19 @@ endif ####################################################################### # Master "Core Components" macros for Hardware features # ####################################################################### + +ifndef NSS_DISABLE_SSE3 + NSS_DISABLE_SSE3 = 0 + ifndef CC_IS_CLANG + ifeq (,$(filter 0 1 2 3 4,$(word 1,$(GCC_VERSION)))) + NSS_DISABLE_SSE3 = 1 + endif + endif + ifeq (1,$(NSS_DISABLE_SSE3)) + export NSS_DISABLE_SSE3 + endif +endif #ndef NSS_DISABLE_SSE3 + ifndef NSS_DISABLE_AVX2 ifneq ($(CPU_ARCH),x86_64) # Disable AVX2 entirely on non-Intel platforms @@ -139,14 +152,9 @@ ifndef NSS_DISABLE_AVX2 else # Clang reports its version as an older gcc, but it's OK ifndef CC_IS_CLANG - ifneq (,$(filter 0 1 2 3,$(word 1,$(GCC_VERSION)))) + ifneq (,$(filter 0 1 2 3 4,$(word 1,$(GCC_VERSION)))) NSS_DISABLE_AVX2 = 1 endif - ifeq (4,$(word 1,$(GCC_VERSION))) - ifeq (,$(filter 8 9,$(word 2,$(GCC_VERSION)))) - NSS_DISABLE_AVX2 = 1 - endif - endif endif ifeq (1,$(NSS_DISABLE_AVX2)) $(warning Unable to find gcc 4.8 or greater, disabling -mavx2) @@ -179,6 +187,10 @@ ifdef NSS_DISABLE_AVX2 DEFINES += -DNSS_DISABLE_AVX2 endif +ifdef NSS_DISABLE_SSE3 +DEFINES += -DNSS_DISABLE_SSE3 +endif + ifdef NSS_DISABLE_CHACHAPOLY DEFINES += -DNSS_DISABLE_CHACHAPOLY endif |