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: John Snow
Subject: Re: [Qemu-devel] [PATCH v3 4/4] configure: Add workaround for ccache and clang
Date: Mon, 23 Mar 2015 10:52:00 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0



On 03/23/2015 09:11 AM, Peter Maydell wrote:
On 19 March 2015 at 19:01, John Snow <address@hidden> wrote:
Test if ccache is interfering with our life, and
disable its habit of trying to compile already pre-processed
versions of code if so.

In particular, clang has different semantic warnings based on
if the warning arose from a macro or not. By trying to build
preprocessed versions of code, we get more errors than we should.

ccache allows us to disable this feature, opting instead to
compile the original version instead of its preprocessed version.

This makes ccache much slower for cache misses, but at least it
becomes usable with QEMU/clang.

Thanks to Peter Eisentraut for his writeup on the issue:
http://peter.eisentraut.org/blog/2014/12/01/ccache-and-clang-part-3/

This is really working around a bug in either ccache or
in the way Fedora has configured ccache, so I kind of
feel it ought to be dealt with there. However I don't
object too much to our including the workaround in our
configure...

-- PMM


I feel like it might be an inescapable consequence of using both ccache and clang together on any system, not just Fedora.

This at least ONLY turns on the workaround if it is observed to interfering, so it should improve the "ease of build" for clang + ccache in general, and not just on Fedora.

Of course, even if it is a workaround that only benefits out of the box configurations on Fedora, It's still useful to be able to build from source on Fedora, instead of waiting for a package maintainer to update ...

So unless there's a strong reason against this workaround in particular, I think it is harmless enough for inclusion. It certainly won't make the build worse for anyone.

For cases where you might be using ccache and gcc, for instance, this workaround won't even trigger. Further good news: We don't suppress any extra warnings we don't have to. Instead, we just tell ccache to re-process a file instead of trying to compile the preprocessed version.

--js



reply via email to

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