Re: Can't build FreeBSD-head with CLANG

From: Eir Nym <eirnym_at_gmail.com>
Date: Wed, 29 Aug 2012 00:20:54 +0400
-- Eir Nym


On 28 August 2012 23:51, Eir Nym <eirnym_at_gmail.com> wrote:
> -- Eir Nym
>
>
> On 28 August 2012 22:49, Dimitry Andric <dim_at_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 — 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) != 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.

my simple make world script is in attachment
Received on Tue Aug 28 2012 - 18:21:16 UTC

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