about summary refs log tree commit diff
path: root/m4
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2021-02-11 18:12:43 +0100
committerMichael Biebl <biebl@debian.org>2021-02-11 18:12:43 +0100
commit8f0db010e71e252ac290d51bd2a5b0a078f1d279 (patch)
tree2caa344fefcd9bb4218583c5aa2e0f92f4b2aa8c /m4
parentf54032b30e1ddd84f10a339e0caf493772e049a7 (diff)
parent80ec1decc49c72efec2a8b87c06245c92c0ab807 (diff)
Update upstream source from tag 'upstream/1.29.90'
Update to upstream version '1.29.90'
with Debian dir 90df6d97476cc3200c410f3f3603b87396175c7a
Diffstat (limited to 'm4')
-rw-r--r--m4/compiler_options.m49
1 files changed, 7 insertions, 2 deletions
diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4
index d390a90c..b4b5e78d 100644
--- a/m4/compiler_options.m4
+++ b/m4/compiler_options.m4
@@ -62,8 +62,13 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
 
 	if test "x$enable_lto" = xyes; then
 		dnl With LTO and optimizations enabled, gcc 10.2.1-1.fc32 is really
-		dnl adamant to warn about correct uses of strncpy. Disable that warning.
+		dnl adamant to warn about correct uses of strncpy. Disable "-Wstringop-overflow".
 		_CFLAGS_MORE_WARNINGS_DISABLE_LTO="-Wno-stringop-overflow"
+
+		dnl We want to build with "-Wmaybe-uninitialized" enabled. With LTO that
+		dnl can easily lead to false positives. For manual testing, disable the
+		dnl warning here by uncommenting the following line.
+		dnl _CFLAGS_MORE_WARNINGS_DISABLE_LTO="$_CFLAGS_MORE_WARNINGS_DISABLE_LTO -Wno-error=maybe-uninitialized"
 	else
 		_CFLAGS_MORE_WARNINGS_DISABLE_LTO=
 	fi
@@ -102,7 +107,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
 		      -Wno-unused-parameter \
 		      ; do
 		dnl GCC 4.4 does not warn when checking for -Wno-* flags (https://gcc.gnu.org/wiki/FAQ#wnowarning)
-		_NM_COMPILER_FLAG([-Wall $(printf '%s' "$option" | sed 's/^-Wno-/-W/')], [],
+		_NM_COMPILER_FLAG([-Wall $(printf '%s' "$option" | sed -e 's/^-W\(no-\|no-error=\)/-W/')], [],
 		                  [CFLAGS_MORE_WARNINGS="$CFLAGS_MORE_WARNINGS $option"], [])
 	done
 	unset option