Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Aug 2012 20:43:34 +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:  <CAO8GK0obd%2BUOoMnXfdkVdc-Ou5snKZaJtt1Scgbd=-Nq-HBHaA@mail.gmail.com>
In-Reply-To: <503F91C0.3090208@FreeBSD.org>
References:  <CAO8GK0pQCqAJ--NkfXm%2Bc7%2Bs-_REGA3b4%2BJgao4pmE9gCo_qzA@mail.gmail.com> <503D12CB.4000208@FreeBSD.org> <CAO8GK0qHZPnpCa0zBiXYtghObAmsoe%2Bzkd0tDMQ=2VWdX_8JMg@mail.gmail.com> <503D29F4.1030804@FreeBSD.org> <CAO8GK0qpK=S1qhq3mPP6AXpgg15Wop=ghPRpD=e7MudvPBsx1w@mail.gmail.com> <503D35DA.9060704@FreeBSD.org> <CAO8GK0oRynpqUL%2Bef9zjYS4%2BbYE9072yJWNJ5_tmJoho7D_rmQ@mail.gmail.com> <503F91C0.3090208@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-- Eir Nym


On 30 August 2012 20:16, Dimitry Andric <dim@freebsd.org> wrote:
> On 2012-08-29 10:41, Eir Nym wrote:
> ...
>
>>>> /usr/head/src/sys/gnu/fs/xfs/xfs_alloc.c:1449:11: error: variable
>>>> 'fbno' is used uninitialized whenever 'if' condition is false
>>>> [-Werror,-Wsometimes-uninitialized]
>>>>           else if (args->minlen =3D=3D 1 && args->alignment =3D=3D 1 &=
&
>>>> !args->isfl
>>>> &&
>>>>
>>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>>
>>>
>>> Weird, how are you building the xfs module?  It has WERROR=3D in its
>>> Makefile, so the '-Werror' option above should not be there.  This is
>>> because the XFS code was imported more than 6 years ago, and is very
>>> unlikely to ever be fixed. :)
>>
>>
>> head SVN revision 239793,
>> http://eroese.org/_/_/pub/bsd/GENERIC_PF.amd64 =E2=80=94 kernel config
>
>
> Aha, I finally had some time to look at this again, and it seems that
> when xfs is statically linked into your kernel, the disabling of -Werror
> does not take place.  [Note that linking GPL-contaminated code into your
> kernel proper is, shall we say, "ideologically impure" ;-)  But that is
> not the issue here.]
>

I don't like ideological contradictions in any way, but I should
review real using modules in the kernel.

> It seems the WERROR=3D in the xfs module Makefile was right there from th=
e
> start, but it was never removed.  I have compiled it using gcc, and
> there are actually no warnings from gcc at all.  With clang, there are
> several warnings, so I have added a few workaround -Wno-xxx flags for
> them.
>

My kernel & world builds correctly with gcc too, but I want to almost
stop using it.

> Currently I'm running a make universe to see if this doesn't cause any
> trouble, and if it completes successfully, I will commit the changes.
>
> Then I'll mail a note here so you can update your tree and try it out.
>

Oh! Thank you for your efforts!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAO8GK0obd%2BUOoMnXfdkVdc-Ou5snKZaJtt1Scgbd=-Nq-HBHaA>