Re: Can't build FreeBSD-head with CLANG

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Tue, 28 Aug 2012 20:49:47 +0200
On 2012-08-28 18:31, Eir Nym wrote:
> I can't build FreeBSD (GENERIC & custom kernel) with clang. Build
> finishes for i386 and fails for amd64 for same kernels

What is the error you were getting on amd64?


> I have bsd box with following clang version:
>> FreeBSD clang version 3.0 (branches/release_30 142614) 20111021
>> Target: x86_64-unknown-freebsd10.0
>> Thread model: posix

This is rather old, we went through clang 3.1 some time ago, and
recently updated it to 3.2.


> I try to compile it with /dev/null as make.conf and following src.conf:
...
> but I constantly get warnings (not long ago they was errors) in kernel
> like this:
> /usr/head/src/sys/netgraph/ng_parse.c:1263:14: warning: comparison of
> unsigned expression < 0 is always false [-Wtautological-compare]
>                          if (index < 0 || eptr - (s + *off) != len) {
>                              ~~~~~ ^ ~
> 1 warning generated.
>
> Also I get not initialized warnings and so on.

You can safely ignore those.  They are just an incentive for the
maintainers to fix them eventually.  Those tautological comparison
warnings specifically are quite harmless: the compiler will optimize the
unused code away anyhow.
Received on Tue Aug 28 2012 - 16:49:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC