From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya1w1-0004xl-M2 for qemu-devel@nongnu.org; Mon, 23 Mar 2015 08:58:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ya1vw-0001Gv-BH for qemu-devel@nongnu.org; Mon, 23 Mar 2015 08:58:25 -0400 Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:36136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya1vw-0001Gq-4J for qemu-devel@nongnu.org; Mon, 23 Mar 2015 08:58:20 -0400 Received: by wibg7 with SMTP id g7so46583252wib.1 for ; Mon, 23 Mar 2015 05:58:19 -0700 (PDT) Date: Mon, 23 Mar 2015 12:58:15 +0000 From: Stefan Hajnoczi Message-ID: <20150323125815.GE9268@stefanha-thinkpad.redhat.com> References: <1426791697-17895-1-git-send-email-jsnow@redhat.com> <1426791697-17895-5-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lteA1dqeVaWQ9QQl" Content-Disposition: inline In-Reply-To: <1426791697-17895-5-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 4/4] configure: Add workaround for ccache and clang 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 --lteA1dqeVaWQ9QQl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 19, 2015 at 03:01:37PM -0400, John Snow wrote: > +######################################## > +# check if ccache is interfering with > +# semantic analysis of macros > + > +ccache=no > +cat > $TMPC << EOF > +static const int Z = 1; > +#define fn() ({ Z; }) > +#define TAUT(X) ((X) == Z) > +#define PAREN(X, Y) (X == Y) > +#define ID(X) (X) > +int main(int argc, char *argv[]) > +{ > + int x = 0, y = 0; > + x = ID(x); > + x = fn(); > + fn(); > + if (PAREN(x, y)) return 0; > + if (TAUT(Z)) return 0; > + return 0; > +} > +EOF > + > +if ! compile_object; then > + ccache=yes > +fi This is not checking whether ccache is enabled, so the variable name "ccache" is misleading. The name "ccache_cpp2" would be more descriptive. --lteA1dqeVaWQ9QQl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVEA3nAAoJEJykq7OBq3PI1tUH+wb/kdYMuiEmbsKzHRCrZScM 4kdHfX7Ar7KALP8S9BRd1E4qAMo6D8n763/GU+egjqDV7EyXrpAKqDoqh/LpNFMW waOwIZSWV/g58VMwx8cH0N2Muxk/nOfht+fhOWMKPxUsvVx5zQt3y47YSXQvqxvc 99dy7a/zwXXW6wKY5aI6oRJ6t0VezXUB6Sch9/5Vtnh7a3hNcxrJoFJZOnM1z2Ow v2cHoC/TTdS+mvr1WV9f6ydRxIzHMI9PwIqbS0Nkt40YZ9nXX9nJRbtrviyAkbIC +Kwd4+Khgt1XRe8V40RkSOM0YRM1TXCxBfbnMKcNbaAoDRr4whVmQq4qeHZcBU8= =Nbmp -----END PGP SIGNATURE----- --lteA1dqeVaWQ9QQl--