diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-08-31 11:11:14 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-08-31 11:11:14 +0200 |
| commit | bbb262bfd5200313834db8fb36b7fb20aa0913b5 (patch) | |
| tree | 70fad3f1f44bb7299dd1f5f376a6b8483a023136 /m4/compiler_options.m4 | |
| parent | 6e17a2e7ad9453c0afe34dab0e6768ad8ee447c2 (diff) | |
| parent | 9d722f3d3492e31c0b3e4bcba603ffd65309c621 (diff) | |
Merge remote-tracking branch 'salsa/debian/master' into ubuntu/master
Diffstat (limited to 'm4/compiler_options.m4')
| -rw-r--r-- | m4/compiler_options.m4 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4 index 9adc1f14..d390a90c 100644 --- a/m4/compiler_options.m4 +++ b/m4/compiler_options.m4 @@ -60,11 +60,20 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then CFLAGS_MORE_WARNINGS="-Wall" + 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. + _CFLAGS_MORE_WARNINGS_DISABLE_LTO="-Wno-stringop-overflow" + else + _CFLAGS_MORE_WARNINGS_DISABLE_LTO= + fi + if test "x$set_more_warnings" = xerror; then CFLAGS_MORE_WARNINGS="$CFLAGS_MORE_WARNINGS -Werror" fi for option in \ + $_CFLAGS_MORE_WARNINGS_DISABLE_LTO \ -Wextra \ -Wdeclaration-after-statement \ -Wfloat-equal \ |