diff options
author | Phil Edwards <pme@sourceware.cygnus.com> | 2000-05-22 20:56:51 +0000 |
---|---|---|
committer | Phil Edwards <pme@gcc.gnu.org> | 2000-05-22 20:56:51 +0000 |
commit | 11a6e9a7dd748de0bff07728dab35ac433aa8928 (patch) | |
tree | 1172819d64a57f27a7b72703b8f23f3498e988c5 | |
parent | 678164a58ea994d4602b1f6b778cd354bcdf1593 (diff) | |
download | gcc-11a6e9a7dd748de0bff07728dab35ac433aa8928.zip gcc-11a6e9a7dd748de0bff07728dab35ac433aa8928.tar.gz gcc-11a6e9a7dd748de0bff07728dab35ac433aa8928.tar.bz2 |
acinclude.m4: If the new pragma isn't supported, don't kill -Werror...
2000-05-22 Phil Edwards <pme@sourceware.cygnus.com>
* 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
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 10 | ||||
-rw-r--r-- | libstdc++-v3/aclocal.m4 | 10 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 18 |
4 files changed, 26 insertions, 19 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a573c01..bf0ef0f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2000-05-22 Phil Edwards <pme@sourceware.cygnus.com> + + * 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 <ncm@cantrip.org> * bits/generic_shadow.h: s/swamp/legacy/ diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index f09896b..09074fe 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 2a7cf66..5162795 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 2e97aa3..db8f29a 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 <<EOF -#line 2118 "configure" +#line 2119 "configure" #include "confdefs.h" #pragma system_header int main() { @@ -2122,14 +2123,14 @@ int foo; ; return 0; } EOF -if { (eval echo configure:2126: \"$ac_compile\") 1>&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 |