Date: Wed, 22 Sep 2010 09:50:45 -0700 From: Pyun YongHyeon <pyunyh@gmail.com> To: Bartosz Stec <admin@kkip.pl> Cc: freebsd-current@freebsd.org Subject: Re: Clang now builds world and kernel, on i386 and amd64 Message-ID: <20100922165045.GB10299@michelle.cdnetworks.com> In-Reply-To: <4C9A3336.20702@kkip.pl> References: <4C99A53E.7060707@FreeBSD.org> <AANLkTi=_ZpYZ7XwHJOYuRMOFCGebRwD=YEYORKnMmC0s@mail.gmail.com> <4C9A3336.20702@kkip.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 22, 2010 at 06:47:50PM +0200, Bartosz Stec wrote:
> On 2010-09-22 12:42, Ren? Ladan wrote:
> >2010/9/22 Dimitry Andric<dim@freebsd.org>:
> >>Hi,
> >>
> >>As of r212979, you should now be able to build world and kernel on i386
> >>and amd64 with clang, without any additional patches!
> >>
> >>To do so, make sure you have updated your installed world to at least
> >>r212904 (which has the most recently imported clang/llvm snapshot), and
> >>put the following in /etc/src.conf:
> >>
> >>.if !defined(CC) || ${CC} == "cc"
> >>CC=clang
> >>.endif
> >>.if !defined(CXX) || ${CXX} == "c++"
> >>CXX=clang++
> >>.endif
> >># Don't die on warnings
> >>NO_WERROR=
> >>WERROR=
> >>
> >
> Just tried it. World has been builded without any problems, but stge
> kernel module failed to compile:
>
> ===> stge (all)
> clang -O2 -pipe -march=athlon-xp -fno-strict-aliasing -D_KERNEL
> -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include
> /usr/obj/usr/src/sys/ATHLON9/opt_global.h -I. -I@ -I@/contrib/altq
> -fno-common -I/usr/obj/usr/src/sys/ATHLON9 -mno-mmx -mno-3dnow
> -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector
> -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls
> -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
> -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign
> -fformat-extensions -c /usr/src/sys/modules/stge/../../dev/stge/if_stge.c
> /usr/src/sys/modules/stge/../../dev/stge/if_stge.c:1947:5: error:
> 'break' statement not in loop or switch statement
> break;
> ^
> /usr/src/sys/modules/stge/../../dev/stge/if_stge.c:1953:6: error:
> 'break' statement not in loop or switch statement
> break
>
I committed the fix. Sorry for the breakage.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100922165045.GB10299>
