Re: Clang now builds world and kernel, on i386 and amd64

From: Roman Divacky <rdivacky_at_freebsd.org>
Date: Thu, 23 Sep 2010 08:51:34 +0200
On Wed, Sep 22, 2010 at 11:15:47PM +0200, Bartosz Stec wrote:
>  On 2010-09-22 22:42, Rene Ladan wrote:
> >>
> >>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_at_ -I_at_/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
> >>
> >Hmm, works for me:
> >acer# ls -l /boot/kernel/if_stge.ko*
> >-r-xr-xr-x  1 root  wheel   39344 Sep 22 13:34 /boot/kernel/if_stge.ko
> >-r-xr-xr-x  1 root  wheel  218248 Sep 22 13:34
> >/boot/kernel/if_stge.ko.symbols
> >acer#
> >
> >This is with the default GENERIC kernel.
> >
> >Rene
> Problem wasn't clang related, but caused by stge changes in r212973, and 
> it has already been fixed (in r213000).
> I will post comparison of building times and results using 
> gcc/clang/ccache/noccache on my box soon :)

if you want to post any build-time numbers for clang please 

          -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG

uncomment the -DNDEBUG on this line in lib/clang/clang.build.mk
and rebuild it otherwise you are using Release+Asserts build of
clang which is some 30% slower than the normal one...
Received on Thu Sep 23 2010 - 05:08:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:07 UTC