From 11a6e9a7dd748de0bff07728dab35ac433aa8928 Mon Sep 17 00:00:00 2001 From: Phil Edwards Date: Mon, 22 May 2000 20:56:51 +0000 Subject: [PATCH] acinclude.m4: If the new pragma isn't supported, don't kill -Werror... 2000-05-22 Phil Edwards * acinclude.m4: If the new pragma isn't supported, don't kill -Werror; keep -Werror and add -Wno-unknown-pragma. -Werror Is Good. * aclocal.m4: Regenerate. * configure: Regenerate. From-SVN: r34088 --- libstdc++-v3/ChangeLog | 7 +++++++ libstdc++-v3/acinclude.m4 | 10 +++++----- libstdc++-v3/aclocal.m4 | 10 +++++----- libstdc++-v3/configure | 18 +++++++++--------- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a573c018fe0..bf0ef0f971e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2000-05-22 Phil Edwards + + * acinclude.m4: If the new pragma isn't supported, don't kill -Werror; + keep -Werror and add -Wno-unknown-pragma. -Werror Is Good. + * aclocal.m4: Regenerate. + * configure: Regenerate. + 2000-05-19 Nathan C. Myers * bits/generic_shadow.h: s/swamp/legacy/ diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index f09896b5a5a..09074fee77a 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -171,6 +171,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above")) AC_MSG_RESULT($gpp_satisfactory) + WERROR='-Werror' AC_MSG_CHECKING([for g++ that supports new system_header pragma]) AC_LANG_SAVE AC_LANG_CPLUSPLUS @@ -180,7 +181,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS='-Wunknown-pragmas -Werror' AC_TRY_COMPILE([#pragma system_header], [int foo; - ], [WERROR='-Werror'], [WERROR='']) + ], [ac_newpragma=yes], [ac_newpragma=no]) if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS="$ac_save_CXXFLAGS" else @@ -188,11 +189,10 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ CXXFLAGS='' fi AC_LANG_RESTORE - if test "$WERROR" = ""; then - AC_MSG_RESULT(no) - else - AC_MSG_RESULT(yes) + if test "$ac_newpragma" = "no"; then + WERROR="$WERROR -Wno-unknown-pragmas" fi + AC_MSG_RESULT($ac_newpragma) AC_MSG_CHECKING([for g++ that supports new inlining mechanism]) AC_EGREP_CPP([ok], [ diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4 index 2a7cf66979a..5162795db0d 100644 --- a/libstdc++-v3/aclocal.m4 +++ b/libstdc++-v3/aclocal.m4 @@ -183,6 +183,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above")) AC_MSG_RESULT($gpp_satisfactory) + WERROR='-Werror' AC_MSG_CHECKING([for g++ that supports new system_header pragma]) AC_LANG_SAVE AC_LANG_CPLUSPLUS @@ -192,7 +193,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS='-Wunknown-pragmas -Werror' AC_TRY_COMPILE([#pragma system_header], [int foo; - ], [WERROR='-Werror'], [WERROR='']) + ], [ac_newpragma=yes], [ac_newpragma=no]) if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS="$ac_save_CXXFLAGS" else @@ -200,11 +201,10 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ CXXFLAGS='' fi AC_LANG_RESTORE - if test "$WERROR" = ""; then - AC_MSG_RESULT(no) - else - AC_MSG_RESULT(yes) + if test "$ac_newpragma" = "no"; then + WERROR="$WERROR -Wno-unknown-pragmas" fi + AC_MSG_RESULT($ac_newpragma) AC_MSG_CHECKING([for g++ that supports new inlining mechanism]) AC_EGREP_CPP([ok], [ diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 2e97aa3a5ad..db8f29adf01 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -2098,8 +2098,9 @@ rm -f conftest* echo "$ac_t""$gpp_satisfactory" 1>&6 + WERROR='-Werror' echo $ac_n "checking for g++ that supports new system_header pragma""... $ac_c" 1>&6 -echo "configure:2103: checking for g++ that supports new system_header pragma" >&5 +echo "configure:2104: checking for g++ that supports new system_header pragma" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2114,7 +2115,7 @@ cross_compiling=$ac_cv_prog_cxx_cross ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS='-Wunknown-pragmas -Werror' cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - WERROR='-Werror' + ac_newpragma=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - WERROR='' + ac_newpragma=no fi rm -f conftest* if test "$ac_test_CXXFLAGS" = set; then @@ -2145,11 +2146,10 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross - if test "$WERROR" = ""; then - echo "$ac_t""no" 1>&6 - else - echo "$ac_t""yes" 1>&6 + if test "$ac_newpragma" = "no"; then + WERROR="$WERROR -Wno-unknown-pragmas" fi + echo "$ac_t""$ac_newpragma" 1>&6 echo $ac_n "checking for g++ that supports new inlining mechanism""... $ac_c" 1>&6 echo "configure:2156: checking for g++ that supports new inlining mechanism" >&5 -- 2.30.2