From owner-freebsd-current@FreeBSD.ORG Thu Sep 23 07:08:14 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CC351065675; Thu, 23 Sep 2010 07:08:14 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 068FE8FC1A; Thu, 23 Sep 2010 07:08:13 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 9A07D9CB091; Thu, 23 Sep 2010 08:51:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9ZtR1+bdM8oh; Thu, 23 Sep 2010 08:51:35 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id B2D969CB185; Thu, 23 Sep 2010 08:51:35 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.4/8.14.4/Submit) id o8N6pYwJ031800; Thu, 23 Sep 2010 08:51:34 +0200 (CEST) (envelope-from rdivacky) Date: Thu, 23 Sep 2010 08:51:34 +0200 From: Roman Divacky To: Bartosz Stec Message-ID: <20100923065134.GA31455@freebsd.org> References: <4C99A53E.7060707@FreeBSD.org> <4C9A32B8.60204@kkip.pl> <4C9A6A38.4080307@freebsd.org> <4C9A7203.8010701@kkip.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C9A7203.8010701@kkip.pl> User-Agent: Mutt/1.4.2.3i Cc: Rene Ladan , current@freebsd.org Subject: Re: Clang now builds world and kernel, on i386 and amd64 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, 23 Sep 2010 07:08:14 -0000 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@ -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 > >> > >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...