]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
make `-Werror` optional in libatomic/libbacktrace/libgomp/libitm/libsanitizer
authorDavid Seifert <soap@gentoo.org>
Thu, 3 Feb 2022 14:47:10 +0000 (15:47 +0100)
committerJakub Jelinek <jakub@redhat.com>
Thu, 3 Feb 2022 15:10:18 +0000 (16:10 +0100)
* `-Werror` can cause issues when a more recent version of GCC compiles
  an older version:
  - https://bugs.gentoo.org/229059
  - https://bugs.gentoo.org/475350
  - https://bugs.gentoo.org/667104

libatomic/ChangeLog:

* configure.ac: Support --disable-werror.
* configure: Regenerate.

libbacktrace/ChangeLog:

* configure.ac: Support --disable-werror.
* configure: Regenerate.

libgomp/ChangeLog:

* configure.ac: Support --disable-werror.
* configure: Regenerate.

libitm/ChangeLog:

* configure.ac: Support --disable-werror.
* configure: Regenerate.

libsanitizer/ChangeLog:

* configure.ac: Support --disable-werror.
* aclocal.m4: Include also ../config/warnings.m4.
* libbacktrace/Makefile.am (WARN_FLAGS): Remove.
* configure: Regenerate.
* Makefile.in: Regenerate.
* asan/Makefile.in: Regenerate.
* hwasan/Makefile.in: Regenerate.
* interception/Makefile.in: Regenerate.
* libbacktrace/Makefile.in: Regenerate.
* lsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.in: Regenerate.
* tsan/Makefile.in: Regenerate.
* ubsan/Makefile.in: Regenerate.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
23 files changed:
libatomic/configure
libatomic/configure.ac
libbacktrace/configure
libbacktrace/configure.ac
libgo/configure
libgo/configure.ac
libgomp/configure
libgomp/configure.ac
libitm/configure
libitm/configure.ac
libsanitizer/Makefile.in
libsanitizer/aclocal.m4
libsanitizer/asan/Makefile.in
libsanitizer/configure
libsanitizer/configure.ac
libsanitizer/hwasan/Makefile.in
libsanitizer/interception/Makefile.in
libsanitizer/libbacktrace/Makefile.am
libsanitizer/libbacktrace/Makefile.in
libsanitizer/lsan/Makefile.in
libsanitizer/sanitizer_common/Makefile.in
libsanitizer/tsan/Makefile.in
libsanitizer/ubsan/Makefile.in

index 34434d21764f5658e7ec213ae658e107e4f7c747..92853dd8a4585def324be9bea0fa71849c733031 100755 (executable)
@@ -805,6 +805,7 @@ with_gnu_ld
 enable_libtool_lock
 enable_maintainer_mode
 enable_symvers
+enable_werror
 enable_cet
 with_gcc_major_version_only
 '
@@ -1456,6 +1457,7 @@ Optional Features:
                           sometimes confusing) to the casual installer
   --enable-symvers=STYLE  enables symbol versioning of the shared library
                           [default=yes]
+  --disable-werror        disable building with -Werror
   --enable-cet            enable Intel CET in target libraries [default=auto]
 
 Optional Packages:
@@ -11380,7 +11382,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11383 "configure"
+#line 11385 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11486,7 +11488,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11489 "configure"
+#line 11491 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15565,9 +15567,17 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
 fi
 rm -f confcache
 
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+  enableval=$enable_werror;
+fi
+
 # Add -Wall -Werror if we are using GCC.
-if test "x$GCC" = "xyes"; then
-  XCFLAGS="$XCFLAGS -Wall -Werror"
+if test "x$GCC" = "xyes"; then :
+  XCFLAGS="$XCFLAGS -Wall"
+fi
+if test "x$enable_werror" != "xno" && test "x$GCC" = "xyes"; then :
+  XCFLAGS="$XCFLAGS -Werror"
 fi
 
 # Add CET specific flags if CET is enabled
index f350b9b3509a21eee9c3cbee95051a2825c4fff1..5563551aaae9fbcf7141f3617170db1f9ede84e4 100644 (file)
@@ -251,10 +251,13 @@ LIBAT_ENABLE_SYMVERS
 CFLAGS="$save_CFLAGS"
 AC_CACHE_SAVE
 
