diff --git a/lisp/Config.linux_gencgc b/lisp/Config.linux_gencgc
index c4cb5fcf7419981bb8050754942bcd07833a3211..aae702eaf275c89a5fbff86be5a6065b3fe7235b 100644
--- a/lisp/Config.linux_gencgc
+++ b/lisp/Config.linux_gencgc
@@ -18,10 +18,17 @@ GENCGC = -DGENCGC
 GC_SRC = gencgc.c
 endif
 
-# Enable support for SSE2
+# Enable support for SSE2.  If FEATURE_X87 is set, we want SSE2
+# support in the C code too so that the same binary is built in both
+# cases.  If neither is set, then we don't want any SSE2 support at
+# all.
+ifdef FEATURE_X87
+SSE2 = -DFEATURE_SSE2
+else
 ifdef FEATURE_SSE2
 SSE2 = -DFEATURE_SSE2
 endif
+endif
 
 RUNTIME = -Di386 $(GENCGC) $(LINKAGE) $(SSE2)
 # __NO_CTYPE so builds on glibc 2.3 will run on (some) older glibc's.