From 244c76250f1f88e9a4ada14a4671a1770d938d5a Mon Sep 17 00:00:00 2001
From: Hannu Hanhi <hhanhipublic@gmail.com>
Date: Sat, 24 Oct 2020 20:52:54 +0300
Subject: [PATCH] Use SSE3 in 32-bit x86 binaries

---
 src/CMakeLists.txt | 1 +
 src/Makefile       | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3409c49d3..3514fb477 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -549,6 +549,7 @@ if(${SRB2_CONFIG_USEASM})
 	endif()
 	set(SRB2_USEASM ON)
 	add_definitions(-DUSEASM)
+	set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -msse3 -mfpmath=sse)
 else()
 	set(SRB2_USEASM OFF)
 	add_definitions(-DNONX86 -DNORUSEASM)
diff --git a/src/Makefile b/src/Makefile
index 2fe0b26cd..5d5db056f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -277,7 +277,7 @@ OPTS += -DCOMPVERSION
 
 ifndef NONX86
 ifndef GCC29
-	ARCHOPTS?=-march=pentium
+	ARCHOPTS?=-msse3 -mfpmath=sse
 else
 	ARCHOPTS?=-mpentium
 endif
-- 
GitLab