summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-14 08:10:41 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-14 08:10:41 +0000
commitc7cc973b32dacc96ccbe4a7612f8cd2698739f77 (patch)
treee1649df2ad83de07dc779eac38c55ae683384d82 /libiberty
parent727a2c40983fa2885a0f7c95807e42002f19297b (diff)
downloadgcc-c7cc973b32dacc96ccbe4a7612f8cd2698739f77.tar.gz
gcc:
2007-06-14 Paolo Bonzini <bonzini@gnu.org> * acinclude.m4 (gcc_AC_CHECK_PROG_VER): Remove. * aclocal.m4: Regenerate. * configure.ac: Use ACX_PROG_CC_WARNING_OPTS, ACX_PROG_CC_WARNINGS_ARE_ERRORS, ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_CHECK_PROG_VER. * configure: Regenerate. * Makefile.in (LOOSE_WARN): Subst loose_warn. * Makefile.in (quickstrap): Build libgcc too. libiberty: 2007-06-14 Paolo Bonzini <bonzini@gnu.org> * aclocal.m4: Include config/warnings.m4. * configure.ac: Use ACX_PROG_CC_WARNING_OPTS. * configure: Regenerate. config: 2007-06-14 Paolo Bonzini <bonzini@gnu.org> * acx.m4 (ACX_CHECK_PROG_VER): Remove duplicate lines. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125700 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/aclocal.m41
-rwxr-xr-xlibiberty/configure46
-rw-r--r--libiberty/configure.ac22
4 files changed, 36 insertions, 39 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 233b175d5c7..9a80ed4a1f2 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * aclocal.m4: Include config/warnings.m4.
+ * configure.ac: Use ACX_PROG_CC_WARNING_OPTS.
+ * configure: Regenerate.
+
2007-06-07 Geoffrey Keating <geoffk@apple.com>
* configure.ac: Non-default multilibs can be cross compilations.
diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4
index 0b49d032122..643939e9d78 100644
--- a/libiberty/aclocal.m4
+++ b/libiberty/aclocal.m4
@@ -1,5 +1,6 @@
sinclude(../config/acx.m4)
sinclude(../config/no-executables.m4)
+sinclude(../config/warnings.m4)
dnl See whether strncmp reads past the end of its string parameters.
dnl On some versions of SunOS4 at least, strncmp reads a word at a time
diff --git a/libiberty/configure b/libiberty/configure
index c745d8ba34e..d350af78985 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -2953,22 +2953,33 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_c_preproc_warn_flag=yes
-# Warn C++ incompatibilities if supported.
-echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5
-echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then
+ac_libiberty_warn_cflags=
+save_CFLAGS="$CFLAGS"
+for option in -W -Wall -pedantic -Wwrite-strings -Wc++-compat \
+ -Wstrict-prototypes; do
+ as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
+
+ echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
+echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
+if eval "test \"\${$as_acx_Woption+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- save_CFLAGS="$CFLAGS"
- CFLAGS="-Wc++-compat"
- cat >conftest.$ac_ext <<_ACEOF
+ CFLAGS="$option"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+int
+main ()
+{
+
+ ;
+ return 0;
+}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -2992,28 +3003,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_prog_cc_w_cxx_compat=yes
+ eval "$as_acx_Woption=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_prog_cc_w_cxx_compat=no
+eval "$as_acx_Woption=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6
-
-
-if test x$GCC = xyes; then
- ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes'
-fi
-if test $ac_cv_prog_cc_w_cxx_compat = yes ; then
- ac_libiberty_warn_cflags="${ac_libiberty_warn_cflags} -Wc++-compat"
+echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
+ if test `eval echo '${'$as_acx_Woption'}'` = yes; then
+ ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$option"
fi
+ done
+CFLAGS="$save_CFLAGS"
+
if test "x$CC" != xcc; then
echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index cdc3cd38f62..82123781b39 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -132,26 +132,8 @@ GCC_NO_EXECUTABLES
AC_PROG_CC
AC_PROG_CPP_WERROR
-# Warn C++ incompatibilities if supported.
-AC_CACHE_CHECK(
- [whether ${CC} accepts -Wc++-compat],
- [ac_cv_prog_cc_w_cxx_compat],
- [save_CFLAGS="$CFLAGS"
- CFLAGS="-Wc++-compat"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],
- [ac_cv_prog_cc_w_cxx_compat=yes],
- [ac_cv_prog_cc_w_cxx_compat=no])
- CFLAGS="$save_CFLAGS"
- ])
-
-
-if test x$GCC = xyes; then
- ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes'
-fi
-if test $ac_cv_prog_cc_w_cxx_compat = yes ; then
- ac_libiberty_warn_cflags="${ac_libiberty_warn_cflags} -Wc++-compat"
-fi
-AC_SUBST(ac_libiberty_warn_cflags)
+ACX_PROG_CC_WARNING_OPTS([-W -Wall -pedantic -Wwrite-strings -Wc++-compat \
+ -Wstrict-prototypes], [ac_libiberty_warn_cflags])
AC_PROG_CC_C_O
# autoconf is lame and doesn't give us any substitution variable for this.