From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 16:16:01 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2F0C106564A for ; Thu, 30 Aug 2012 16:16:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 543A38FC0A for ; Thu, 30 Aug 2012 16:16:00 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id C62AE5C37; Thu, 30 Aug 2012 18:15:59 +0200 (CEST) Message-ID: <503F91C0.3090208@FreeBSD.org> Date: Thu, 30 Aug 2012 18:16:00 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120815 Thunderbird/15.0 MIME-Version: 1.0 To: Eir Nym References: <503D12CB.4000208@FreeBSD.org> <503D29F4.1030804@FreeBSD.org> <503D35DA.9060704@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Mail Lists Subject: Re: Can't build FreeBSD-head with CLANG X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 16:16:01 -0000 On 2012-08-29 10:41, Eir Nym wrote: =2E.. >>> /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.] 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. 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.