Unable to buildworld with ccache

Dimitry Andric dim at FreeBSD.org
Wed Jun 6 10:49:40 UTC 2012


On 2012-06-06 00:07, Sevan / Venture37 wrote:
> Buildworld completes successfully with ccache switched off, it fails 
> otherwise, system was built WITH_CLANG_IS_CC previously.
...
> In file included from /usr/src/lib/libc/net/getaddrinfo.c:1:
> /usr/src/lib/libc/net/getaddrinfo.c:467:15: error: explicitly assigning 
> a variable of type 'int' to itself [-Werror,-Wself-assign]
>     do { error = (error); goto bad; } while ( 0);
>          ~~~~~ ^  ~~~~~

This is because clang suppresses a number of warnings for specific
patterns in macros.  Since ccache passes clang the preprocessed file,
those suppressions will not work, and some additional warnings can be
triggered.

See also the following threads on the cfe-dev mailing list:

  http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-September/017250.html
  http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-June/021824.html

That said, I had a look at the specific warnings you posted for libc,
and they are easy enough to fix.  Please try the attached patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libc-ccache-warns-1.diff
Type: text/x-diff
Size: 750 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120606/3691427b/libc-ccache-warns-1.bin


More information about the freebsd-current mailing list