aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/configure.in')
-rw-r--r--gcc/configure.in17
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/configure.in b/gcc/configure.in
index a821343..ac95b4b 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -329,15 +329,30 @@ AC_SUBST(NO_MINUS_C_MINUS_O)
gcc_AC_C_LONG_DOUBLE
+AC_MSG_CHECKING(whether ${CC-cc} accepts -Wno-long-long)
+echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -Wno-long-long -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_no_long_long=yes
+else
+ ac_cv_prog_cc_no_long_long=no
+fi
+rm -f conftest*
+echo "$ac_t"$ac_cv_prog_cc_no_long_long 1>&6
+
# If the native compiler is GCC, we can enable warnings even in stage1.
# That's useful for people building cross-compilers, or just running a
# quick `make'.
+stage1_warn_cflags=" -W -Wall -Wtraditional -Wwrite-strings"
+stage2_warn_cflags="$stage1_warn_cflags -pedantic -Wno-long-long"
if test "x$GCC" = "xyes"; then
- stage1_warn_cflags='$(WARN_CFLAGS)'
+ if test $ac_cv_prog_cc_no_long_long = yes; then
+ stage1_warn_cflags="$stage1_warn_cflags -pedantic -Wno-long-long"
+ fi
else
stage1_warn_cflags=""
fi
AC_SUBST(stage1_warn_cflags)
+AC_SUBST(stage2_warn_cflags)
AC_PROG_MAKE_SET