diff options
author | David Seifert <soap@gentoo.org> | 2022-02-03 15:47:10 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2022-02-03 16:10:18 +0100 |
commit | 45ba6bf28b75ee3391df83fbfb1060a50dc63d3a (patch) | |
tree | 486d5ac3c903b1c6f1ea43c0841e3773d72e8b55 /libitm | |
parent | 1d5c7584fd6e72bfdbede86cef5ff04ae35f9744 (diff) | |
download | gcc-45ba6bf28b75ee3391df83fbfb1060a50dc63d3a.tar.gz |
make `-Werror` optional in libatomic/libbacktrace/libgomp/libitm/libsanitizer
* `-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>
Diffstat (limited to 'libitm')
-rwxr-xr-x | libitm/configure | 18 | ||||
-rw-r--r-- | libitm/configure.ac | 9 |
2 files changed, 20 insertions, 7 deletions
diff --git a/libitm/configure b/libitm/configure index 966bf40537d..18fc2d3a10a 100755 --- a/libitm/configure +++ b/libitm/configure @@ -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" diff --git a/libitm/configure.ac b/libitm/configure.ac index ac81b146845..78a682376d9 100644 --- a/libitm/configure.ac +++ b/libitm/configure.ac @@ -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" |