1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258 |
- From b8ff24c72174effd5c5527866313982e28507275 Mon Sep 17 00:00:00 2001
- From: Vlad Zakharov <vzakhar@synopsys.com>
- Date: Mon, 26 Sep 2016 16:36:08 +0100
- Subject: [PATCH 2/2] When building target binaries, ensure that the warning
- flags selected for the command line match the target compiler.
- 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.
- ---
- bfd/Makefile.in | 1 +
- bfd/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
- bfd/doc/Makefile.in | 1 +
- bfd/warning.m4 | 47 ++++++++++++++++++++++++++++++++++----
- binutils/Makefile.am | 10 +++++----
- binutils/Makefile.in | 10 +++++----
- binutils/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
- binutils/doc/Makefile.in | 1 +
- gas/Makefile.in | 1 +
- gas/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
- gas/doc/Makefile.in | 1 +
- gold/Makefile.in | 5 +++--
- gold/configure | 52 ++++++++++++++++++++++++++++++++++++++----
- gold/testsuite/Makefile.in | 1 +
- gprof/Makefile.in | 1 +
- gprof/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
- ld/Makefile.in | 3 ++-
- ld/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
- opcodes/Makefile.in | 1 +
- opcodes/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
- 20 files changed, 416 insertions(+), 55 deletions(-)
- --- a/bfd/Makefile.in
- +++ b/bfd/Makefile.in
- @@ -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@
- --- a/bfd/configure
- +++ b/bfd/configure
- @@ -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
- @@ -12240,8 +12241,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
- @@ -12286,6 +12291,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
- @@ -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
- ;;
- *) ;;
- @@ -12314,25 +12350,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
-
- @@ -12343,6 +12386,7 @@ fi
-
-
-
- +
-
-
-
- --- a/bfd/doc/Makefile.in
- +++ b/bfd/doc/Makefile.in
- @@ -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@
- --- a/bfd/warning.m4
- +++ b/bfd/warning.m4
- @@ -17,12 +17,34 @@ dnl along with this program; see the fil
- 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_W
- 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"$
- fi
-
- AC_SUBST(WARN_CFLAGS)
- +AC_SUBST(WARN_CFLAGS_FOR_BUILD)
- AC_SUBST(NO_WERROR)
- AC_SUBST(WARN_WRITE_STRINGS)
- ])
- --- a/binutils/Makefile.am
- +++ b/binutils/Makefile.am
- @@ -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.@OBJ
- $(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}' < $< > $@
- --- a/binutils/Makefile.in
- +++ b/binutils/Makefile.in
- @@ -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.@OBJ
- $(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}' < $< > $@
- --- a/binutils/configure
- +++ b/binutils/configure
- @@ -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
- @@ -11991,6 +11996,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
- @@ -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
- ;;
- *) ;;
- @@ -12019,25 +12055,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
-
- @@ -12048,6 +12091,7 @@ fi
-
-
-
- +
-
-
-
- --- a/binutils/doc/Makefile.in
- +++ b/binutils/doc/Makefile.in
- @@ -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@
- --- a/gas/Makefile.in
- +++ b/gas/Makefile.in
- @@ -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`
- --- a/gas/configure
- +++ b/gas/configure
- @@ -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
- @@ -11767,6 +11772,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
- @@ -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
- ;;
- *) ;;
- @@ -11795,25 +11831,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
-
- @@ -11824,6 +11867,7 @@ fi
-
-
-
- +
-
-
-
- --- a/gas/doc/Makefile.in
- +++ b/gas/doc/Makefile.in
- @@ -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@
- --- a/gold/Makefile.in
- +++ b/gold/Makefile.in
- @@ -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@
- --- a/gold/configure
- +++ b/gold/configure
- @@ -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
-
- @@ -6826,6 +6869,7 @@ fi
-
-
-
- +
-
-
-
- --- a/gold/testsuite/Makefile.in
- +++ b/gold/testsuite/Makefile.in
- @@ -2568,6 +2568,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@
- --- a/gprof/Makefile.in
- +++ b/gprof/Makefile.in
- @@ -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@
- --- a/gprof/configure
- +++ b/gprof/configure
- @@ -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
- @@ -12101,8 +12102,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
- @@ -12147,6 +12152,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
- @@ -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
- ;;
- *) ;;
- @@ -12175,25 +12211,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
-
- @@ -12204,6 +12247,7 @@ fi
-
-
-
- +
-
-
-
- --- a/ld/Makefile.in
- +++ b/ld/Makefile.in
- @@ -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
- --- a/ld/configure
- +++ b/ld/configure
- @@ -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
- @@ -15558,8 +15559,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
- @@ -15604,6 +15609,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
- @@ -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
- ;;
- *) ;;
- @@ -15632,25 +15668,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
-
- @@ -15661,6 +15704,7 @@ fi
-
-
-
- +
-
-
-
- --- a/opcodes/Makefile.in
- +++ b/opcodes/Makefile.in
- @@ -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@
- --- a/opcodes/configure
- +++ b/opcodes/configure
- @@ -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
- @@ -11508,8 +11509,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
- @@ -11554,6 +11559,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
- @@ -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
- ;;
- *) ;;
- @@ -11582,25 +11618,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
-
- @@ -11611,6 +11654,7 @@ fi
-
-
-
- +
-
-
- ac_ext=c
|