From owner-freebsd-current@FreeBSD.ORG Wed Sep 22 21:11:53 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 549D910656A5 for ; Wed, 22 Sep 2010 21:11:53 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id D106A8FC16 for ; Wed, 22 Sep 2010 21:11:52 +0000 (UTC) Received: by eyx24 with SMTP id 24so343859eyx.13 for ; Wed, 22 Sep 2010 14:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :organization:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=E2Oiw7hm3wgagK3b0VixK8IiqpneqcK02NOSkeZNBAs=; b=QxUc90kH2Equ7zyhctE9/mAggV4NJFeGbMHAiCCixyLZy8cmqsqKVYVsQD1KYc1oRw Tv39EgPaTc633m0Z6W234xXmSQj8Of2KGt/lmu6n6ZVNEsY9s8WauVFqzTe18qfSqFrX axXvd2QI3VFJEZMvcaTDhWSRsijIw8vkI7Hoc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:organization:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=ZtLZrfL4qK7sRMi73tg4XQkZWRVdjkIc/v5MUlQ3vIgxJMgqN7lRT9Hu5C+O5/fV4F FhBU5e9qJD9NwYwzKAtTWal6mrO3c9H3jr/6kic1U/sffxZrOYtT80/Laiz+3yU4fq11 IJUtK83evkj466KOswJTt3WMFzdY0L2cYWRUY= Received: by 10.213.80.140 with SMTP id t12mr5666977ebk.27.1285188154451; Wed, 22 Sep 2010 13:42:34 -0700 (PDT) Received: from [192.168.1.64] (ip4da3ae31.direct-adsl.nl [77.163.174.49]) by mx.google.com with ESMTPS id u9sm15355112eeh.11.2010.09.22.13.42.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 22 Sep 2010 13:42:33 -0700 (PDT) Sender: =?UTF-8?Q?Ren=C3=A9_Ladan?= Message-ID: <4C9A6A38.4080307@freebsd.org> Date: Wed, 22 Sep 2010 22:42:32 +0200 From: Rene Ladan Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; nl-NL; rv:1.9.2.9) Gecko/20100919 Thunderbird/3.1.4 MIME-Version: 1.0 To: Bartosz Stec References: <4C99A53E.7060707@FreeBSD.org> <4C9A32B8.60204@kkip.pl> In-Reply-To: <4C9A32B8.60204@kkip.pl> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: 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: Wed, 22 Sep 2010 21:11:53 -0000 On 22-09-2010 18:45, Bartosz Stec wrote: > On 2010-09-22 12:42, René Ladan wrote: >> 2010/9/22 Dimitry Andric: >>> 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 > 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 -- http://www.rene-ladan.nl/ GPG fingerprint = ADBC ECCD EB5F A6B4 549F 600D 8C9E 647A E564 2BFC (subkeys.pgp.net)