From owner-freebsd-current@FreeBSD.ORG Thu Aug 30 16:43:58 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D7AE106566B; Thu, 30 Aug 2012 16:43:58 +0000 (UTC) (envelope-from eirnym@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 072018FC0C; Thu, 30 Aug 2012 16:43:57 +0000 (UTC) Received: by obbun3 with SMTP id un3so4880815obb.13 for ; Thu, 30 Aug 2012 09:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=4nSaZ+2+L1FR23TKMRVb8R/qUT72NkEo7yNAwt/eJ7E=; b=z58uhhC0qn/Qg9aE3R4TACNUKesZ5GkwPUtnUJuDFXLmeJFcA9Z0Vru6XxBqJ4Zrtu ZCelShUxKbTN9ZuEgAFHY4ChbCpQmTW6ANZQpzr5NyD0St7jqJA0uDAQSkn7ptYnCLg3 s5Vqbd3Y+xn4QezEhUObg7V5xQFUxkAMNIptJU8MK8gTjgb5y4ER3J5g0E5p0Qf+C5jZ kOynMNOZ2JYDuxLPQ1T7z3A6VjfPLBSaxzzozDBV0tTy7GhxP1BidLYrQSSOIuKGUf/u hzVoKBCLhS8Wre+dw+RDbkBqajj8nLM29cc/6RERX397WM37koAN4U7zS6gONxT8PUvU v+qw== Received: by 10.182.50.98 with SMTP id b2mr5323990obo.28.1346345036305; Thu, 30 Aug 2012 09:43:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.94.205 with HTTP; Thu, 30 Aug 2012 09:43:34 -0700 (PDT) In-Reply-To: <503F91C0.3090208@FreeBSD.org> References: <503D12CB.4000208@FreeBSD.org> <503D29F4.1030804@FreeBSD.org> <503D35DA.9060704@FreeBSD.org> <503F91C0.3090208@FreeBSD.org> From: Eir Nym Date: Thu, 30 Aug 2012 20:43:34 +0400 Message-ID: To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 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:43:58 -0000 -- Eir Nym On 30 August 2012 20:16, Dimitry Andric 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!