Re: Can't build FreeBSD-head with CLANG

看板FB_current作者時間13年前 (2012/09/08 14:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串11/14 (看更多)
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. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1GIjyh5l (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1GIjyh5l (FB_current)