Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 May 2015 09:17:46 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        NGie Cooper <yaneurabeya@gmail.com>
Cc:        dave@sopwith.solgatos.com,  "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Trying to use clang/head and XCC
Message-ID:  <CAJ-Vmoke6ZY=iF%2ByZgKQB-a5fzVGBo5QAZu6EJTLsm2o15wgxw@mail.gmail.com>
In-Reply-To: <CAGHfRMAkT-iPX32RSdpq98shxGbujWH_HGpZ7oS=nZFrfEEtcg@mail.gmail.com>
References:  <CAMqLHRO%2BapPEpaKXgof9VN919xny2gRWY0_5F6eetgmdJ6Kv5Q@mail.gmail.com> <CAGHfRMAkT-iPX32RSdpq98shxGbujWH_HGpZ7oS=nZFrfEEtcg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 19 May 2015 at 17:50, NGie Cooper <yaneurabeya@gmail.com> wrote:
> On Tue, May 19, 2015 at 1:35 PM, Dave Seifert
> <davidalanseifert@gmail.com> wrote:
>> sean typed:
>>> No documentation of what CFLAGS are required to build and ignore warnings.
>>
>> Are you *sure* that ignoring those warnings is a good idea?
>
> The problem is that clang emits a *lot* of warnings with -Wall that
> gcc doesn't, which causes failures if -Werror is enabled in the build
> (annoying, but I've run into this at work...). Please see my earlier
> reply about 10.0-RELEASE builds being broken on 11.0-CURRENT with
> clang 3.6.0.
>
> Also, gcc emits different warnings because (IIRC) it analyzes code
> that's been optimized whereas I believe clang does it beforehand
> (please correct me if I'm wrong).

I'm starting the process of finding/fixing issues that gcc-4.9.2 is
finding/fixing on MIPS.

It can only make things cleaner.

I've also been bitten by the .. lack of clarity/sanity with how CFLAGS
and such is populated. For MIPS, I discovered that:

* there's stuff in kmod.*mk that sets -O and other flags, but it
doesn't apply to normal kernel builds; and
* the CFLAGS stuff in bsd.sys.mk is what's being paid attention to.

Then we don't set the CPUTYPE stuff by default on MIPS, so I have to
add CPUTYPE=mips32 or gcc-4.9.2 compiles mips1 code by default, which
ends pretty hilariously in places.

Fun times abound!



-adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmoke6ZY=iF%2ByZgKQB-a5fzVGBo5QAZu6EJTLsm2o15wgxw>