When building target binaries, ensure that the warning flags selected for the command...
authorVlad Zakharov <vzakhar@synopsys.com>
Mon, 26 Sep 2016 15:36:08 +0000 (16:36 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 26 Sep 2016 15:36:08 +0000 (16:36 +0100)
bfd * warning.m4 (AC_EGREP_CPP_FOR_BUILD): Introduce macro
to verify CC_FOR_BUILD compiler.
(AM_BINUTILS_WARNINGS): Introduce ac_cpp_for_build variable
and add CC_FOR_BUILD compiler checks.
* Makefile.in: Regenerate.
* configure: Likewise.
* doc/Makefile.in: Likewise.

binutils * Makefile.am: Replace AM_CLFAGS with AM_CFLAGS_FOR_BUILD
when building with CC_FOR_BUILD compiler.
* Makefile.in: Regenerate.
* configure: Likewise.
* doc/Makefile.in: Likewise.

gas * Makefile.in: Regenerate.
* configure: Likewise.
* doc/Makefile.in: Likewise.

gold * Makefile.in: Regenerate.
* configure: Likewise.
* testsuite/Makefile.in: Likewise.

gprof * Makefile.in: Regenerate.
* configure: Likewise.

ld * Makefile.in: Regenerate.
* configure: Likewise.

opcodes * Makefile.in: Regenerate.
* configure: Likewise.

27 files changed:
bfd/ChangeLog
bfd/Makefile.in
bfd/configure
bfd/doc/Makefile.in
bfd/warning.m4
binutils/ChangeLog
binutils/Makefile.am
binutils/Makefile.in
binutils/configure
binutils/doc/Makefile.in
gas/ChangeLog
gas/Makefile.in
gas/configure
gas/doc/Makefile.in
gold/ChangeLog
gold/Makefile.in
gold/configure
gold/testsuite/Makefile.in
gprof/ChangeLog
gprof/Makefile.in
gprof/configure
ld/ChangeLog
ld/Makefile.in
ld/configure
opcodes/ChangeLog
opcodes/Makefile.in
opcodes/configure

index ce0670244d8afbe571b2dbd5646dfef1b1ec6e88..b95d68ca621040faf001f5e4ff8db8e34693b01b 100644 (file)
@@ -1,3 +1,13 @@
+2016-09-26  Vlad Zakharov  <vzakhar@synopsys.com>
+
+       * warning.m4 (AC_EGREP_CPP_FOR_BUILD): Introduce macro
+       to verify CC_FOR_BUILD compiler.
+       (AM_BINUTILS_WARNINGS): Introduce ac_cpp_for_build variable
+       and add CC_FOR_BUILD compiler checks.
+       * Makefile.in: Regenerate.
+       * configure: Likewise.
+       * doc/Makefile.in: Likewise.
+
 2016-09-26  Awson  <kyrab@mail.ru>
 
        PR ld/17955
index 7283ed95b48359592cf2164531b5c90b0eeb5811..02332ca9f29734acd6e442841566e28ebc55e116 100644 (file)
@@ -288,6 +288,7 @@ TDEFINES = @TDEFINES@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
index 3e033247c3c1728691516bb3167b51f0f8e53f64..828406952fba70d0f91a18d35ef82dd2be006889 100755 (executable)
@@ -659,6 +659,7 @@ MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
 WARN_WRITE_STRINGS
 NO_WERROR
+WARN_CFLAGS_FOR_BUILD
 WARN_CFLAGS
 REPORT_BUGS_TEXI
 REPORT_BUGS_TO
@@ -11427,7 +11428,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11430 "configure"
+#line 11431 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11533,7 +11534,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11536 "configure"
+#line 11537 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 # Set the 'development' global.
 . $srcdir/../bfd/development.sh
 
+# Set acp_cpp_for_build variable
+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
+
 # Default set of GCC warnings to enable.
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 
 # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 rm -f conftest*
 
 
+# Verify CC_FOR_BUILD to be compatible with waring flags
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-3]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
+fi
+rm -f conftest*
+
+
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-4]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
+fi
+rm -f conftest*
+
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
@@ -12301,6 +12336,7 @@ case "${host}" in
   *-*-mingw32*)
     if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
       GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
