From: Paul Eggert Date: Thu, 9 Jul 2020 23:35:48 +0000 (-0700) Subject: Speed up GCC 10.1 compilation in default Git builds X-Git-Tag: emacs-28.0.90~7034 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=501306557c6bb65007f384aa203999d1577d0e99;p=emacs.git Speed up GCC 10.1 compilation in default Git builds * configure.ac (nw): GCC 10.1 introduced warnings enabled by -fanalyzer that slow down compilation considerably. Generate these warnings only if --enable-gcc-warnings is explicitly given. Also, do not bother to eliminate warnings that Gnulib’s revised manywarnings module no longer generates. --- diff --git a/configure.ac b/configure.ac index 6ede6104d39..9fe1a0d32c1 100644 --- a/configure.ac +++ b/configure.ac @@ -1030,14 +1030,17 @@ AS_IF([test $gl_gcc_warnings = no], ;; esac AS_IF([test $gl_gcc_warnings = yes], - [WERROR_CFLAGS=-Werror]) + [WERROR_CFLAGS=-Werror], + [# Use -fanalyzer and related options only if --enable-gcc-warnings, + # as they slow GCC considerably. + nw="$nw -fanalyzer -Wno-analyzer-double-free -Wno-analyzer-malloc-leak" + nw="$nw -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free"]) - nw="$nw -Wcast-align -Wcast-align=strict" # Emacs is tricky with pointers. + nw="$nw -Wcast-align=strict" # Emacs is tricky with pointers. nw="$nw -Wduplicated-branches" # Too many false alarms nw="$nw -Wformat-overflow=2" # False alarms due to GCC bug 80776 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings nw="$nw -Woverlength-strings" # Not a problem these days - nw="$nw -Wformat-nonliteral" # we do this a lot nw="$nw -Wvla" # Emacs uses . nw="$nw -Wunused-const-variable=2" # lisp.h declares const objects. nw="$nw -Winline" # OK to ignore 'inline' @@ -1046,7 +1049,6 @@ AS_IF([test $gl_gcc_warnings = no], nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations nw="$nw -Wbad-function-cast" # These casts are no worse than others. - nw="$nw -Wabi" # Not useful, perceived as noise # Emacs doesn't care about shadowing; see # . @@ -1066,26 +1068,12 @@ AS_IF([test $gl_gcc_warnings = no], # option problematic. nw="$nw -Wsuggest-attribute=pure" - # This part is merely for shortening the command line, - # since -Wall implies -Wswitch. - nw="$nw -Wswitch" - - # This part is merely for shortening the command line, - # since -Wno-FOO needs to be added below regardless. - nw="$nw -Wmissing-field-initializers" - nw="$nw -Woverride-init" - nw="$nw -Wtype-limits" - nw="$nw -Wunused-parameter" - if test "$emacs_cv_clang" = yes; then - nw="$nw -Wcast-align" nw="$nw -Wdouble-promotion" - nw="$nw -Wmissing-braces" fi - # These cause too much noise in the MinGW build + # This causes too much noise in the MinGW build. if test $opsys = mingw32; then - nw="$nw -Wpointer-sign" nw="$nw -Wsuggest-attribute=format" fi