+AC_ARG_ENABLE([werror],
+  [AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
 # Add -Wall -Werror if we are using GCC.
-if test "x$GCC" = "xyes"; then
-  XCFLAGS="$XCFLAGS -Wall -Werror"
-fi
+AS_IF([test "x$GCC" = "xyes"],
+  [XCFLAGS="$XCFLAGS -Wall"])
+AS_IF([test "x$enable_werror" != "xno" && test "x$GCC" = "xyes"],
+  [XCFLAGS="$XCFLAGS -Werror"])
 
 # Add CET specific flags if CET is enabled
 GCC_CET_FLAGS(CET_FLAGS)
index a2f33c0f35db474d91ddd8e219a6af3f15024b68..17f470a4becb918ca13ef136dde401806ae9fcea 100755 (executable)
@@ -801,6 +801,7 @@ with_gnu_ld
 enable_libtool_lock
 enable_largefile
 enable_cet
+enable_werror
 with_system_libunwind
 enable_host_shared
 '
@@ -1448,6 +1449,7 @@ Optional Features:
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --disable-largefile     omit support for large files
   --enable-cet            enable Intel CET in target libraries [default=auto]
+  --disable-werror        disable building with -Werror
   --enable-host-shared    build host code as shared libraries
   --enable-cet            enable Intel CET in host libraries [default=auto]
 
@@ -11509,7 +11511,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11512 "configure"
+#line 11514 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11615,7 +11617,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11618 "configure"
+#line 11620 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12300,10 +12302,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-if test -n "${with_target_subdir}"; then
-  WARN_FLAGS="$WARN_FLAGS -Werror"
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+  enableval=$enable_werror;
 fi
 
+if test "x$enable_werror" != "xno" && test -n "${with_target_subdir}"; then :
+  WARN_FLAGS="$WARN_FLAGS -Werror"
+fi
 
 
 if test -n "${with_target_subdir}"; then
index 0dfd82bc03e776def4b396e16ff152492c02c013..597c9705db8098c54e15b9c37bf8d9feec3a0c18 100644 (file)
@@ -145,10 +145,10 @@ ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
                          -Wmissing-format-attribute -Wcast-qual],
                          [WARN_FLAGS])
 
