Date: Wed, 06 Jun 2012 12:49:35 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Sevan / Venture37 <venture37@gmail.com> Cc: "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: Re: Unable to buildworld with ccache Message-ID: <4FCF35BF.5080006@FreeBSD.org> In-Reply-To: <4FCE8306.1020000@gmail.com> References: <4FCE8306.1020000@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------030209070404060109040505 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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. --------------030209070404060109040505 Content-Type: text/x-diff; name="libc-ccache-warns-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libc-ccache-warns-1.diff" Index: lib/libc/include/port_before.h =================================================================== --- lib/libc/include/port_before.h (revision 236667) +++ lib/libc/include/port_before.h (working copy) @@ -17,6 +17,6 @@ var = _u.v; \ } while (0) -#define UNUSED(x) (x) = (x) +#define UNUSED(x) (void)(x) #endif /* _PORT_BEFORE_H_ */ Index: lib/libc/net/getaddrinfo.c =================================================================== --- lib/libc/net/getaddrinfo.c (revision 236667) +++ lib/libc/net/getaddrinfo.c (working copy) @@ -464,7 +464,7 @@ getaddrinfo(const char *hostname, const char *serv } error = get_portmatch(pai, servname); if (error) - ERR(error); + goto bad; *pai = ai0; } --------------030209070404060109040505--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FCF35BF.5080006>