+      GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
     fi
     ;;
   *) ;;
 NO_WERROR=
 if test "${ERROR_ON_WARNING}" = yes ; then
     GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+    GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
     NO_WERROR="-Wno-error"
 fi
 
 if test "${GCC}" = yes ; then
   WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+  WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
 fi
 
 # Check whether --enable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then :
   enableval=$enable_build_warnings; case "${enableval}" in
-  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
   no)  if test "${GCC}" = yes ; then
          WARN_CFLAGS="-w"
+      WARN_CFLAGS_FOR_BUILD="-w"
        fi;;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
-  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
+  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
+        WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 fi
 
@@ -12346,6 +12389,7 @@ fi
 
 
 
+
 ac_config_headers="$ac_config_headers config.h:config.in"
 
 
index be737f67fc08d94457ff0f64cb2084ea532484da..b992872aa48d39eeece35aba06cf3cc4485b74c9 100644 (file)
@@ -248,6 +248,7 @@ TDEFINES = @TDEFINES@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
index 4c5b55d1f8c7896b8bb1e32d0c1abad2eb4ac403..3fe4340e7cbb3cf891a1aefdf3b0e7988c1e2311 100644 (file)
@@ -17,12 +17,34 @@ dnl along with this program; see the file COPYING3.  If not see
 dnl <http://www.gnu.org/licenses/>.
 dnl
 