-if test -n "${with_target_subdir}"; then
-  WARN_FLAGS="$WARN_FLAGS -Werror"
-fi
-
+AC_ARG_ENABLE([werror],
+  [AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
+AS_IF([test "x$enable_werror" != "xno" && test -n "${with_target_subdir}"],
+  [WARN_FLAGS="$WARN_FLAGS -Werror"])
 AC_SUBST(WARN_FLAGS)
 
 if test -n "${with_target_subdir}"; then
index 57ceeb2baa7ba7ccc5b3864fb956542f480c704c..309e17dd91fd20b748ee32d572ca306031591911 100755 (executable)
@@ -1496,7 +1496,7 @@ Optional Features:
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
-  --enable-werror         turns on -Werror [default=yes]
+  --disable-werror        disable building with -Werror
   --enable-version-specific-runtime-libs
                           Specify that runtime libraries should be installed
                           in a compiler-specific directory
@@ -13834,7 +13834,7 @@ if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror;
 fi
 
-if test "x$enable_werror" != "xno"; then
+if test "x$enable_werror" != "xno" && test "x$GCC" = "xyes"; then :
   WERROR="-Werror"
 fi
 
index 1f4f32dae2b4c9e633f21ac15a6afbe435b1c614..8691d5b0ac1395cf8be810f42c3236c09767c402 100644 (file)
@@ -62,11 +62,10 @@ AC_PROG_AWK
 WARN_FLAGS='-Wall -Wextra -Wwrite-strings -Wcast-qual'
 AC_SUBST(WARN_FLAGS)
 
-AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror],
-                                      [turns on -Werror @<:@default=yes@:>@])])
-if test "x$enable_werror" != "xno"; then
-  WERROR="-Werror"
-fi
+AC_ARG_ENABLE([werror],
+  [AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
+AS_IF([test "x$enable_werror" != "xno" && test "x$GCC" = "xyes"],
+  [WERROR="-Werror"])
 AC_SUBST(WERROR)
 
 glibgo_toolexecdir=no
index 37390ce5d667b5efca16bdce152db1f836f7da63..a73a6d4400368dced71dca9f8a015a186cd63951 100755 (executable)
@@ -825,6 +825,7 @@ enable_silent_rules
 enable_multilib
 with_toolexeclibdir
 enable_dependency_tracking
+enable_werror
 enable_shared
 enable_static
 with_pic
@@ -1486,6 +1487,7 @@ Optional Features:
                           do not reject slow dependency extractors
   --disable-dependency-tracking
                           speeds up one-time build
+  --disable-werror        disable building with -Werror
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-fast-install[=PKGS]
@@ -4611,9 +4613,17 @@ fi
 # in both places for now and restore CFLAGS at the end of config.
 save_CFLAGS="$CFLAGS"
 
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+  enableval=$enable_werror;
+fi
+
 # Add -Wall -Werror if we are using GCC.
-if test "x$GCC" = "xyes"; then
-  XCFLAGS="$XCFLAGS -Wall -Werror"
+if test "x$GCC" = "xyes"; then :
+  XCFLAGS="$XCFLAGS -Wall"
+fi
+if test "x$enable_werror" != "xno" && test "x$GCC" = "xyes"; then :
+  XCFLAGS="$XCFLAGS -Werror"
 fi
 
 # Find other programs we need.
@@ -11421,7 +11431,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11424 "configure"
+#line 11434 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11527,7 +11537,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11530 "configure"
+#line 11540 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index bfb613b91f0bd58429d427759e2aed7e6c164f3a..a9b1f3973f7b64b8a3e7ba2e2b4abe4f62f35bcf 100644 (file)
@@ -121,10 +121,13 @@ AC_SUBST(CFLAGS)
 # in both places for now and restore CFLAGS at the end of config.
 save_CFLAGS="$CFLAGS"
 
+AC_ARG_ENABLE([werror],
+  [AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
 # Add -Wall -Werror if we are using GCC.
-if test "x$GCC" = "xyes"; then
-  XCFLAGS="$XCFLAGS -Wall -Werror"
-fi
+AS_IF([test "x$GCC" = "xyes"],
+  [XCFLAGS="$XCFLAGS -Wall"])
+AS_IF([test "x$enable_werror" != "xno" && test "x$GCC" = "xyes"],
+  [XCFLAGS="$XCFLAGS -Werror"])
 
 # Find other programs we need.
 AC_CHECK_TOOL(AR, ar)
index 966bf40537d5154600250b7815cbc62ca04e173b..18fc2d3a10a782a104ed0c7f0595410b0f43fbdf 100755 (executable)
@@ -814,6 +814,7 @@ enable_maintainer_mode
 enable_linux_futex
 enable_tls
 enable_symvers
+enable_werror
 enable_cet
 with_gcc_major_version_only
 '
@@ -1468,6 +1469,7 @@ Optional Features:
   --enable-tls            Use thread-local storage [default=yes]
   --enable-symvers=STYLE  enables symbol versioning of the shared library
                           [default=yes]
+  --disable-werror        disable building with -Werror
   --enable-cet            enable Intel CET in target libraries [default=auto]
 
 Optional Packages:
@@ -12056,7 +12058,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12059 "configure"
+#line 12061 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12162,7 +12164,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12165 "configure"
+#line 12167 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17847,9 +17849,17 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
 fi
 rm -f confcache
 
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+  enableval=$enable_werror;
+fi
+
 # Add -Wall -Werror if we are using GCC.
-if test "x$GCC" = "xyes"; then
-  XCFLAGS="$XCFLAGS -Wall -Werror"
+if test "x$GCC" = "xyes"; then :
+  XCFLAGS="$XCFLAGS -Wall"
+fi
+if test "x$enable_werror" != "xno" && test "x$GCC" = "xyes"; then :
+  XCFLAGS="$XCFLAGS -Werror"
 fi
 
 XCFLAGS="$XCFLAGS $XPCFLAGS"
index ac81b1468451bf6672b3a27149f48d529aeed9c9..78a682376d943753f4cfb23ef7328467a5ed1ba1 100644 (file)
@@ -261,10 +261,13 @@ GCC_CHECK_ELF_STYLE_WEAKREF
 CFLAGS="$save_CFLAGS"
 AC_CACHE_SAVE
 
+AC_ARG_ENABLE([werror],
+  [AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
 # Add -Wall -Werror if we are using GCC.
-if test "x$GCC" = "xyes"; then
-  XCFLAGS="$XCFLAGS -Wall -Werror"
-fi
+AS_IF([test "x$GCC" = "xyes"],
+  [XCFLAGS="$XCFLAGS -Wall"])
+AS_IF([test "x$enable_werror" != "xno" && test "x$GCC" = "xyes"],
+  [XCFLAGS="$XCFLAGS -Werror"])
 
 XCFLAGS="$XCFLAGS $XPCFLAGS"
 
index 486c7920ee2b9f06aae2577dcb4e1faad7e26d01..aab88deb6e8610f13ec53eff2c4ff20c66723794 100644 (file)
@@ -108,6 +108,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/toolexeclibdir.m4 \
+       $(top_srcdir)/../config/warnings.m4 \
        $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
        $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
@@ -290,6 +291,7 @@ STRIP = @STRIP@
 TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@
 VERSION = @VERSION@
 VIEW_FILE = @VIEW_FILE@
+WARN_FLAGS = @WARN_FLAGS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
index 85f72c2eb4797ece69bd7d5fe0496915b4c5060a..6aa15694eba07b20bdd32bd1a87d9d2dbe54d327 100644 (file)
@@ -1195,6 +1195,7 @@ m4_include([../config/multi.m4])
 m4_include([../config/override.m4])
 m4_include([../config/stdint.m4])
 m4_include([../config/toolexeclibdir.m4])
+m4_include([../config/warnings.m4])
 m4_include([../ltoptions.m4])
 m4_include([../ltsugar.m4])
 m4_include([../ltversion.m4])
index e00927dd13d140c285c680e3c5f18b9d3f839c68..2476fbc5a2624c2e9e9ebfcdc2be8728fc2d5ac6 100644 (file)
@@ -103,6 +103,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/toolexeclibdir.m4 \
+       $(top_srcdir)/../config/warnings.m4 \
        $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
        $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
@@ -344,6 +345,7 @@ STRIP = @STRIP@
 TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@
 VERSION = @VERSION@
 VIEW_FILE = @VIEW_FILE@
+WARN_FLAGS = @WARN_FLAGS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
index 08bdbc6884198c234f7f5ee8367c1147e1d736c9..771b135573a8b031eafc70a52b63a84120c8866e 100755 (executable)
@@ -639,6 +639,7 @@ EXTRA_CXXFLAGS
 EXTRA_CFLAGS
 EXTRA_ASFLAGS
 get_gcc_base_ver
+WARN_FLAGS
 SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS
 TSAN_TARGET_DEPENDENT_OBJECTS
 LIBBACKTRACE_SUPPORTED_FALSE
@@ -816,6 +817,7 @@ with_pic
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
+enable_werror
 with_gcc_major_version_only
 enable_cet
 '
@@ -1469,6 +1471,7 @@ Optional Features:
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-werror        disable building with -Werror
   --enable-cet            enable Intel CET in target libraries [default=auto]
 
 Optional Packages:
@@ -12356,7 +12359,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12359 "configure"
+#line 12362 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12462,7 +12465,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12465 "configure"
+#line 12468 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 
 
 
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+  enableval=$enable_werror;
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+WARN_FLAGS=
+save_CFLAGS="$CFLAGS"
+for real_option in -Wextra -Wall -Wwrite-strings \
+                          -Wmissing-format-attribute -Wcast-qual; do
+  # Do the check with the no- prefix removed since gcc silently
+  # accepts any -Wno-* option on purpose
+  case $real_option in
+    -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
+    *) option=$real_option ;;
+  esac
+  as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
+$as_echo_n "checking whether $CC supports $option... " >&6; }
+if eval \${$as_acx_Woption+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  CFLAGS="$option"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_acx_Woption=yes"
+else
+  eval "$as_acx_Woption=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+eval ac_res=\$$as_acx_Woption
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
+  WARN_FLAGS="$WARN_FLAGS${WARN_FLAGS:+ }$real_option"
+fi
+  done
+CFLAGS="$save_CFLAGS"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+if test "x$enable_werror" != "xno"; then :
+  WARN_FLAGS="$WARN_FLAGS -Werror"
+fi
+
+
 # Determine what GCC version number to use in filesystem paths.
 
   get_gcc_base_ver="cat"
index 13cd302030db7d0107ac8de0863d42558dea5c71..7f1ef3979c4cb03c3505573574ccb2c7c93caffa 100644 (file)
@@ -400,6 +400,16 @@ fi
 AC_SUBST([TSAN_TARGET_DEPENDENT_OBJECTS])
 AC_SUBST([SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS])
 
+AC_ARG_ENABLE([werror],
+  [AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
+
+ACX_PROG_CC_WARNING_OPTS([-Wextra -Wall -Wwrite-strings \
+                          -Wmissing-format-attribute -Wcast-qual],
+                          [WARN_FLAGS])
+AS_IF([test "x$enable_werror" != "xno"],
+  [WARN_FLAGS="$WARN_FLAGS -Werror"])
+AC_SUBST([WARN_FLAGS])
+
 # Determine what GCC version number to use in filesystem paths.
 GCC_BASE_VER
 
index 0021e783c61b5925d750061895e6e49caa253f1e..67553f3979dad9658b274fa1b99896fc839c841e 100644 (file)
@@ -101,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/toolexeclibdir.m4 \
+       $(top_srcdir)/../config/warnings.m4 \
        $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
        $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
@@ -332,6 +333,7 @@ STRIP = @STRIP@
 TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@
 VERSION = @VERSION@
 VIEW_FILE = @VIEW_FILE@
+WARN_FLAGS = @WARN_FLAGS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
index c14d52702867f729b8b1b1dbc6390883166ad182..bce788aeea7d604c5fb90baf28cb4a8352de6da8 100644 (file)
@@ -99,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/toolexeclibdir.m4 \
+       $(top_srcdir)/../config/warnings.m4 \
        $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
        $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
@@ -262,6 +263,7 @@ STRIP = @STRIP@
 TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@
 VERSION = @VERSION@
 VIEW_FILE = @VIEW_FILE@
+WARN_FLAGS = @WARN_FLAGS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
index 16accd468df2842afd17e39927126f9a86369518..0cf8d2104c06ce328a4fd93219943454373a601d 100644 (file)
@@ -34,8 +34,6 @@ ACLOCAL_AMFLAGS = -I ../.. -I ../../config
 AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
        -I ../../libgcc -I .. -I $(top_srcdir) -I $(top_srcdir)/../libbacktrace
 
-WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \
-            -Wcast-qual -Werror
 C_WARN_FLAGS = $(WARN_FLAGS) -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
 CXX_WARN_FLAGS = $(WARN_FLAGS) -Wno-unused-parameter
 AM_CFLAGS = $(C_WARN_FLAGS)
index f008f8eb5521542ecab15d5357a4dcb480bfbf57..ece4f11a855e5b40986a3678a07d6704db567396 100644 (file)
@@ -130,6 +130,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/toolexeclibdir.m4 \
+       $(top_srcdir)/../config/warnings.m4 \
        $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
        $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
@@ -312,6 +313,7 @@ STRIP = @STRIP@
 TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@
 VERSION = @VERSION@
 VIEW_FILE = @VIEW_FILE@
+WARN_FLAGS = @WARN_FLAGS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -385,9 +387,6 @@ ACLOCAL_AMFLAGS = -I ../.. -I ../../config
 AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
        -I ../../libgcc -I .. -I $(top_srcdir) -I $(top_srcdir)/../libbacktrace
 
-WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \
-            -Wcast-qual -Werror
-
 C_WARN_FLAGS = $(WARN_FLAGS) -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
 CXX_WARN_FLAGS = $(WARN_FLAGS) -Wno-unused-parameter
 AM_CFLAGS = $(C_WARN_FLAGS) $(EXTRA_CFLAGS)
index 25ac00cf8db5c414b834b538ea1cfdd4469d31db..857f244cd86be2abc177346dbfcac06dde06a2dc 100644 (file)
@@ -101,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/toolexeclibdir.m4 \
+       $(top_srcdir)/../config/warnings.m4 \
        $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
        $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
@@ -307,6 +308,7 @@ STRIP = @STRIP@
 TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@
 VERSION = @VERSION@
 VIEW_FILE = @VIEW_FILE@
+WARN_FLAGS = @WARN_FLAGS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
index 2f68f22c80ad7cb4cf84ebed7f095b9771060536..c4b009fed8370669f513ae3e9a31ad9f0ac2838d 100644 (file)
@@ -105,6 +105,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/toolexeclibdir.m4 \
+       $(top_srcdir)/../config/warnings.m4 \
        $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
        $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
@@ -299,6 +300,7 @@ STRIP = @STRIP@
 TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@
 VERSION = @VERSION@
 VIEW_FILE = @VIEW_FILE@
+WARN_FLAGS = @WARN_FLAGS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
index a76b8d431721b786e48026ab2f9bbd539ac210f0..538d2e8eb68beb27dbb36cf7558fc3359b4f9808 100644 (file)
@@ -102,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/toolexeclibdir.m4 \
+       $(top_srcdir)/../config/warnings.m4 \
        $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
        $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
@@ -336,6 +337,7 @@ STRIP = @STRIP@
 TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@
 VERSION = @VERSION@
 VIEW_FILE = @VIEW_FILE@
+WARN_FLAGS = @WARN_FLAGS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
index ad75c67e266d24abff3dedb47bbe8501ef855486..497e03386961b1a4027ccffacf3c848fd50d56e2 100644 (file)
@@ -101,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/toolexeclibdir.m4 \
+       $(top_srcdir)/../config/warnings.m4 \
        $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
        $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
@@ -301,6 +302,7 @@ STRIP = @STRIP@
 TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@
 VERSION = @VERSION@
 VIEW_FILE = @VIEW_FILE@
+WARN_FLAGS = @WARN_FLAGS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@