summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2021-03-18 13:02:16 +0200
committerPanu Matilainen <pmatilai@redhat.com>2021-03-22 12:04:27 +0200
commit8af1e41a09556fcebad14ddb6504628f79654d35 (patch)
treeb64c47c638ae0f0cb0982742684441bda43a88a4
parent3827d5e1f00c8348e90f62aaffee18991ca2440d (diff)
downloadrpm-8af1e41a09556fcebad14ddb6504628f79654d35.tar.gz
Restore (some) compiler sanity
-fno-strict-overflow tells gcc and clang to handle signed integer and (at least on gcc) pointer arithmetic wraparound using twos-complement representation like deity intended. -fno-delete-null-pointer-checks tells gcc not to "optimize" away programmer added safeguards. Really. Suggested by Demi Marie Obenour. Backported from commit 5ee567ebd600c1dec4a9ceb6161d877d891d8594
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 6c78568e4..c863987cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@ fi
AS=${AS-as}
AC_SUBST(AS)
if test "$GCC" = yes; then
- cflags_to_try="-fno-strict-aliasing -fstack-protector -Wempty-body"
+ cflags_to_try="-fno-strict-aliasing -fstack-protector -fno-strict-overflow -fno-delete-null-pointer-checks -Wempty-body"
AC_MSG_CHECKING([supported compiler flags])
old_cflags=$CFLAGS
echo