configure.ac: Remove -Werror addition to WARN_FLAGS.
authorJakub Jelinek <jakub@redhat.com>
Wed, 29 Oct 2014 11:38:00 +0000 (12:38 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 29 Oct 2014 11:38:00 +0000 (12:38 +0100)
* configure.ac: Remove -Werror addition to WARN_FLAGS.  Add
ACX_PROG_CC_WARNINGS_ARE_ERRORS and AC_ARG_VAR for GMPINC.
* Makefile.am (AM_CPPFLAGS): Add $(GMPINC).
(WERROR_FLAG): Remove.
(AM_CXXFLAGS): Use $(WERROR) instead of $(WERROR_FLAG).
* configure: Regenerated.
* Makefile.in: Regenerated.

Co-Authored-By: Phil Muldoon <pmuldoon@redhat.com>
From-SVN: r216833

libcc1/ChangeLog
libcc1/Makefile.am
libcc1/Makefile.in
libcc1/configure
libcc1/configure.ac

index f059b29bc8b100186e9a41518d32c4f91a03867d..431b28859d58370da218a9fba1e5d55dd836081f 100644 (file)
@@ -1,3 +1,14 @@
+2014-10-29  Jakub Jelinek  <jakub@redhat.com>
+           Phil Muldoon  <pmuldoon@redhat.com>
+
+       * configure.ac: Remove -Werror addition to WARN_FLAGS.  Add
+       ACX_PROG_CC_WARNINGS_ARE_ERRORS and AC_ARG_VAR for GMPINC.
+       * Makefile.am (AM_CPPFLAGS): Add $(GMPINC).
+       (WERROR_FLAG): Remove.
+       (AM_CXXFLAGS): Use $(WERROR) instead of $(WERROR_FLAG).
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+
 2014-10-29  Jakub Jelinek  <jakub@redhat.com>
 
        * Makefile.am (CXXFLAGS, LDFLAGS): Filter out -fsanitize=address.
index 899a7df43f660348e1c21731ccc9f3e13992659c..ecab22ca30b72aa8579e549a7848fdef46f1d2d1 100644 (file)
@@ -21,9 +21,8 @@ gcc_build_dir = ../$(host_subdir)/gcc
 AM_CPPFLAGS = -I $(srcdir)/../include -I $(srcdir)/../libgcc \
        -I $(gcc_build_dir) -I$(srcdir)/../gcc \
        -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \
-       -I $(srcdir)/../libcpp/include
-WERROR_FLAG = -Werror
-AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility)
+       -I $(srcdir)/../libcpp/include $(GMPINC)
+AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility)
 override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS))
 override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
 # Can be simplified when libiberty becomes a normal convenience library.
index 9e5b67fe6c5ea81030aca6dc562f5734409f2c3b..ce752c06065f702e59307d79ee63e07ef2800ea7 100644 (file)
@@ -140,6 +140,7 @@ ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+GMPINC = @GMPINC@
 GREP = @GREP@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -178,6 +179,7 @@ SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
 WARN_FLAGS = @WARN_FLAGS@
+WERROR = @WERROR@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -247,10 +249,9 @@ gcc_build_dir = ../$(host_subdir)/gcc
 AM_CPPFLAGS = -I $(srcdir)/../include -I $(srcdir)/../libgcc \
        -I $(gcc_build_dir) -I$(srcdir)/../gcc \
        -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \
-       -I $(srcdir)/../libcpp/include
+       -I $(srcdir)/../libcpp/include $(GMPINC)
 
-WERROR_FLAG = -Werror
-AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR_FLAG) $(visibility)
+AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility)
 # Can be simplified when libiberty becomes a normal convenience library.
 libiberty_normal = ../libiberty/libiberty.a
 libiberty_noasan = ../libiberty/noasan/libiberty.a
index 06b6f52cc4d797d4251d0a407e4f579bedba5947..0c203a2a0f52919dc898c3cad46e20e9284417c0 100755 (executable)
@@ -605,6 +605,8 @@ LIBOBJS
 ENABLE_PLUGIN_FALSE
 ENABLE_PLUGIN_TRUE
 libsuffix
+GMPINC
+WERROR
 WARN_FLAGS
 gcc_version
 visibility
@@ -743,6 +745,7 @@ with_pic
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
+enable_werror_always
 enable_plugin
 '
       ac_precious_vars='build_alias
@@ -757,7 +760,8 @@ CPP
 CXX
 CXXFLAGS
 CCC
-CXXCPP'
+CXXCPP
+GMPINC'
 
 
 # Initialize some variables set by options.
@@ -1387,6 +1391,7 @@ Optional Features:
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-werror-always  enable -Werror despite compiler version
   --enable-plugin         enable plugin support
 
 Optional Packages:
@@ -1409,6 +1414,7 @@ Some influential environment variables:
   CXX         C++ compiler command
   CXXFLAGS    C++ compiler flags
   CXXCPP      C++ preprocessor
+  GMPINC      How to find GMP include files
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -10530,7 +10536,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10533 "configure"
+#line 10539 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10636,7 +10642,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10639 "configure"
+#line 10645 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
   done
 CFLAGS="$save_CFLAGS"
 
-WARN_FLAGS="$WARN_FLAGS -Werror"
+
+WERROR=
+# Check whether --enable-werror-always was given.
+if test "${enable_werror_always+set}" = set; then :
+  enableval=$enable_werror_always;
+else
+  enable_werror_always=no
+fi
+
+if test $enable_werror_always = yes; then :
+  WERROR="$WERROR${WERROR:+ }-Werror"
+fi
+
+
+
 
 
 libsuffix=
index 7328977d25759cc31a1317ff01ba485bcceb604a..1e0925ffcde4d3c0980c981beafaaa72c033a1cb 100644 (file)
@@ -52,8 +52,10 @@ gcc_version=`cat $srcdir/../gcc/BASE-VER`
 AC_SUBST(gcc_version)
 
 ACX_PROG_CC_WARNING_OPTS([-W -Wall], [WARN_FLAGS])
-WARN_FLAGS="$WARN_FLAGS -Werror"
 AC_SUBST(WARN_FLAGS)
+ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
+
+AC_ARG_VAR(GMPINC,[How to find GMP include files])
 
 libsuffix=
 if test "$GXX" = yes; then