config.lib
changeset 7902 cd82da0e7c9b
parent 7826 443e2b662060
child 7920 e9bf2ab2b8d0
--- a/config.lib	Fri Aug 03 23:26:12 2007 +0000
+++ b/config.lib	Sat Aug 04 00:45:53 2007 +0000
@@ -838,6 +838,14 @@
 		CFLAGS="$CFLAGS -fno-strict-aliasing"
 	fi
 
+	# GCC 4.2+ automatically assumes that signed overflows do
+	# not occur in signed arithmetics, whereas we are not
+	# sure that they will not happen. It furthermore complains
+	# about it's own optimized code in some places.
+	if [ $cc_version -ge 42 ]; then
+		CFLAGS="$CFLAGS -fno-strict-overflow"
+	fi
+
 	if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then
 		LIBS="$LIBS -lpthread"
 		LIBS="$LIBS -lrt"