Date: Tue, 28 Aug 2012 23:51:10 +0400 From: Eir Nym <eirnym@gmail.com> To: Dimitry Andric <dim@freebsd.org> Cc: FreeBSD Mail Lists <freebsd-current@freebsd.org> Subject: Re: Can't build FreeBSD-head with CLANG Message-ID: <CAO8GK0qHZPnpCa0zBiXYtghObAmsoe%2Bzkd0tDMQ=2VWdX_8JMg@mail.gmail.com> In-Reply-To: <503D12CB.4000208@FreeBSD.org> References: <CAO8GK0pQCqAJ--NkfXm%2Bc7%2Bs-_REGA3b4%2BJgao4pmE9gCo_qzA@mail.gmail.com> <503D12CB.4000208@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-- Eir Nym
On 28 August 2012 22:49, Dimitry Andric <dim@freebsd.org> wrote:
> 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?
>
>
i386 never failed, amd64 =E2=80=94 always
>
>> 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 use to be sure I use latest clang
make kernel-toolchain buildkernel ${other_args}
>
>> 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) !=3D 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.
I know about ignorance, but compiler fails at them.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAO8GK0qHZPnpCa0zBiXYtghObAmsoe%2Bzkd0tDMQ=2VWdX_8JMg>
