diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2018-07-17 14:18:47 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2018-07-17 14:18:47 +0100 |
commit | c3be340eb67fff7ef353d37bd02898f295ea0ef1 (patch) | |
tree | dbe147238a4363d6bfb653ac455c00499375f299 /libstdc++-v3/configure | |
parent | 79a88477ad431b7368b98f80f91077177383012d (diff) |
PR libstdc++/86450 use -Wabi=2 and simplify -Werror use
Use -Wabi=2 to fix warnings about -Wabi having no effect on its own.
This requires suppressing two warnings in src/c++11/debug.cc which do
not affect the library ABI.
Previously libstdc++ defaulted to --enable-werror but the -Werror flag
was not actually added unless --enable-maintainer-mode was used. This is
not documented and not the expected behaviour. This removes any special
treatment for maintainer-mode, makes -Werror depend directly on
--enable-werror, and changes the default to --enable-werror=no.
PR libstdc++/86450
* acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Don't define WERROR.
(GLIBCXX_EXPORT_FLAGS): Use -Wabi=2 instead of -Wabi.
* configure: Regenerate.
* configure.ac: Change GLIBCXX_ENABLE_WERROR default to "no".
* doc/Makefile.in: Regenerate.
* fragment.am: Set WERROR_FLAG to -Werror instead of $(WERROR).
* include/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* python/Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* src/c++11/Makefile.in: Regenerate.
* src/c++11/debug.cc: Use diagnostic pragmas to suppress warnings
from -Wabi=2 that don't affect exported symbols.
* src/c++98/Makefile.in: Regenerate.
* src/filesystem/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
From-SVN: r262824
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-x | libstdc++-v3/configure | 73 |
1 files changed, 16 insertions, 57 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index d126addd40a..101dcd9cb7c 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -728,7 +728,6 @@ BASIC_FILE_CC BASIC_FILE_H CSTDIO_H SECTION_FLAGS -WERROR ENABLE_FLOAT128_FALSE ENABLE_FLOAT128_TRUE thread_header @@ -1582,7 +1581,7 @@ Optional Features: memory [default=no] --enable-extern-template enable extern template [default=yes] - --enable-werror turns on -Werror [default=yes] + --enable-werror turns on -Werror [default=no] --enable-vtable-verify enable vtable verify [default=no] --enable-libstdcxx-time[=KIND] use KIND for check type [default=auto] @@ -11608,7 +11607,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11611 "configure" +#line 11610 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11714,7 +11713,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11717 "configure" +#line 11716 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12885,20 +12884,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' @@ -15400,7 +15399,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 15403 "configure" +#line 15402 "configure" int main() { typedef bool atomic_type; @@ -15435,7 +15434,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15438 "configure" +#line 15437 "configure" int main() { typedef short atomic_type; @@ -15470,7 +15469,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15473 "configure" +#line 15472 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -15506,7 +15505,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15509 "configure" +#line 15508 "configure" int main() { typedef long long atomic_type; @@ -15587,7 +15586,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 15590 "configure" +#line 15589 "configure" int main() { _Decimal32 d1; @@ -15629,7 +15628,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 15632 "configure" +#line 15631 "configure" template<typename T1, typename T2> struct same { typedef T2 type; }; @@ -15663,7 +15662,7 @@ $as_echo "$enable_int128" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15666 "configure" +#line 15665 "configure" template<typename T1, typename T2> struct same { typedef T2 type; }; @@ -15720,13 +15719,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" - # Check for maintainer-mode bits. - if test x"$USE_MAINTAINER_MODE" = xno; then - WERROR='' - else - WERROR='-Werror' - fi - # Check for -ffunction-sections -fdata-sections { $as_echo "$as_me:${as_lineno-$LINENO}: checking for g++ that supports -ffunction-sections -fdata-sections" >&5 $as_echo_n "checking for g++ that supports -ffunction-sections -fdata-sections... " >&6; } @@ -15769,7 +15761,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - # Enable all the variable C++ runtime options that don't require linking. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for underlying I/O to use" >&5 @@ -18104,7 +18095,7 @@ if test "${enable_werror+set}" = set; then : esac else - enable_werror=yes + enable_werror=no fi @@ -29055,13 +29046,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" - # Check for maintainer-mode bits. - if test x"$USE_MAINTAINER_MODE" = xno; then - WERROR='' - else - WERROR='-Werror' - fi - # Check for -ffunction-sections -fdata-sections { $as_echo "$as_me:${as_lineno-$LINENO}: checking for g++ that supports -ffunction-sections -fdata-sections" >&5 $as_echo_n "checking for g++ that supports -ffunction-sections -fdata-sections... " >&6; } @@ -29104,7 +29088,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - # If we're not using GNU ld, then there's no point in even trying these # tests. Check for that first. We should have already tested for gld # by now (in libtool), but require it now just to be safe... @@ -35049,13 +35032,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" - # Check for maintainer-mode bits. - if test x"$USE_MAINTAINER_MODE" = xno; then - WERROR='' - else - WERROR='-Werror' - fi - # Check for -ffunction-sections -fdata-sections { $as_echo "$as_me:${as_lineno-$LINENO}: checking for g++ that supports -ffunction-sections -fdata-sections" >&5 $as_echo_n "checking for g++ that supports -ffunction-sections -fdata-sections... " >&6; } @@ -35098,7 +35074,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - # If we're not using GNU ld, then there's no point in even trying these # tests. Check for that first. We should have already tested for gld # by now (in libtool), but require it now just to be safe... @@ -53809,13 +53784,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" - # Check for maintainer-mode bits. - if test x"$USE_MAINTAINER_MODE" = xno; then - WERROR='' - else - WERROR='-Werror' - fi - # Check for -ffunction-sections -fdata-sections { $as_echo "$as_me:${as_lineno-$LINENO}: checking for g++ that supports -ffunction-sections -fdata-sections" >&5 $as_echo_n "checking for g++ that supports -ffunction-sections -fdata-sections... " >&6; } @@ -53858,7 +53826,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - # If we're not using GNU ld, then there's no point in even trying these # tests. Check for that first. We should have already tested for gld # by now (in libtool), but require it now just to be safe... @@ -66510,13 +66477,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" - # Check for maintainer-mode bits. - if test x"$USE_MAINTAINER_MODE" = xno; then - WERROR='' - else - WERROR='-Werror' - fi - # Check for -ffunction-sections -fdata-sections { $as_echo "$as_me:${as_lineno-$LINENO}: checking for g++ that supports -ffunction-sections -fdata-sections" >&5 $as_echo_n "checking for g++ that supports -ffunction-sections -fdata-sections... " >&6; } @@ -66559,7 +66519,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - # If we're not using GNU ld, then there's no point in even trying these # tests. Check for that first. We should have already tested for gld # by now (in libtool), but require it now just to be safe... @@ -81846,7 +81805,7 @@ $as_echo "$gxx_include_dir" >&6; } # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc - WARN_FLAGS='-Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi' + WARN_FLAGS="-Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2" |