From owner-freebsd-current@FreeBSD.ORG Wed Jun 6 10:49:39 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECB421065673 for ; Wed, 6 Jun 2012 10:49:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id A2CC08FC22 for ; Wed, 6 Jun 2012 10:49:39 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:300d:9ef5:7e6f:e2bd] (unknown [IPv6:2001:7b8:3a7:0:300d:9ef5:7e6f:e2bd]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 7B4565C37; Wed, 6 Jun 2012 12:49:33 +0200 (CEST) Message-ID: <4FCF35BF.5080006@FreeBSD.org> Date: Wed, 06 Jun 2012 12:49:35 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120529 Thunderbird/13.0 MIME-Version: 1.0 To: Sevan / Venture37 References: <4FCE8306.1020000@gmail.com> In-Reply-To: <4FCE8306.1020000@gmail.com> X-Enigmail-Version: 1.5a1pre Content-Type: multipart/mixed; boundary="------------030209070404060109040505" Cc: "freebsd-current@freebsd.org" Subject: Re: Unable to buildworld with ccache X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 10:49:40 -0000 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--