0002-When-building-target-binaries-ensure-that-the-warnin.patch 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258
  1. From b8ff24c72174effd5c5527866313982e28507275 Mon Sep 17 00:00:00 2001
  2. From: Vlad Zakharov <vzakhar@synopsys.com>
  3. Date: Mon, 26 Sep 2016 16:36:08 +0100
  4. Subject: [PATCH 2/2] When building target binaries, ensure that the warning
  5. flags selected for the command line match the target compiler.
  6. bfd * warning.m4 (AC_EGREP_CPP_FOR_BUILD): Introduce macro
  7. to verify CC_FOR_BUILD compiler.
  8. (AM_BINUTILS_WARNINGS): Introduce ac_cpp_for_build variable
  9. and add CC_FOR_BUILD compiler checks.
  10. * Makefile.in: Regenerate.
  11. * configure: Likewise.
  12. * doc/Makefile.in: Likewise.
  13. binutils * Makefile.am: Replace AM_CLFAGS with AM_CFLAGS_FOR_BUILD
  14. when building with CC_FOR_BUILD compiler.
  15. * Makefile.in: Regenerate.
  16. * configure: Likewise.
  17. * doc/Makefile.in: Likewise.
  18. gas * Makefile.in: Regenerate.
  19. * configure: Likewise.
  20. * doc/Makefile.in: Likewise.
  21. gold * Makefile.in: Regenerate.
  22. * configure: Likewise.
  23. * testsuite/Makefile.in: Likewise.
  24. gprof * Makefile.in: Regenerate.
  25. * configure: Likewise.
  26. ld * Makefile.in: Regenerate.
  27. * configure: Likewise.
  28. opcodes * Makefile.in: Regenerate.
  29. * configure: Likewise.
  30. ---
  31. bfd/Makefile.in | 1 +
  32. bfd/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
  33. bfd/doc/Makefile.in | 1 +
  34. bfd/warning.m4 | 47 ++++++++++++++++++++++++++++++++++----
  35. binutils/Makefile.am | 10 +++++----
  36. binutils/Makefile.in | 10 +++++----
  37. binutils/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
  38. binutils/doc/Makefile.in | 1 +
  39. gas/Makefile.in | 1 +
  40. gas/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
  41. gas/doc/Makefile.in | 1 +
  42. gold/Makefile.in | 5 +++--
  43. gold/configure | 52 ++++++++++++++++++++++++++++++++++++++----
  44. gold/testsuite/Makefile.in | 1 +
  45. gprof/Makefile.in | 1 +
  46. gprof/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
  47. ld/Makefile.in | 3 ++-
  48. ld/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
  49. opcodes/Makefile.in | 1 +
  50. opcodes/configure | 56 +++++++++++++++++++++++++++++++++++++++++-----
  51. 20 files changed, 416 insertions(+), 55 deletions(-)
  52. --- a/bfd/Makefile.in
  53. +++ b/bfd/Makefile.in
  54. @@ -288,6 +288,7 @@ TDEFINES = @TDEFINES@
  55. USE_NLS = @USE_NLS@
  56. VERSION = @VERSION@
  57. WARN_CFLAGS = @WARN_CFLAGS@
  58. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  59. WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
  60. XGETTEXT = @XGETTEXT@
  61. abs_builddir = @abs_builddir@
  62. --- a/bfd/configure
  63. +++ b/bfd/configure
  64. @@ -659,6 +659,7 @@ MAINTAINER_MODE_FALSE
  65. MAINTAINER_MODE_TRUE
  66. WARN_WRITE_STRINGS
  67. NO_WERROR
  68. +WARN_CFLAGS_FOR_BUILD
  69. WARN_CFLAGS
  70. REPORT_BUGS_TEXI
  71. REPORT_BUGS_TO
  72. @@ -11427,7 +11428,7 @@ else
  73. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  74. lt_status=$lt_dlunknown
  75. cat > conftest.$ac_ext <<_LT_EOF
  76. -#line 11430 "configure"
  77. +#line 11431 "configure"
  78. #include "confdefs.h"
  79. #if HAVE_DLFCN_H
  80. @@ -11533,7 +11534,7 @@ else
  81. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  82. lt_status=$lt_dlunknown
  83. cat > conftest.$ac_ext <<_LT_EOF
  84. -#line 11536 "configure"
  85. +#line 11537 "configure"
  86. #include "confdefs.h"
  87. #if HAVE_DLFCN_H
  88. @@ -12240,8 +12241,12 @@ fi
  89. # Set the 'development' global.
  90. . $srcdir/../bfd/development.sh
  91. +# Set acp_cpp_for_build variable
  92. +ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
  93. +
  94. # Default set of GCC warnings to enable.
  95. GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  96. +GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  97. # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  98. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  99. @@ -12286,6 +12291,36 @@ fi
  100. rm -f conftest*
  101. +# Verify CC_FOR_BUILD to be compatible with waring flags
  102. +
  103. +# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  104. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  105. +/* end confdefs.h. */
  106. +__GNUC__
  107. +_ACEOF
  108. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  109. + $EGREP "^[0-3]$" >/dev/null 2>&1; then :
  110. +
  111. +else
  112. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
  113. +fi
  114. +rm -f conftest*
  115. +
  116. +
  117. +# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
  118. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  119. +/* end confdefs.h. */
  120. +__GNUC__
  121. +_ACEOF
  122. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  123. + $EGREP "^[0-4]$" >/dev/null 2>&1; then :
  124. +
  125. +else
  126. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
  127. +fi
  128. +rm -f conftest*
  129. +
  130. +
  131. # Check whether --enable-werror was given.
  132. if test "${enable_werror+set}" = set; then :
  133. enableval=$enable_werror; case "${enableval}" in
  134. @@ -12301,6 +12336,7 @@ case "${host}" in
  135. *-*-mingw32*)
  136. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
  137. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
  138. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
  139. fi
  140. ;;
  141. *) ;;
  142. @@ -12314,25 +12350,32 @@ fi
  143. NO_WERROR=
  144. if test "${ERROR_ON_WARNING}" = yes ; then
  145. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
  146. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
  147. NO_WERROR="-Wno-error"
  148. fi
  149. if test "${GCC}" = yes ; then
  150. WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  151. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
  152. fi
  153. # Check whether --enable-build-warnings was given.
  154. if test "${enable_build_warnings+set}" = set; then :
  155. enableval=$enable_build_warnings; case "${enableval}" in
  156. - yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
  157. + yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  158. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
  159. no) if test "${GCC}" = yes ; then
  160. WARN_CFLAGS="-w"
  161. + WARN_CFLAGS_FOR_BUILD="-w"
  162. fi;;
  163. ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  164. - WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
  165. + WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
  166. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
  167. *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  168. - WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
  169. - *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  170. + WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
  171. + WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
  172. + *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
  173. + WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  174. esac
  175. fi
  176. @@ -12343,6 +12386,7 @@ fi
  177. +
  178. --- a/bfd/doc/Makefile.in
  179. +++ b/bfd/doc/Makefile.in
  180. @@ -248,6 +248,7 @@ TDEFINES = @TDEFINES@
  181. USE_NLS = @USE_NLS@
  182. VERSION = @VERSION@
  183. WARN_CFLAGS = @WARN_CFLAGS@
  184. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  185. WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
  186. XGETTEXT = @XGETTEXT@
  187. abs_builddir = @abs_builddir@
  188. --- a/bfd/warning.m4
  189. +++ b/bfd/warning.m4
  190. @@ -17,12 +17,34 @@ dnl along with this program; see the fil
  191. dnl <http://www.gnu.org/licenses/>.
  192. dnl
  193. +# AC_EGREP_CPP_FOR_BUILD(PATTERN, PROGRAM,
  194. +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  195. +# ------------------------------------------------------
  196. +AC_DEFUN([AC_EGREP_CPP_FOR_BUILD],
  197. +[AC_LANG_PREPROC_REQUIRE()dnl
  198. +AC_REQUIRE([AC_PROG_EGREP])dnl
  199. +AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
  200. +AS_IF([dnl eval is necessary to expand ac_cpp.
  201. +dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
  202. +(eval "$ac_cpp_for_build conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
  203. +dnl Quote $1 to prevent m4 from eating character classes
  204. + $EGREP "[$1]" >/dev/null 2>&1],
  205. + [$3],
  206. + [$4])
  207. +rm -f conftest*
  208. +])# AC_EGREP_CPP_FOR_BUILD
  209. +
  210. +
  211. AC_DEFUN([AM_BINUTILS_WARNINGS],[
  212. # Set the 'development' global.
  213. . $srcdir/../bfd/development.sh
  214. +# Set acp_cpp_for_build variable
  215. +ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
  216. +
  217. # Default set of GCC warnings to enable.
  218. GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  219. +GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  220. # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  221. AC_EGREP_CPP([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow")
  222. @@ -34,6 +56,14 @@ AC_EGREP_CPP([^[0-4]$],[__GNUC__],,GCC_W
  223. WARN_WRITE_STRINGS=""
  224. AC_EGREP_CPP([^[0-3]$],[__GNUC__],,WARN_WRITE_STRINGS="-Wwrite-strings")
  225. +# Verify CC_FOR_BUILD to be compatible with waring flags
  226. +
  227. +# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  228. +AC_EGREP_CPP_FOR_BUILD([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow")
  229. +
  230. +# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
  231. +AC_EGREP_CPP_FOR_BUILD([^[0-4]$],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144")
  232. +
  233. AC_ARG_ENABLE(werror,
  234. [ --enable-werror treat compile warnings as errors],
  235. [case "${enableval}" in
  236. @@ -47,6 +77,7 @@ case "${host}" in
  237. *-*-mingw32*)
  238. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
  239. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
  240. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
  241. fi
  242. ;;
  243. *) ;;
  244. @@ -60,25 +91,32 @@ fi
  245. NO_WERROR=
  246. if test "${ERROR_ON_WARNING}" = yes ; then
  247. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
  248. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
  249. NO_WERROR="-Wno-error"
  250. fi
  251. if test "${GCC}" = yes ; then
  252. WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  253. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
  254. fi
  255. AC_ARG_ENABLE(build-warnings,
  256. [ --enable-build-warnings enable build-time compiler warnings],
  257. [case "${enableval}" in
  258. - yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
  259. + yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  260. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
  261. no) if test "${GCC}" = yes ; then
  262. WARN_CFLAGS="-w"
  263. + WARN_CFLAGS_FOR_BUILD="-w"
  264. fi;;
  265. ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  266. - WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
  267. + WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
  268. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
  269. *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  270. - WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
  271. - *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  272. + WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
  273. + WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
  274. + *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
  275. + WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  276. esac])
  277. if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
  278. @@ -86,6 +124,7 @@ if test x"$silent" != x"yes" && test x"$
  279. fi
  280. AC_SUBST(WARN_CFLAGS)
  281. +AC_SUBST(WARN_CFLAGS_FOR_BUILD)
  282. AC_SUBST(NO_WERROR)
  283. AC_SUBST(WARN_WRITE_STRINGS)
  284. ])
  285. --- a/binutils/Makefile.am
  286. +++ b/binutils/Makefile.am
  287. @@ -47,8 +47,10 @@ ZLIB = @zlibdir@ -lz
  288. ZLIBINC = @zlibinc@
  289. WARN_CFLAGS = @WARN_CFLAGS@
  290. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  291. NO_WERROR = @NO_WERROR@
  292. AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
  293. +AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD) $(ZLIBINC)
  294. LIBICONV = @LIBICONV@
  295. # these two are almost the same program
  296. @@ -305,17 +307,17 @@ sysinfo$(EXEEXT_FOR_BUILD): sysinfo.@OBJ
  297. $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.@OBJEXT@ syslex_wrap.@OBJEXT@
  298. syslex_wrap.@OBJEXT@: syslex_wrap.c syslex.c sysinfo.h config.h
  299. - $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c
  300. + $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c
  301. sysinfo.@OBJEXT@: sysinfo.c
  302. if [ -r sysinfo.c ]; then \
  303. - $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \
  304. + $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \
  305. else \
  306. - $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \
  307. + $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \
  308. fi
  309. bin2c$(EXEEXT_FOR_BUILD): bin2c.c
  310. - $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
  311. + $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
  312. embedspu: embedspu.sh Makefile
  313. awk '/^program_transform_name=/ {print "program_transform_name=\"$(program_transform_name)\""; next} {print}' < $< > $@
  314. --- a/binutils/Makefile.in
  315. +++ b/binutils/Makefile.in
  316. @@ -401,6 +401,7 @@ STRIP = @STRIP@
  317. USE_NLS = @USE_NLS@
  318. VERSION = @VERSION@
  319. WARN_CFLAGS = @WARN_CFLAGS@
  320. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  321. WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
  322. XGETTEXT = @XGETTEXT@
  323. YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
  324. @@ -478,6 +479,7 @@ am__skipyacc =
  325. ZLIB = @zlibdir@ -lz
  326. ZLIBINC = @zlibinc@
  327. AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
  328. +AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD) $(ZLIBINC)
  329. # these two are almost the same program
  330. AR_PROG = ar
  331. @@ -1370,17 +1372,17 @@ sysinfo$(EXEEXT_FOR_BUILD): sysinfo.@OBJ
  332. $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.@OBJEXT@ syslex_wrap.@OBJEXT@
  333. syslex_wrap.@OBJEXT@: syslex_wrap.c syslex.c sysinfo.h config.h
  334. - $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c
  335. + $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c
  336. sysinfo.@OBJEXT@: sysinfo.c
  337. if [ -r sysinfo.c ]; then \
  338. - $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \
  339. + $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \
  340. else \
  341. - $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \
  342. + $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \
  343. fi
  344. bin2c$(EXEEXT_FOR_BUILD): bin2c.c
  345. - $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
  346. + $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
  347. embedspu: embedspu.sh Makefile
  348. awk '/^program_transform_name=/ {print "program_transform_name=\"$(program_transform_name)\""; next} {print}' < $< > $@
  349. --- a/binutils/configure
  350. +++ b/binutils/configure
  351. @@ -652,6 +652,7 @@ YFLAGS
  352. YACC
  353. WARN_WRITE_STRINGS
  354. NO_WERROR
  355. +WARN_CFLAGS_FOR_BUILD
  356. WARN_CFLAGS
  357. OTOOL64
  358. OTOOL
  359. @@ -11225,7 +11226,7 @@ else
  360. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  361. lt_status=$lt_dlunknown
  362. cat > conftest.$ac_ext <<_LT_EOF
  363. -#line 11228 "configure"
  364. +#line 11229 "configure"
  365. #include "confdefs.h"
  366. #if HAVE_DLFCN_H
  367. @@ -11331,7 +11332,7 @@ else
  368. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  369. lt_status=$lt_dlunknown
  370. cat > conftest.$ac_ext <<_LT_EOF
  371. -#line 11334 "configure"
  372. +#line 11335 "configure"
  373. #include "confdefs.h"
  374. #if HAVE_DLFCN_H
  375. @@ -11945,8 +11946,12 @@ _ACEOF
  376. # Set the 'development' global.
  377. . $srcdir/../bfd/development.sh
  378. +# Set acp_cpp_for_build variable
  379. +ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
  380. +
  381. # Default set of GCC warnings to enable.
  382. GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  383. +GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  384. # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  385. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  386. @@ -11991,6 +11996,36 @@ fi
  387. rm -f conftest*
  388. +# Verify CC_FOR_BUILD to be compatible with waring flags
  389. +
  390. +# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  391. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  392. +/* end confdefs.h. */
  393. +__GNUC__
  394. +_ACEOF
  395. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  396. + $EGREP "^[0-3]$" >/dev/null 2>&1; then :
  397. +
  398. +else
  399. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
  400. +fi
  401. +rm -f conftest*
  402. +
  403. +
  404. +# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
  405. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  406. +/* end confdefs.h. */
  407. +__GNUC__
  408. +_ACEOF
  409. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  410. + $EGREP "^[0-4]$" >/dev/null 2>&1; then :
  411. +
  412. +else
  413. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
  414. +fi
  415. +rm -f conftest*
  416. +
  417. +
  418. # Check whether --enable-werror was given.
  419. if test "${enable_werror+set}" = set; then :
  420. enableval=$enable_werror; case "${enableval}" in
  421. @@ -12006,6 +12041,7 @@ case "${host}" in
  422. *-*-mingw32*)
  423. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
  424. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
  425. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
  426. fi
  427. ;;
  428. *) ;;
  429. @@ -12019,25 +12055,32 @@ fi
  430. NO_WERROR=
  431. if test "${ERROR_ON_WARNING}" = yes ; then
  432. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
  433. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
  434. NO_WERROR="-Wno-error"
  435. fi
  436. if test "${GCC}" = yes ; then
  437. WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  438. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
  439. fi
  440. # Check whether --enable-build-warnings was given.
  441. if test "${enable_build_warnings+set}" = set; then :
  442. enableval=$enable_build_warnings; case "${enableval}" in
  443. - yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
  444. + yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  445. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
  446. no) if test "${GCC}" = yes ; then
  447. WARN_CFLAGS="-w"
  448. + WARN_CFLAGS_FOR_BUILD="-w"
  449. fi;;
  450. ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  451. - WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
  452. + WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
  453. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
  454. *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  455. - WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
  456. - *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  457. + WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
  458. + WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
  459. + *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
  460. + WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  461. esac
  462. fi
  463. @@ -12048,6 +12091,7 @@ fi
  464. +
  465. --- a/binutils/doc/Makefile.in
  466. +++ b/binutils/doc/Makefile.in
  467. @@ -249,6 +249,7 @@ STRIP = @STRIP@
  468. USE_NLS = @USE_NLS@
  469. VERSION = @VERSION@
  470. WARN_CFLAGS = @WARN_CFLAGS@
  471. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  472. WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
  473. XGETTEXT = @XGETTEXT@
  474. YACC = @YACC@
  475. --- a/gas/Makefile.in
  476. +++ b/gas/Makefile.in
  477. @@ -255,6 +255,7 @@ STRIP = @STRIP@
  478. USE_NLS = @USE_NLS@
  479. VERSION = @VERSION@
  480. WARN_CFLAGS = @WARN_CFLAGS@ @WARN_WRITE_STRINGS@
  481. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  482. WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
  483. XGETTEXT = @XGETTEXT@
  484. YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi`
  485. --- a/gas/configure
  486. +++ b/gas/configure
  487. @@ -642,6 +642,7 @@ cgen_cpu_prefix
  488. GDBINIT
  489. WARN_WRITE_STRINGS
  490. NO_WERROR
  491. +WARN_CFLAGS_FOR_BUILD
  492. WARN_CFLAGS
  493. OTOOL64
  494. OTOOL
  495. @@ -10985,7 +10986,7 @@ else
  496. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  497. lt_status=$lt_dlunknown
  498. cat > conftest.$ac_ext <<_LT_EOF
  499. -#line 10988 "configure"
  500. +#line 10989 "configure"
  501. #include "confdefs.h"
  502. #if HAVE_DLFCN_H
  503. @@ -11091,7 +11092,7 @@ else
  504. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  505. lt_status=$lt_dlunknown
  506. cat > conftest.$ac_ext <<_LT_EOF
  507. -#line 11094 "configure"
  508. +#line 11095 "configure"
  509. #include "confdefs.h"
  510. #if HAVE_DLFCN_H
  511. @@ -11721,8 +11722,12 @@ using_cgen=no
  512. # Set the 'development' global.
  513. . $srcdir/../bfd/development.sh
  514. +# Set acp_cpp_for_build variable
  515. +ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
  516. +
  517. # Default set of GCC warnings to enable.
  518. GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  519. +GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  520. # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  521. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  522. @@ -11767,6 +11772,36 @@ fi
  523. rm -f conftest*
  524. +# Verify CC_FOR_BUILD to be compatible with waring flags
  525. +
  526. +# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  527. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  528. +/* end confdefs.h. */
  529. +__GNUC__
  530. +_ACEOF
  531. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  532. + $EGREP "^[0-3]$" >/dev/null 2>&1; then :
  533. +
  534. +else
  535. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
  536. +fi
  537. +rm -f conftest*
  538. +
  539. +
  540. +# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
  541. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  542. +/* end confdefs.h. */
  543. +__GNUC__
  544. +_ACEOF
  545. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  546. + $EGREP "^[0-4]$" >/dev/null 2>&1; then :
  547. +
  548. +else
  549. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
  550. +fi
  551. +rm -f conftest*
  552. +
  553. +
  554. # Check whether --enable-werror was given.
  555. if test "${enable_werror+set}" = set; then :
  556. enableval=$enable_werror; case "${enableval}" in
  557. @@ -11782,6 +11817,7 @@ case "${host}" in
  558. *-*-mingw32*)
  559. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
  560. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
  561. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
  562. fi
  563. ;;
  564. *) ;;
  565. @@ -11795,25 +11831,32 @@ fi
  566. NO_WERROR=
  567. if test "${ERROR_ON_WARNING}" = yes ; then
  568. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
  569. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
  570. NO_WERROR="-Wno-error"
  571. fi
  572. if test "${GCC}" = yes ; then
  573. WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  574. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
  575. fi
  576. # Check whether --enable-build-warnings was given.
  577. if test "${enable_build_warnings+set}" = set; then :
  578. enableval=$enable_build_warnings; case "${enableval}" in
  579. - yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
  580. + yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  581. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
  582. no) if test "${GCC}" = yes ; then
  583. WARN_CFLAGS="-w"
  584. + WARN_CFLAGS_FOR_BUILD="-w"
  585. fi;;
  586. ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  587. - WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
  588. + WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
  589. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
  590. *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  591. - WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
  592. - *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  593. + WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
  594. + WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
  595. + *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
  596. + WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  597. esac
  598. fi
  599. @@ -11824,6 +11867,7 @@ fi
  600. +
  601. --- a/gas/doc/Makefile.in
  602. +++ b/gas/doc/Makefile.in
  603. @@ -230,6 +230,7 @@ STRIP = @STRIP@
  604. USE_NLS = @USE_NLS@
  605. VERSION = @VERSION@
  606. WARN_CFLAGS = @WARN_CFLAGS@
  607. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  608. WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
  609. XGETTEXT = @XGETTEXT@
  610. YACC = @YACC@
  611. --- a/gold/Makefile.in
  612. +++ b/gold/Makefile.in
  613. @@ -87,8 +87,8 @@ subdir = .
  614. DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \
  615. $(srcdir)/Makefile.am $(top_srcdir)/configure \
  616. $(am__configure_deps) $(srcdir)/config.in \
  617. - $(srcdir)/../mkinstalldirs $(top_srcdir)/po/Make-in \
  618. - ftruncate.c pread.c mremap.c ffsll.c yyscript.h yyscript.c \
  619. + $(srcdir)/../mkinstalldirs $(top_srcdir)/po/Make-in ffsll.c \
  620. + mremap.c ftruncate.c pread.c yyscript.h yyscript.c \
  621. $(srcdir)/../depcomp $(srcdir)/../ylwrap
  622. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  623. am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
  624. @@ -409,6 +409,7 @@ TARGETOBJS = @TARGETOBJS@
  625. USE_NLS = @USE_NLS@
  626. VERSION = @VERSION@
  627. WARN_CFLAGS = @WARN_CFLAGS@
  628. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  629. WARN_CXXFLAGS = @WARN_CXXFLAGS@
  630. WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
  631. XGETTEXT = @XGETTEXT@
  632. --- a/gold/configure
  633. +++ b/gold/configure
  634. @@ -609,6 +609,7 @@ GOLD_LDFLAGS
  635. WARN_CXXFLAGS
  636. WARN_WRITE_STRINGS
  637. NO_WERROR
  638. +WARN_CFLAGS_FOR_BUILD
  639. WARN_CFLAGS
  640. IFUNC_STATIC_FALSE
  641. IFUNC_STATIC_TRUE
  642. @@ -6723,8 +6724,12 @@ fi
  643. # Set the 'development' global.
  644. . $srcdir/../bfd/development.sh
  645. +# Set acp_cpp_for_build variable
  646. +ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
  647. +
  648. # Default set of GCC warnings to enable.
  649. GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  650. +GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  651. # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  652. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  653. @@ -6769,6 +6774,36 @@ fi
  654. rm -f conftest*
  655. +# Verify CC_FOR_BUILD to be compatible with waring flags
  656. +
  657. +# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  658. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  659. +/* end confdefs.h. */
  660. +__GNUC__
  661. +_ACEOF
  662. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  663. + $EGREP "^[0-3]$" >/dev/null 2>&1; then :
  664. +
  665. +else
  666. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
  667. +fi
  668. +rm -f conftest*
  669. +
  670. +
  671. +# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
  672. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  673. +/* end confdefs.h. */
  674. +__GNUC__
  675. +_ACEOF
  676. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  677. + $EGREP "^[0-4]$" >/dev/null 2>&1; then :
  678. +
  679. +else
  680. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
  681. +fi
  682. +rm -f conftest*
  683. +
  684. +
  685. # Check whether --enable-werror was given.
  686. if test "${enable_werror+set}" = set; then :
  687. enableval=$enable_werror; case "${enableval}" in
  688. @@ -6784,6 +6819,7 @@ case "${host}" in
  689. *-*-mingw32*)
  690. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
  691. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
  692. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
  693. fi
  694. ;;
  695. *) ;;
  696. @@ -6797,25 +6833,32 @@ fi
  697. NO_WERROR=
  698. if test "${ERROR_ON_WARNING}" = yes ; then
  699. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
  700. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
  701. NO_WERROR="-Wno-error"
  702. fi
  703. if test "${GCC}" = yes ; then
  704. WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  705. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
  706. fi
  707. # Check whether --enable-build-warnings was given.
  708. if test "${enable_build_warnings+set}" = set; then :
  709. enableval=$enable_build_warnings; case "${enableval}" in
  710. - yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
  711. + yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  712. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
  713. no) if test "${GCC}" = yes ; then
  714. WARN_CFLAGS="-w"
  715. + WARN_CFLAGS_FOR_BUILD="-w"
  716. fi;;
  717. ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  718. - WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
  719. + WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
  720. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
  721. *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  722. - WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
  723. - *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  724. + WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
  725. + WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
  726. + *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
  727. + WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  728. esac
  729. fi
  730. @@ -6826,6 +6869,7 @@ fi
  731. +
  732. --- a/gold/testsuite/Makefile.in
  733. +++ b/gold/testsuite/Makefile.in
  734. @@ -2568,6 +2568,7 @@ TARGETOBJS = @TARGETOBJS@
  735. USE_NLS = @USE_NLS@
  736. VERSION = @VERSION@
  737. WARN_CFLAGS = @WARN_CFLAGS@
  738. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  739. WARN_CXXFLAGS = @WARN_CXXFLAGS@
  740. WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
  741. XGETTEXT = @XGETTEXT@
  742. --- a/gprof/Makefile.in
  743. +++ b/gprof/Makefile.in
  744. @@ -267,6 +267,7 @@ STRIP = @STRIP@
  745. USE_NLS = @USE_NLS@
  746. VERSION = @VERSION@
  747. WARN_CFLAGS = @WARN_CFLAGS@
  748. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  749. WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
  750. XGETTEXT = @XGETTEXT@
  751. abs_builddir = @abs_builddir@
  752. --- a/gprof/configure
  753. +++ b/gprof/configure
  754. @@ -604,6 +604,7 @@ LTLIBOBJS
  755. LIBOBJS
  756. WARN_WRITE_STRINGS
  757. NO_WERROR
  758. +WARN_CFLAGS_FOR_BUILD
  759. WARN_CFLAGS
  760. GENINSRC_NEVER_FALSE
  761. GENINSRC_NEVER_TRUE
  762. @@ -10901,7 +10902,7 @@ else
  763. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  764. lt_status=$lt_dlunknown
  765. cat > conftest.$ac_ext <<_LT_EOF
  766. -#line 10904 "configure"
  767. +#line 10905 "configure"
  768. #include "confdefs.h"
  769. #if HAVE_DLFCN_H
  770. @@ -11007,7 +11008,7 @@ else
  771. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  772. lt_status=$lt_dlunknown
  773. cat > conftest.$ac_ext <<_LT_EOF
  774. -#line 11010 "configure"
  775. +#line 11011 "configure"
  776. #include "confdefs.h"
  777. #if HAVE_DLFCN_H
  778. @@ -12101,8 +12102,12 @@ fi
  779. # Set the 'development' global.
  780. . $srcdir/../bfd/development.sh
  781. +# Set acp_cpp_for_build variable
  782. +ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
  783. +
  784. # Default set of GCC warnings to enable.
  785. GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  786. +GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  787. # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  788. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  789. @@ -12147,6 +12152,36 @@ fi
  790. rm -f conftest*
  791. +# Verify CC_FOR_BUILD to be compatible with waring flags
  792. +
  793. +# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  794. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  795. +/* end confdefs.h. */
  796. +__GNUC__
  797. +_ACEOF
  798. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  799. + $EGREP "^[0-3]$" >/dev/null 2>&1; then :
  800. +
  801. +else
  802. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
  803. +fi
  804. +rm -f conftest*
  805. +
  806. +
  807. +# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
  808. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  809. +/* end confdefs.h. */
  810. +__GNUC__
  811. +_ACEOF
  812. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  813. + $EGREP "^[0-4]$" >/dev/null 2>&1; then :
  814. +
  815. +else
  816. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
  817. +fi
  818. +rm -f conftest*
  819. +
  820. +
  821. # Check whether --enable-werror was given.
  822. if test "${enable_werror+set}" = set; then :
  823. enableval=$enable_werror; case "${enableval}" in
  824. @@ -12162,6 +12197,7 @@ case "${host}" in
  825. *-*-mingw32*)
  826. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
  827. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
  828. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
  829. fi
  830. ;;
  831. *) ;;
  832. @@ -12175,25 +12211,32 @@ fi
  833. NO_WERROR=
  834. if test "${ERROR_ON_WARNING}" = yes ; then
  835. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
  836. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
  837. NO_WERROR="-Wno-error"
  838. fi
  839. if test "${GCC}" = yes ; then
  840. WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  841. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
  842. fi
  843. # Check whether --enable-build-warnings was given.
  844. if test "${enable_build_warnings+set}" = set; then :
  845. enableval=$enable_build_warnings; case "${enableval}" in
  846. - yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
  847. + yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  848. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
  849. no) if test "${GCC}" = yes ; then
  850. WARN_CFLAGS="-w"
  851. + WARN_CFLAGS_FOR_BUILD="-w"
  852. fi;;
  853. ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  854. - WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
  855. + WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
  856. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
  857. *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  858. - WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
  859. - *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  860. + WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
  861. + WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
  862. + *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
  863. + WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  864. esac
  865. fi
  866. @@ -12204,6 +12247,7 @@ fi
  867. +
  868. --- a/ld/Makefile.in
  869. +++ b/ld/Makefile.in
  870. @@ -354,6 +354,7 @@ TESTBFDLIB = @TESTBFDLIB@
  871. USE_NLS = @USE_NLS@
  872. VERSION = @VERSION@
  873. WARN_CFLAGS = @WARN_CFLAGS@
  874. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  875. WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
  876. XGETTEXT = @XGETTEXT@
  877. YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
  878. @@ -508,7 +509,7 @@ CXX_FOR_TARGET = ` \
  879. fi`
  880. -# Strip out sanitization options as they require special host libraries.
  881. +# Strip out sanitization options as we want to test building binaries without any extra paraphernalia
  882. CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
  883. CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
  884. info_TEXINFOS = ld.texinfo
  885. --- a/ld/configure
  886. +++ b/ld/configure
  887. @@ -646,6 +646,7 @@ LIBINTL
  888. USE_NLS
  889. WARN_WRITE_STRINGS
  890. NO_WERROR
  891. +WARN_CFLAGS_FOR_BUILD
  892. WARN_CFLAGS
  893. installed_linker
  894. install_as_default
  895. @@ -11723,7 +11724,7 @@ else
  896. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  897. lt_status=$lt_dlunknown
  898. cat > conftest.$ac_ext <<_LT_EOF
  899. -#line 11726 "configure"
  900. +#line 11727 "configure"
  901. #include "confdefs.h"
  902. #if HAVE_DLFCN_H
  903. @@ -11829,7 +11830,7 @@ else
  904. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  905. lt_status=$lt_dlunknown
  906. cat > conftest.$ac_ext <<_LT_EOF
  907. -#line 11832 "configure"
  908. +#line 11833 "configure"
  909. #include "confdefs.h"
  910. #if HAVE_DLFCN_H
  911. @@ -15558,8 +15559,12 @@ fi
  912. # Set the 'development' global.
  913. . $srcdir/../bfd/development.sh
  914. +# Set acp_cpp_for_build variable
  915. +ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
  916. +
  917. # Default set of GCC warnings to enable.
  918. GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  919. +GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  920. # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  921. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  922. @@ -15604,6 +15609,36 @@ fi
  923. rm -f conftest*
  924. +# Verify CC_FOR_BUILD to be compatible with waring flags
  925. +
  926. +# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  927. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  928. +/* end confdefs.h. */
  929. +__GNUC__
  930. +_ACEOF
  931. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  932. + $EGREP "^[0-3]$" >/dev/null 2>&1; then :
  933. +
  934. +else
  935. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
  936. +fi
  937. +rm -f conftest*
  938. +
  939. +
  940. +# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
  941. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  942. +/* end confdefs.h. */
  943. +__GNUC__
  944. +_ACEOF
  945. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  946. + $EGREP "^[0-4]$" >/dev/null 2>&1; then :
  947. +
  948. +else
  949. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
  950. +fi
  951. +rm -f conftest*
  952. +
  953. +
  954. # Check whether --enable-werror was given.
  955. if test "${enable_werror+set}" = set; then :
  956. enableval=$enable_werror; case "${enableval}" in
  957. @@ -15619,6 +15654,7 @@ case "${host}" in
  958. *-*-mingw32*)
  959. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
  960. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
  961. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
  962. fi
  963. ;;
  964. *) ;;
  965. @@ -15632,25 +15668,32 @@ fi
  966. NO_WERROR=
  967. if test "${ERROR_ON_WARNING}" = yes ; then
  968. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
  969. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
  970. NO_WERROR="-Wno-error"
  971. fi
  972. if test "${GCC}" = yes ; then
  973. WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  974. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
  975. fi
  976. # Check whether --enable-build-warnings was given.
  977. if test "${enable_build_warnings+set}" = set; then :
  978. enableval=$enable_build_warnings; case "${enableval}" in
  979. - yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
  980. + yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  981. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
  982. no) if test "${GCC}" = yes ; then
  983. WARN_CFLAGS="-w"
  984. + WARN_CFLAGS_FOR_BUILD="-w"
  985. fi;;
  986. ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  987. - WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
  988. + WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
  989. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
  990. *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  991. - WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
  992. - *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  993. + WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
  994. + WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
  995. + *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
  996. + WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  997. esac
  998. fi
  999. @@ -15661,6 +15704,7 @@ fi
  1000. +
  1001. --- a/opcodes/Makefile.in
  1002. +++ b/opcodes/Makefile.in
  1003. @@ -267,6 +267,7 @@ STRIP = @STRIP@
  1004. USE_NLS = @USE_NLS@
  1005. VERSION = @VERSION@
  1006. WARN_CFLAGS = @WARN_CFLAGS@
  1007. +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
  1008. WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@
  1009. XGETTEXT = @XGETTEXT@
  1010. abs_builddir = @abs_builddir@
  1011. --- a/opcodes/configure
  1012. +++ b/opcodes/configure
  1013. @@ -643,6 +643,7 @@ MAINTAINER_MODE_TRUE
  1014. NO_WMISSING_FIELD_INITIALIZERS
  1015. WARN_WRITE_STRINGS
  1016. NO_WERROR
  1017. +WARN_CFLAGS_FOR_BUILD
  1018. WARN_CFLAGS
  1019. OTOOL64
  1020. OTOOL
  1021. @@ -11150,7 +11151,7 @@ else
  1022. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1023. lt_status=$lt_dlunknown
  1024. cat > conftest.$ac_ext <<_LT_EOF
  1025. -#line 11153 "configure"
  1026. +#line 11154 "configure"
  1027. #include "confdefs.h"
  1028. #if HAVE_DLFCN_H
  1029. @@ -11256,7 +11257,7 @@ else
  1030. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1031. lt_status=$lt_dlunknown
  1032. cat > conftest.$ac_ext <<_LT_EOF
  1033. -#line 11259 "configure"
  1034. +#line 11260 "configure"
  1035. #include "confdefs.h"
  1036. #if HAVE_DLFCN_H
  1037. @@ -11508,8 +11509,12 @@ fi
  1038. # Set the 'development' global.
  1039. . $srcdir/../bfd/development.sh
  1040. +# Set acp_cpp_for_build variable
  1041. +ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD"
  1042. +
  1043. # Default set of GCC warnings to enable.
  1044. GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  1045. +GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  1046. # Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  1047. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1048. @@ -11554,6 +11559,36 @@ fi
  1049. rm -f conftest*
  1050. +# Verify CC_FOR_BUILD to be compatible with waring flags
  1051. +
  1052. +# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
  1053. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1054. +/* end confdefs.h. */
  1055. +__GNUC__
  1056. +_ACEOF
  1057. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  1058. + $EGREP "^[0-3]$" >/dev/null 2>&1; then :
  1059. +
  1060. +else
  1061. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
  1062. +fi
  1063. +rm -f conftest*
  1064. +
  1065. +
  1066. +# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
  1067. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1068. +/* end confdefs.h. */
  1069. +__GNUC__
  1070. +_ACEOF
  1071. +if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
  1072. + $EGREP "^[0-4]$" >/dev/null 2>&1; then :
  1073. +
  1074. +else
  1075. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
  1076. +fi
  1077. +rm -f conftest*
  1078. +
  1079. +
  1080. # Check whether --enable-werror was given.
  1081. if test "${enable_werror+set}" = set; then :
  1082. enableval=$enable_werror; case "${enableval}" in
  1083. @@ -11569,6 +11604,7 @@ case "${host}" in
  1084. *-*-mingw32*)
  1085. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
  1086. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
  1087. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format"
  1088. fi
  1089. ;;
  1090. *) ;;
  1091. @@ -11582,25 +11618,32 @@ fi
  1092. NO_WERROR=
  1093. if test "${ERROR_ON_WARNING}" = yes ; then
  1094. GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
  1095. + GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror"
  1096. NO_WERROR="-Wno-error"
  1097. fi
  1098. if test "${GCC}" = yes ; then
  1099. WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  1100. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}"
  1101. fi
  1102. # Check whether --enable-build-warnings was given.
  1103. if test "${enable_build_warnings+set}" = set; then :
  1104. enableval=$enable_build_warnings; case "${enableval}" in
  1105. - yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
  1106. + yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}"
  1107. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";;
  1108. no) if test "${GCC}" = yes ; then
  1109. WARN_CFLAGS="-w"
  1110. + WARN_CFLAGS_FOR_BUILD="-w"
  1111. fi;;
  1112. ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  1113. - WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
  1114. + WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}"
  1115. + WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";;
  1116. *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
  1117. - WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
  1118. - *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  1119. + WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}"
  1120. + WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";;
  1121. + *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`
  1122. + WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;;
  1123. esac
  1124. fi
  1125. @@ -11611,6 +11654,7 @@ fi
  1126. +
  1127. ac_ext=c