diff options
author | TizenOpenSource <tizenopensrc@samsung.com> | 2022-12-27 12:15:44 +0900 |
---|---|---|
committer | TizenOpenSource <tizenopensrc@samsung.com> | 2022-12-27 12:15:44 +0900 |
commit | 63bb5dc37a2dfabc6c03c04bc27ea5d47b922863 (patch) | |
tree | 13e5ba9b31ae74cbb14da50aac84905018a7fba5 /configure.ac | |
parent | 8b3c9e355c111dccdc9116fbb27514acb21789f1 (diff) | |
download | diffutils-63bb5dc37a2dfabc6c03c04bc27ea5d47b922863.tar.gz diffutils-63bb5dc37a2dfabc6c03c04bc27ea5d47b922863.tar.bz2 diffutils-63bb5dc37a2dfabc6c03c04bc27ea5d47b922863.zip |
Imported Upstream version 3.8upstream/3.8
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 53 |
1 files changed, 13 insertions, 40 deletions
diff --git a/configure.ac b/configure.ac index 4ed365c..73adb80 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # Configure template for GNU Diffutils. -# Copyright (C) 1994-1995, 1998, 2001-2002, 2004, 2006, 2009-2013, 2015-2018 +# Copyright (C) 1994-1995, 1998, 2001-2002, 2004, 2006, 2009-2013, 2015-2021 # Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -AC_PREREQ([2.63]) +AC_PREREQ([2.64]) AC_INIT([GNU diffutils], m4_esyscmd([build-aux/git-version-gen .tarball-version]), @@ -41,6 +41,10 @@ gl_EARLY gl_USE_SYSTEM_EXTENSIONS gl_INIT +# Ensure VLAs are not used. +# Note -Wvla is implicitly added by gl_MANYWARN_ALL_GCC +AC_DEFINE([GNULIB_NO_VLA], [1], [Define to 1 to disable use of VLAs]) + AC_ARG_ENABLE([gcc-warnings], [AS_HELP_STRING([--enable-gcc-warnings], [turn on lots of GCC warnings (for developers)])], @@ -62,51 +66,17 @@ if test "$gl_gcc_warnings" = yes; then nw= # This, $nw, is the list of warnings we disable. - nw="$nw -Wdeclaration-after-statement" # too useful to forbid - nw="$nw -Waggregate-return" # anachronistic - nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h) - nw="$nw -Wc++-compat" # We don't care about C++ compilers - nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib - nw="$nw -Wtraditional" # Warns on #elif which we use often - nw="$nw -Wcast-qual" # Too many warnings for now - nw="$nw -Wconversion" # Too many warnings for now - nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings - nw="$nw -Wsign-conversion" # Too many warnings for now - nw="$nw -Wtraditional-conversion" # Too many warnings for now - nw="$nw -Wunreachable-code" # Too many warnings for now - nw="$nw -Wpadded" # Our structs are not padded - nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat - nw="$nw -Wlogical-op" # any use of fwrite provokes this - nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses - nw="$nw -Wvla" # warnings in gettext.h - nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ - nw="$nw -Wswitch-enum" # Too many warnings for now - nw="$nw -Wswitch-default" # Too many warnings for now - nw="$nw -Wstack-protector" # not worth working around - # things I might fix soon: - nw="$nw -Wfloat-equal" # sort.c, seq.c - nw="$nw -Wmissing-format-attribute" # copy.c - nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot - nw="$nw -Wstrict-overflow" # expr.c, pr.c, tr.c, factor.c - nw="$nw -Wformat-extra-args" # sdiff.c - # ?? -Wstrict-overflow + nw="$nw -Wstack-protector" # not worth working around gl_MANYWARN_ALL_GCC([ws]) gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) for w in $ws; do gl_WARN_ADD([$w]) done - gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now - gl_WARN_ADD([-Wno-pointer-sign]) # Too many warnings for now gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now gl_WARN_ADD([-Wno-format-nonliteral]) - gl_WARN_ADD([-Wno-cast-function-type]) # For sig-handler.h:47 - - # In spite of excluding -Wlogical-op above, it is enabled, as of - # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c - gl_WARN_ADD([-Wno-logical-op]) gl_WARN_ADD([-fdiagnostics-show-option]) gl_WARN_ADD([-funit-at-a-time]) @@ -123,15 +93,18 @@ if test "$gl_gcc_warnings" = yes; then # Remove the following and save the result in GNULIB_WARN_CFLAGS. nw= nw="$nw -Wunused-macros" - nw="$nw -Wmissing-prototypes" - nw="$nw -Wold-style-definition" nw="$nw -Wsuggest-attribute=pure" + nw="$nw -Wduplicated-branches" # Too many false alarms + + # Avoid false alarm in lib/vasnprintf.c. + # https://lists.gnu.org/r/bug-gnulib/2021-01/msg00031.html + gl_WARN_ADD([-Wno-analyzer-null-argument]) + gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw]) AC_SUBST([GNULIB_WARN_CFLAGS]) fi AC_C_INLINE -AC_C_VARARRAYS AC_DEFINE([DEFAULT_EDITOR_PROGRAM], ["ed"], [Name of editor program, unless overridden.]) |