On Thu, Mar 19, 2015 at 03:01:35PM -0400, John Snow wrote: > +cc_has_warning_flag() { > + if [ "$2" != "--keep-tmpc" ]; then > + write_c_skeleton; > + fi > + > # Use the positive sense of the flag when testing for -Wno-wombat > # support (gcc will happily accept the -Wno- form of unknown > # warning options). > - optflag="$(echo $flag | sed -e 's/^-Wno-/-W/')" > - if compile_prog "-Werror $optflag" "" ; then > - QEMU_CFLAGS="$QEMU_CFLAGS $flag" > + optflag="$(echo $1 | sed -e 's/^-Wno-/-W/')" > + compile_prog "-Werror $optflag" "" > +} > + > +write_c_skeleton; > +for flag in $gcc_flags; do > + if cc_has_warning_flag $flag --keep-tmpc; then
The only caller that uses --keep-tmpc wants TMPC to be the skeleton program anyway. The option can be dropped and the write_c_skeleton in cc_has_warning_flag can be unconditional. Stefan
pgpim_NFAbRB5.pgp
Description: PGP signature