summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2022-02-03 15:47:10 +0100
committerJakub Jelinek <jakub@redhat.com>2022-02-03 16:10:18 +0100
commit45ba6bf28b75ee3391df83fbfb1060a50dc63d3a (patch)
tree486d5ac3c903b1c6f1ea43c0841e3773d72e8b55 /libgomp
parent1d5c7584fd6e72bfdbede86cef5ff04ae35f9744 (diff)
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 'libgomp')
-rwxr-xr-xlibgomp/configure18
-rw-r--r--libgomp/configure.ac9
2 files changed, 20 insertions, 7 deletions
diff --git a/libgomp/configure b/libgomp/configure
index 37390ce5d66..a73a6d44003 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -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
diff --git a/libgomp/configure.ac b/libgomp/configure.ac
index bfb613b91f0..a9b1f3973f7 100644
--- a/libgomp/configure.ac
+++ b/libgomp/configure.ac
@@ -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)