From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya216-0007vw-23 for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:03:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ya210-0003Sv-1C for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:03:40 -0400 Received: from mail-wg0-x22b.google.com ([2a00:1450:400c:c00::22b]:33332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya20z-0003Sn-Qr for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:03:33 -0400 Received: by wgbcc7 with SMTP id cc7so145279011wgb.0 for ; Mon, 23 Mar 2015 06:03:33 -0700 (PDT) Date: Mon, 23 Mar 2015 13:03:30 +0000 From: Stefan Hajnoczi Message-ID: <20150323130330.GF9268@stefanha-thinkpad.redhat.com> References: <1426791697-17895-1-git-send-email-jsnow@redhat.com> <1426791697-17895-3-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oFbHfjnMgUMsrGjO" Content-Disposition: inline In-Reply-To: <1426791697-17895-3-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 2/4] configure: factor out supported flag check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, stefanha@redhat.com --oFbHfjnMgUMsrGjO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --oFbHfjnMgUMsrGjO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVEA8hAAoJEJykq7OBq3PIdn4H/3Odi39MTkGKZVFgmmmqn0p8 xKvYFZqRa+RmVoRNyiQCWO2LmHoUgQXpECXIqs0pxuyni11aZRXlwMbpQbY0kfyo ca7NayRWj3XEeUFwb/OUeOHi3OPbE2qIUufN1S2nyejy7ar7RqDQaFI7MkpysweR uS4oVdwBGO3f1BtYQCo283hpajnhXFZxSBUMkUeTWR5kWrADWzDodfqceMbkUf9D cVk4kX8sAKDVpqyvK08X0t4yDif11yNP/jS/60m5p+Nqt4Ik323MByuicL0e9k+B eUCzSh/rWzqfoodYRvgbwVSO2B1Awb2qSdli4asFTzYg1/hu7WQflL15NzmkqRs= =uCuP -----END PGP SIGNATURE----- --oFbHfjnMgUMsrGjO--