summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib8
1 files changed, 8 insertions, 0 deletions
diff --git a/config.lib b/config.lib
index e84f48d91..e814df7ef 100644
--- a/config.lib
+++ b/config.lib
@@ -838,6 +838,14 @@ make_cflags_and_ldflags() {
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"