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:12:12 +0200
commit6e5ae90c64517bb70333955db0a7a5a3ca7be798 (patch)
tree37397cf39487487803e4978d188b55236cbead2e
parent70695e0551089acd3c8b5e5377f450f6bf083943 (diff)
downloadrpm-6e5ae90c64517bb70333955db0a7a5a3ca7be798.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 d3aeab86e..0f8104fc4 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