+# AC_EGREP_CPP_FOR_BUILD(PATTERN, PROGRAM,
+#              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ------------------------------------------------------
+AC_DEFUN([AC_EGREP_CPP_FOR_BUILD],
+[AC_LANG_PREPROC_REQUIRE()dnl
+AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
+AS_IF([dnl eval is necessary to expand ac_cpp.
+dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
+(eval "$ac_cpp_for_build conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+dnl Quote $1 to prevent m4 from eating character classes
+  $EGREP "[$1]" >/dev/null 2>&1],
+  [$3],
+  [$4])
+rm -f conftest*
+])# AC_EGREP_CPP_FOR_BUILD
+
+
 AC_DEFUN([AM_BINUTILS_WARNINGS],[
 # Set the 'development' global.
 . $srcdir/../bfd/development.sh
 
+# Set acp_cpp_for_build variable
+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
+
 # Default set of GCC warnings to enable.
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 
 # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
 AC_EGREP_CPP([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow")
@@ -34,6 +56,14 @@ AC_EGREP_CPP([^[0-4]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usa
 WARN_WRITE_STRINGS=""
 AC_EGREP_CPP([^[0-3]$],[__GNUC__],,WARN_WRITE_STRINGS="-Wwrite-strings")
 
+# Verify CC_FOR_BUILD to be compatible with waring flags
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
+AC_EGREP_CPP_FOR_BUILD([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow")
+
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+AC_EGREP_CPP_FOR_BUILD([^[0-4]$],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144")
+
 AC_ARG_ENABLE(werror,
   [  --enable-werror         treat compile warnings as errors],
   [case "${enableval}" in
@@ -47,6 +77,7 @@ case "${host}" in
   *-*-mingw32*)
     if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
       GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
+      GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
     fi
     ;;
   *) ;;
@@ -60,25 +91,32 @@ fi
 NO_WERROR=
 if test "${ERROR_ON_WARNING}" = yes ; then
     GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+    GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
     NO_WERROR="-Wno-error"
 fi
 
 if test "${GCC}" = yes ; then
   WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+  WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
 fi
 
 AC_ARG_ENABLE(build-warnings,
 [  --enable-build-warnings enable build-time compiler warnings],
 [case "${enableval}" in
-  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}" 
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
   no)  if test "${GCC}" = yes ; then
          WARN_CFLAGS="-w"
+      WARN_CFLAGS_FOR_BUILD="-w" 
        fi;;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
-  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
+  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
+        WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac])
 
 if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
@@ -86,6 +124,7 @@ if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
 fi
 
 AC_SUBST(WARN_CFLAGS)
+AC_SUBST(WARN_CFLAGS_FOR_BUILD)
 AC_SUBST(NO_WERROR)
      AC_SUBST(WARN_WRITE_STRINGS)
 ])
index 0b4d1a5703413bb184277c0c8c7ae104e3d615c8..1b9cb24a1eec0fd68122392d6bc8a7b92cfdf7a0 100644 (file)
@@ -1,3 +1,11 @@
+2016-09-26  Vlad Zakharov  <vzakhar@synopsys.com>
+
+       * Makefile.am: Replace AM_CLFAGS with AM_CFLAGS_FOR_BUILD
+       when building with CC_FOR_BUILD compiler.
+       * Makefile.in: Regenerate.
+       * configure: Likewise.
+       * doc/Makefile.in: Likewise.
+
 2016-09-26  Alan Modra  <amodra@gmail.com>
 
        * readelf.c (display_power_gnu_attribute): Catch truncated section
index 18af2c886bc859f79ba0e2f99800442a61ff9bf9..ef179147dcd75c07b5eed5b90c733a979fcabe6d 100644 (file)
@@ -47,8 +47,10 @@ ZLIB = @zlibdir@ -lz
 ZLIBINC = @zlibinc@
 
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 NO_WERROR = @NO_WERROR@
 AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
+AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD) $(ZLIBINC)
 LIBICONV = @LIBICONV@
 
 # these two are almost the same program
@@ -305,17 +307,17 @@ sysinfo$(EXEEXT_FOR_BUILD): sysinfo.@OBJEXT@ syslex_wrap.@OBJEXT@
        $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.@OBJEXT@ syslex_wrap.@OBJEXT@
 
 syslex_wrap.@OBJEXT@: syslex_wrap.c syslex.c sysinfo.h config.h
-       $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c
+       $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c
 
 sysinfo.@OBJEXT@: sysinfo.c
        if [ -r sysinfo.c ]; then \
-         $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \
+         $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \
        else \
-         $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \
+         $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \
        fi
 
 bin2c$(EXEEXT_FOR_BUILD): bin2c.c
-       $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
+       $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
 
 embedspu: embedspu.sh Makefile
        awk '/^program_transform_name=/ {print "program_transform_name=\"$(program_transform_name)\""; next} {print}' < $< > $@
index 215ff702f0c1b36ae543ac0a76e22aea64b64ca6..5b62333d69fd13961657ea9fc92b558a17114e1d 100644 (file)
@@ -401,6 +401,7 @@ STRIP = @STRIP@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
 YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
@@ -478,6 +479,7 @@ am__skipyacc =
 ZLIB = @zlibdir@ -lz
 ZLIBINC = @zlibinc@
 AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
+AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD) $(ZLIBINC)
 
 # these two are almost the same program
 AR_PROG = ar
@@ -1370,17 +1372,17 @@ sysinfo$(EXEEXT_FOR_BUILD): sysinfo.@OBJEXT@ syslex_wrap.@OBJEXT@
        $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.@OBJEXT@ syslex_wrap.@OBJEXT@
 
 syslex_wrap.@OBJEXT@: syslex_wrap.c syslex.c sysinfo.h config.h
-       $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c
+       $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c
 
 sysinfo.@OBJEXT@: sysinfo.c
        if [ -r sysinfo.c ]; then \
-         $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \
+         $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \
        else \
-         $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \
+         $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \
        fi
 
 bin2c$(EXEEXT_FOR_BUILD): bin2c.c
-       $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
+       $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
 
 embedspu: embedspu.sh Makefile
        awk '/^program_transform_name=/ {print "program_transform_name=\"$(program_transform_name)\""; next} {print}' < $< > $@
index 79dcbd008e818e86ec9c6a97cf99f2cf6bcb5e25..610d07ebdc2605aca6a3251ee804c9dd59c14d86 100755 (executable)
@@ -652,6 +652,7 @@ YFLAGS
 YACC
 WARN_WRITE_STRINGS
 NO_WERROR
+WARN_CFLAGS_FOR_BUILD
 WARN_CFLAGS
 OTOOL64
 OTOOL
@@ -11225,7 +11226,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11228 "configure"
+#line 11229 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11331,7 +11332,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11334 "configure"
+#line 11335 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11945,8 +11946,12 @@ _ACEOF
 # Set the 'development' global.
 . $srcdir/../bfd/development.sh
 
+# Set acp_cpp_for_build variable
+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
+
 # Default set of GCC warnings to enable.
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 
 # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 rm -f conftest*
 
 
+# Verify CC_FOR_BUILD to be compatible with waring flags
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-3]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
+fi
+rm -f conftest*
+
+
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-4]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
+fi
+rm -f conftest*
+
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
@@ -12006,6 +12041,7 @@ case "${host}" in
   *-*-mingw32*)
     if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
       GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
+      GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
     fi
     ;;
   *) ;;
 NO_WERROR=
 if test "${ERROR_ON_WARNING}" = yes ; then
     GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+    GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
     NO_WERROR="-Wno-error"
 fi
 
 if test "${GCC}" = yes ; then
   WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+  WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
 fi
 
 # Check whether --enable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then :
   enableval=$enable_build_warnings; case "${enableval}" in
