summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2021-10-03 23:32:24 +0100
committerSimon McVittie <smcv@debian.org>2023-12-10 22:24:53 +0000
commit1aea9ea1e6d15ed6f4346ff42be409932ddb1944 (patch)
tree9d1ef8422af654bd64ceee069fb214833d433759
parent4bf2246361881b6e5a6393adb305795d2f082d7b (diff)
build: Don't use SSE on i386
As of 2021, Debian's i386 baseline is still i686 minus one instruction, so it does not guarantee MMX or SSE. Forwarded: not-needed, Debian-specific Gbp-Pq: Topic debian Gbp-Pq: Name build-Don-t-use-SSE-on-i386.patch
-rw-r--r--Makefile5
-rwxr-xr-xctf/Makefile5
2 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9864350..6c88b11 100644
--- a/Makefile
+++ b/Makefile
@@ -224,8 +224,11 @@ endif
# -ffloat-store could work around that, but the better solution is to
# just enforce SSE - every x86 CPU since Pentium3 supports that
# and this should even improve the performance on old CPUs
+# However, as of 2021, Debian's baseline for i386 is still officially a
+# 20+ year old Geode, so we have to reduce performance on newer i386 CPUs
+# to comply with that baseline.
ifeq ($(YQ2_ARCH), i386)
-override CFLAGS += -msse -mfpmath=sse
+override CFLAGS += -ffloat-store
endif
# Force SSE math on x86_64. All sane compilers should do this
diff --git a/ctf/Makefile b/ctf/Makefile
index 1c1ebfe..b55fec2 100755
--- a/ctf/Makefile
+++ b/ctf/Makefile
@@ -136,8 +136,11 @@ endif
# -ffloat-store could work around that, but the better solution is to
# just enforce SSE - every x86 CPU since Pentium3 supports that
# and this should even improve the performance on old CPUs
+# However, as of 2021, Debian's baseline for i386 is still officially a
+# 20+ year old Geode, so we have to reduce performance on newer i386 CPUs
+# to comply with that baseline.
ifeq ($(YQ2_ARCH), i386)
-override CFLAGS += -msse -mfpmath=sse
+override CFLAGS += -ffloat-store
endif
# Force SSE math on x86_64. All sane compilers should do this