qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 4/4] configure: Add workaround for ccache and


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v3 4/4] configure: Add workaround for ccache and clang
Date: Mon, 23 Mar 2015 12:58:15 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

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.

Attachment: pgpInp75C4isd.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]