-  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
   no)  if test "${GCC}" = yes ; then
          WARN_CFLAGS="-w"
+      WARN_CFLAGS_FOR_BUILD="-w"
        fi;;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
-  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
+  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
+        WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 fi
 
@@ -12051,6 +12094,7 @@ fi
 
 
 
+
 ac_config_headers="$ac_config_headers config.h:config.in"
 
 
index ea3f938ead3428d570548aac69fe3269255f1439..8d9fc2df9b70257a3a6e4e571c0f70a0a41c7083 100644 (file)
@@ -249,6 +249,7 @@ STRIP = @STRIP@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
 YACC = @YACC@
index f5f22989433e195124014441cb3f7fff29eebb82..3d6bf9440d6ec389ae344320ef471b81ee210d1a 100644 (file)
@@ -1,3 +1,9 @@
+2016-09-26  Vlad Zakharov  <vzakhar@synopsys.com>
+
+       * Makefile.in: Regenerate.
+       * configure: Likewise.
+       * doc/Makefile.in: Likewise.
+
 2016-09-26  Alan Modra  <amodra@gmail.com>
 
        * config/tc-ppc.c (ppc_elf_gnu_attribute): New function.
index 19b63f36c17ee9876c966483c34eb14a3de791f2..6896609ed32e3bcc62afee08fdf418dba0f282cd 100644 (file)
@@ -255,6 +255,7 @@ STRIP = @STRIP@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@ @WARN_WRITE_STRINGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
 YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi`
index 29ec28e96612547a1df6b70dc5cabfecd08c3e18..6fae0d9d705a2bcd4bfdccd68f6d0ed3618995ba 100755 (executable)
@@ -642,6 +642,7 @@ cgen_cpu_prefix
 GDBINIT
 WARN_WRITE_STRINGS
 NO_WERROR
+WARN_CFLAGS_FOR_BUILD
 WARN_CFLAGS
 OTOOL64
 OTOOL
@@ -10985,7 +10986,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10988 "configure"
+#line 10989 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11091,7 +11092,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11094 "configure"
+#line 11095 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11721,8 +11722,12 @@ using_cgen=no
 # Set the 'development' global.
 . $srcdir/../bfd/development.sh
 
+# Set acp_cpp_for_build variable
+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
+
 # Default set of GCC warnings to enable.
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 
 # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 rm -f conftest*
 
 
+# Verify CC_FOR_BUILD to be compatible with waring flags
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-3]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
+fi
+rm -f conftest*
+
+
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-4]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
+fi
+rm -f conftest*
+
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
@@ -11782,6 +11817,7 @@ case "${host}" in
   *-*-mingw32*)
     if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
       GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
+      GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
     fi
     ;;
   *) ;;
 NO_WERROR=
 if test "${ERROR_ON_WARNING}" = yes ; then
     GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+    GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
     NO_WERROR="-Wno-error"
 fi
 
 if test "${GCC}" = yes ; then
   WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+  WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
 fi
 
 # Check whether --enable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then :
   enableval=$enable_build_warnings; case "${enableval}" in
-  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
   no)  if test "${GCC}" = yes ; then
          WARN_CFLAGS="-w"
+      WARN_CFLAGS_FOR_BUILD="-w"
        fi;;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
-  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
+  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
+        WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 fi
 
@@ -11827,6 +11870,7 @@ fi
 
 
 
+
 # Generate a header file
 ac_config_headers="$ac_config_headers config.h:config.in"
 
index 9ca5e8e8561a49ce81da34dee18735d24fcfe739..5f09b6c5812038fed057212717f3d108b7f53ce1 100644 (file)
@@ -230,6 +230,7 @@ STRIP = @STRIP@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
 YACC = @YACC@
index 6939b5ba4e2525d60c3a835a5f90154435079dce..d791d2940f2f5be98fc3a1182faff7f9f52fde6d 100644 (file)
@@ -1,3 +1,9 @@
+2016-09-26  Vlad Zakharov  <vzakhar@synopsys.com>
+
+       * Makefile.in: Regenerate.
+       * configure: Likewise.
+       * testsuite/Makefile.in: Likewise.
+
 2016-09-26  Alan Modra  <amodra@gmail.com>
 
        * aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid
index ec674485af0c8db987b4be65440a60835797b740..98ab28e0b644ec7ddd1093493c37d391ab3bc679 100644 (file)
@@ -87,8 +87,8 @@ subdir = .
 DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \
        $(srcdir)/Makefile.am $(top_srcdir)/configure \
        $(am__configure_deps) $(srcdir)/config.in \
-       $(srcdir)/../mkinstalldirs $(top_srcdir)/po/Make-in \
-       ftruncate.c pread.c mremap.c ffsll.c yyscript.h yyscript.c \
+       $(srcdir)/../mkinstalldirs $(top_srcdir)/po/Make-in ffsll.c \
+       mremap.c ftruncate.c pread.c yyscript.h yyscript.c \
        $(srcdir)/../depcomp $(srcdir)/../ylwrap
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
@@ -409,6 +409,7 @@ TARGETOBJS = @TARGETOBJS@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 WARN_CXXFLAGS = @WARN_CXXFLAGS@
 WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
index 8240c28a91e8a0f65a9c8c747878f238091db048..343a407c1123a804a86ea9eea35cbf6eedf789a2 100755 (executable)
@@ -609,6 +609,7 @@ GOLD_LDFLAGS
 WARN_CXXFLAGS
 WARN_WRITE_STRINGS
 NO_WERROR
+WARN_CFLAGS_FOR_BUILD
 WARN_CFLAGS
 IFUNC_STATIC_FALSE
 IFUNC_STATIC_TRUE
@@ -6723,8 +6724,12 @@ fi
 # Set the 'development' global.
 . $srcdir/../bfd/development.sh
 
+# Set acp_cpp_for_build variable
+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
+
 # Default set of GCC warnings to enable.
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 
 # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6769,6 +6774,36 @@ fi
 rm -f conftest*
 
 
+# Verify CC_FOR_BUILD to be compatible with waring flags
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-3]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
+fi
+rm -f conftest*
+
+
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-4]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
+fi
+rm -f conftest*
+
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
@@ -6784,6 +6819,7 @@ case "${host}" in
   *-*-mingw32*)
     if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
       GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
+      GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
     fi
     ;;
   *) ;;
@@ -6797,25 +6833,32 @@ fi
 NO_WERROR=
 if test "${ERROR_ON_WARNING}" = yes ; then
     GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+    GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
     NO_WERROR="-Wno-error"
 fi
 
 if test "${GCC}" = yes ; then
   WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+  WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
 fi
 
 # Check whether --enable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then :
   enableval=$enable_build_warnings; case "${enableval}" in
-  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
   no)  if test "${GCC}" = yes ; then
          WARN_CFLAGS="-w"
+      WARN_CFLAGS_FOR_BUILD="-w"
        fi;;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
-  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
+  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
+        WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 fi
 
@@ -6829,6 +6872,7 @@ fi
 
 
 
+
 WARN_CXXFLAGS=`echo ${WARN_CFLAGS} | sed -e 's/-Wstrict-prototypes//' -e 's/-Wmissing-prototypes//' -e 's/-Wshadow//'`
 
 
index f55aee8e04a0351946afd8042e7ffabc68d2094f..a2005407b6413da5af21483acaf31efea0c69d76 100644 (file)
@@ -2588,6 +2588,7 @@ TARGETOBJS = @TARGETOBJS@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 WARN_CXXFLAGS = @WARN_CXXFLAGS@
 WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
index 176a8f9ab5c2a82ea9376cfb5faaf9b6a79e226f..6e6fd67026b97bb632e7a235814803adb858a5d1 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-26  Vlad Zakharov  <vzakhar@synopsys.com>
+
+       * Makefile.in: Regenerate.
+       * configure: Likewise.
+
 2016-08-30  Nick Clifton  <nickc@redhat.com>
 
        PR gprof/20499
index 67e85cd7ec417d169ff14a736fbcf90996ae50b9..b1b357c2cf515200a25698d969b5a80e50f23a47 100644 (file)
@@ -267,6 +267,7 @@ STRIP = @STRIP@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
index 431f7b8212fbfcd77d68685aa27cbd0fa9ea6321..97363ee8616356b51408915052f16ea863be9d38 100755 (executable)
@@ -604,6 +604,7 @@ LTLIBOBJS
 LIBOBJS
 WARN_WRITE_STRINGS
 NO_WERROR
+WARN_CFLAGS_FOR_BUILD
 WARN_CFLAGS
 GENINSRC_NEVER_FALSE
 GENINSRC_NEVER_TRUE
@@ -10901,7 +10902,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10904 "configure"
+#line 10905 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11007,7 +11008,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11010 "configure"
+#line 11011 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 # Set the 'development' global.
 . $srcdir/../bfd/development.sh
 
+# Set acp_cpp_for_build variable
+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
+
 # Default set of GCC warnings to enable.
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 
 # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 rm -f conftest*
 
 
+# Verify CC_FOR_BUILD to be compatible with waring flags
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-3]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
+fi
+rm -f conftest*
+
+
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-4]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
+fi
+rm -f conftest*
+
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
@@ -12162,6 +12197,7 @@ case "${host}" in
   *-*-mingw32*)
     if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
       GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
+      GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
     fi
     ;;
   *) ;;
 NO_WERROR=
 if test "${ERROR_ON_WARNING}" = yes ; then
     GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+    GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
     NO_WERROR="-Wno-error"
 fi
 
 if test "${GCC}" = yes ; then
   WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+  WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
 fi
 
 # Check whether --enable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then :
   enableval=$enable_build_warnings; case "${enableval}" in
-  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
   no)  if test "${GCC}" = yes ; then
          WARN_CFLAGS="-w"
+      WARN_CFLAGS_FOR_BUILD="-w"
        fi;;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
-  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
+  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
+        WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 fi
 
@@ -12212,6 +12255,7 @@ fi
 
 
 
+
 ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in"
 
 cat >confcache <<\_ACEOF
index 3f43b6439de817467b0ef0b2d1dc29b1963357f6..1a443bcc5e0db14b9d7b2a0c0feb84782aa8e2c0 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-26  Vlad Zakharov  <vzakhar@synopsys.com>
+
+       * Makefile.in: Regenerate.
+       * configure: Likewise.
+
 2016-09-26  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-powerpc/attr-gnu-4-4.s: Delete.
index 48b7ba73bb97ee96f5112ff0b352e8740bc52f48..3511e5f12083def798567b1f30291f89a160bdde 100644 (file)
@@ -354,6 +354,7 @@ TESTBFDLIB = @TESTBFDLIB@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
 YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
@@ -508,7 +509,7 @@ CXX_FOR_TARGET = ` \
   fi`
 
 
-# Strip out sanitization options as they require special host libraries.
+# Strip out sanitization options as we want to test building binaries without any extra paraphernalia
 CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
 CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
 info_TEXINFOS = ld.texinfo
index 6adc94da0b046b24d52c930f2cc85ccf8fe1577a..3f82f35fdd9301d83f5d90d7b2958fdcf052104e 100755 (executable)
@@ -646,6 +646,7 @@ LIBINTL
 USE_NLS
 WARN_WRITE_STRINGS
 NO_WERROR
+WARN_CFLAGS_FOR_BUILD
 WARN_CFLAGS
 installed_linker
 install_as_default
@@ -11723,7 +11724,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11726 "configure"
+#line 11727 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11829,7 +11830,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11832 "configure"
+#line 11833 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 # Set the 'development' global.
 . $srcdir/../bfd/development.sh
 
+# Set acp_cpp_for_build variable
+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
+
 # Default set of GCC warnings to enable.
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 
 # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 rm -f conftest*
 
 
+# Verify CC_FOR_BUILD to be compatible with waring flags
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-3]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
+fi
+rm -f conftest*
+
+
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-4]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
+fi
+rm -f conftest*
+
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
@@ -15619,6 +15654,7 @@ case "${host}" in
   *-*-mingw32*)
     if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
       GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
+      GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
     fi
     ;;
   *) ;;
 NO_WERROR=
 if test "${ERROR_ON_WARNING}" = yes ; then
     GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+    GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
     NO_WERROR="-Wno-error"
 fi
 
 if test "${GCC}" = yes ; then
   WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+  WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
 fi
 
 # Check whether --enable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then :
   enableval=$enable_build_warnings; case "${enableval}" in
-  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
   no)  if test "${GCC}" = yes ; then
          WARN_CFLAGS="-w"
+      WARN_CFLAGS_FOR_BUILD="-w"
        fi;;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
-  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
+  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
+        WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 fi
 
@@ -15665,6 +15708,7 @@ fi
 
 
 
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
 $as_echo_n "checking for LC_MESSAGES... " >&6; }
 if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
index 282b4768dfd35b2dd6d298bf98d7e4e140b2437a..1613154249ba5cc9424f7a24a738c5f967fe7413 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-26  Vlad Zakharov  <vzakhar@synopsys.com>
+
+       * Makefile.in: Regenerate.
+       * configure: Likewise.
+
 2016-09-26  Claudiu Zissulescu  <claziss@synopsys.com>
 
        * arc-ext-tbl.h (EXTINSN2OPF): Define.
index 80cef601e9d0af7c3f0828782978174f97f38f3f..44e5c04ce80783db36c55960f5158ffd209e0707 100644 (file)
@@ -267,6 +267,7 @@ STRIP = @STRIP@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
index 252ab2f397e72424159afa3726ad6c10b311a97e..031da2fa9ca5f916b1eef8add67f6c50ef96677a 100755 (executable)
@@ -643,6 +643,7 @@ MAINTAINER_MODE_TRUE
 NO_WMISSING_FIELD_INITIALIZERS
 WARN_WRITE_STRINGS
 NO_WERROR
+WARN_CFLAGS_FOR_BUILD
 WARN_CFLAGS
 OTOOL64
 OTOOL
@@ -11150,7 +11151,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11153 "configure"
+#line 11154 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11256,7 +11257,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11259 "configure"
+#line 11260 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 # Set the 'development' global.
 . $srcdir/../bfd/development.sh
 
+# Set acp_cpp_for_build variable
+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
+
 # Default set of GCC warnings to enable.
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 
 # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 rm -f conftest*
 
 
+# Verify CC_FOR_BUILD to be compatible with waring flags
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-3]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
+fi
+rm -f conftest*
+
+
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__GNUC__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^[0-4]$" >/dev/null 2>&1; then :
+
+else
+  GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
+fi
+rm -f conftest*
+
+
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
@@ -11569,6 +11604,7 @@ case "${host}" in
   *-*-mingw32*)
     if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
       GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
+      GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
     fi
     ;;
   *) ;;
 NO_WERROR=
 if test "${ERROR_ON_WARNING}" = yes ; then
     GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+    GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
     NO_WERROR="-Wno-error"
 fi
 
 if test "${GCC}" = yes ; then
   WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+  WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
 fi
 
 # Check whether --enable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then :
   enableval=$enable_build_warnings; case "${enableval}" in
-  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+  yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
   no)  if test "${GCC}" = yes ; then
          WARN_CFLAGS="-w"
+      WARN_CFLAGS_FOR_BUILD="-w"
        fi;;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+        WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
+        WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
-  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
+        WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
+  *)    WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
+        WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 fi
 
@@ -11613,6 +11656,7 @@ fi
 
 
 
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
This page took 0.069016 seconds and 4 git commands to generate.