Commit da83a8957903ff96d071c9dd5eb950bad13140eb

Thomas de Grivel 2024-06-28T12:17:54

configure: add CFLAGS for i386 FPU excess precision

diff --git a/c3s/configure b/c3s/configure
index 929a305..341e7bc 100755
--- a/c3s/configure
+++ b/c3s/configure
@@ -41,6 +41,7 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="$LDFLAGS -rdynamic"
 config_asan
 config_gnu
diff --git a/ic3/configure b/ic3/configure
index e20bfd5..97401be 100755
--- a/ic3/configure
+++ b/ic3/configure
@@ -27,6 +27,7 @@ PROG_DEBUG=ic3_debug
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -fPIC"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="$LDFLAGS -rdynamic"
 config_asan
 config_gnu
diff --git a/libc3/configure b/libc3/configure
index 8f1d3de..97755b5 100755
--- a/libc3/configure
+++ b/libc3/configure
@@ -38,6 +38,7 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$LO_SOURCES")"
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="-export-dynamic $LDFLAGS -rdynamic"
 config_asan
 config_gnu
diff --git a/libc3_window/cairo/configure b/libc3_window/cairo/configure
index 654ad3b..8f36132 100755
--- a/libc3_window/cairo/configure
+++ b/libc3_window/cairo/configure
@@ -40,6 +40,7 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 CPPFLAGS="-I../.. $CPPFLAGS"
 OBJCFLAGS="$CFLAGS -W -Wall -Werror"
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="--shared ${LDFLAGS}"
 LIBS="$LIBS -rpath ${PREFIX}/lib"
 config_asan
diff --git a/libc3_window/cairo/quartz/configure b/libc3_window/cairo/quartz/configure
index f88f62b..aeb35d3 100755
--- a/libc3_window/cairo/quartz/configure
+++ b/libc3_window/cairo/quartz/configure
@@ -48,6 +48,7 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 # Common config for all targets
 CPPFLAGS="$CPPFLAGS -I../../.."
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 OBJCFLAGS="$CFLAGS -W -Wall -Werror"
 LDFLAGS="--shared $LDFLAGS"
 LIBS="$LIBS"
diff --git a/libc3_window/cairo/quartz/demo/configure b/libc3_window/cairo/quartz/demo/configure
index af1daee..12f195d 100755
--- a/libc3_window/cairo/quartz/demo/configure
+++ b/libc3_window/cairo/quartz/demo/configure
@@ -66,6 +66,7 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 # Common config for all targets
 CPPFLAGS="$CPPFLAGS -I../../../.."
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 OBJCFLAGS="$CFLAGS -W -Wall -Werror"
 LDFLAGS="$LDFLAGS -framework Cocoa"
 LIBS="$LIBS"
diff --git a/libc3_window/cairo/win32/configure b/libc3_window/cairo/win32/configure
index e7bb8c1..d55a44a 100644
--- a/libc3_window/cairo/win32/configure
+++ b/libc3_window/cairo/win32/configure
@@ -43,6 +43,7 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 # Common config for all targets
 CPPFLAGS="-I../../../../libffi/include -I../../../.. $CPPFLAGS"
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="--shared $LDFLAGS"
 LIBS="$LIBS -rpath ${PREFIX}/lib"
 config_asan
diff --git a/libc3_window/cairo/win32/demo/configure b/libc3_window/cairo/win32/demo/configure
index baa744f..02b4020 100644
--- a/libc3_window/cairo/win32/demo/configure
+++ b/libc3_window/cairo/win32/demo/configure
@@ -45,6 +45,7 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 CPPFLAGS="-I../../../../../libffi/include -I../../../../.. $CPPFLAGS"
 config_asan
 config_gnu
diff --git a/libc3_window/cairo/xcb/configure b/libc3_window/cairo/xcb/configure
index 12f1fdc..d479581 100755
--- a/libc3_window/cairo/xcb/configure
+++ b/libc3_window/cairo/xcb/configure
@@ -39,6 +39,7 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 # Common config for all targets
 CPPFLAGS="$CPPFLAGS -I../../.."
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="--shared ${LDFLAGS}"
 config_asan
 config_gnu
diff --git a/libc3_window/cairo/xcb/demo/configure b/libc3_window/cairo/xcb/demo/configure
index 6db8033..9a73141 100755
--- a/libc3_window/cairo/xcb/demo/configure
+++ b/libc3_window/cairo/xcb/demo/configure
@@ -45,6 +45,7 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 CPPFLAGS="$CPPFLAGS -I../../../.."
 config_asan
 config_gnu
diff --git a/libc3_window/configure b/libc3_window/configure
index 71d1b76..4a7cc83 100755
--- a/libc3_window/configure
+++ b/libc3_window/configure
@@ -39,6 +39,7 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 # Common config for all targets
 CPPFLAGS="-I.. $CPPFLAGS"
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="--shared ${LDFLAGS} -rdynamic"
 config_asan
 config_gnu
diff --git a/libc3_window/sdl2/configure b/libc3_window/sdl2/configure
index 63ece62..761e006 100755
--- a/libc3_window/sdl2/configure
+++ b/libc3_window/sdl2/configure
@@ -37,8 +37,8 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 
 # Common config for all targets
 CPPFLAGS="-I../.. $CPPFLAGS"
-#CPPFLAGS="$CPPFLAGS -DGL_SILENCE_DEPRECATION=1"
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="--shared ${LDFLAGS}"
 config_asan
 config_gnu
diff --git a/libc3_window/sdl2/demo/configure b/libc3_window/sdl2/demo/configure
index 6a292a2..fcef45e 100755
--- a/libc3_window/sdl2/demo/configure
+++ b/libc3_window/sdl2/demo/configure
@@ -45,9 +45,9 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 
 # Common config for all targets
 CPPFLAGS="-I../../.. $CPPFLAGS"
-#CPPFLAGS="$CPPFLAGS -DGL_SILENCE_DEPRECATION=1"
 CFLAGS="$CFLAGS -W -Wall -Werror -Wno-error=unknown-pragmas"
 CFLAGS="$CFLAGS -std=c11 -pedantic -pipe"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LIBS="$LIBS -lm"
 config_asan
 config_gnu
diff --git a/libtommath b/libtommath
index 1957d6f..3918c6e 160000
--- a/libtommath
+++ b/libtommath
@@ -1 +1 @@
-Subproject commit 1957d6f6c57aded3da4721067f175f9f8e0cd6da
+Subproject commit 3918c6e71da6550f8b663af71e8b008ea7705081
diff --git a/test/configure b/test/configure
index 5418ce6..0646004 100755
--- a/test/configure
+++ b/test/configure
@@ -40,6 +40,7 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="$LDFLAGS -rdynamic"
 config_asan
 config_gnu
diff --git a/ucd2c/configure b/ucd2c/configure
index 787ca85..058cc6b 100755
--- a/ucd2c/configure
+++ b/ucd2c/configure
@@ -32,6 +32,7 @@ LIBS="${LIBS:=}"
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic -O2"
+CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 pkg_config libbsd-overlay
 
 # Main config