From 5455c89a5016ef73c1b91aaf0a93ea30509026c0 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 1 Sep 2018 01:13:29 +0200 Subject: Linux/FreeBSD: Add 32-bit build configuration targetting legacy CPUs that don't support SSE2 instructions. --- src/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 4f8bb42b..50af3021 100644 --- a/src/Makefile +++ b/src/Makefile @@ -22,6 +22,7 @@ # WXSTATIC: Use static wxWidgets library # SSSE3: Enable SSSE3 support in compiler # SSE41: Enable SSE4.1 support in compiler +# NOSSE2: Disable SEE2 support in compiler #------ Targets ------ # all @@ -158,6 +159,10 @@ else ifeq "$(CPU_ARCH)" "x64" C_CXX_FLAGS += -D TC_ARCH_X64 endif +ifeq "$(origin NOSSE2)" "command line" + SIMD_SUPPORTED := 0 +endif + #------ Linux configuration ------ @@ -211,6 +216,13 @@ ifeq "$(shell uname -s)" "Linux" WXCONFIG_CXXFLAGS += -D_GLIBCXX_USE_CXX11_ABI=0 endif endif + + ifeq "$(origin NOSSE2)" "command line" + CFLAGS += -mno-sse2 + CXXFLAGS += -mno-sse2 + WXCONFIG_CFLAGS += -mno-sse2 + WXCONFIG_CXXFLAGS += -mno-sse2 + endif endif @@ -317,6 +329,13 @@ ifeq "$(shell uname -s)" "FreeBSD" CXXFLAGS += -mssse3 -msse4.1 endif endif + + ifeq "$(origin NOSSE2)" "command line" + CFLAGS += -mno-sse2 + CXXFLAGS += -mno-sse2 + WXCONFIG_CFLAGS += -mno-sse2 + WXCONFIG_CXXFLAGS += -mno-sse2 + endif endif -- cgit v1.2.3