From owner-freebsd-current@FreeBSD.ORG Sun Sep 26 12:57:57 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 AA9CF106564A for ; Sun, 26 Sep 2010 12:57:57 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id 369AB8FC18 for ; Sun, 26 Sep 2010 12:57:57 +0000 (UTC) Received: from c83-255-61-120.bredband.comhem.se ([83.255.61.120]:34358 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1OzqZ7-0002QG-8h for current@freebsd.org; Sun, 26 Sep 2010 14:42:51 +0200 Received: (qmail 36739 invoked from network); 26 Sep 2010 14:42:44 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 26 Sep 2010 14:42:44 +0200 Received: (qmail 34161 invoked by uid 1001); 26 Sep 2010 14:42:44 +0200 Date: Sun, 26 Sep 2010 14:42:44 +0200 From: Erik Trulsson To: Bartosz Stec Message-ID: <20100926124244.GA34061@owl.midgard.homeip.net> References: <20100923065134.GA31455@freebsd.org> <4C9B3207.2070302@kkip.pl> <4C9B383A.6080008@FreeBSD.org> <4C9B38E2.7010403@kkip.pl> <4C9B6804.3070102@FreeBSD.org> <4C9C8A64.3000103@kkip.pl> <4C9C8FD9.1030305@FreeBSD.org> <4C9C95D7.40600@kkip.pl> <4C9CB702.50004@FreeBSD.org> <4C9F3ADF.7070903@kkip.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C9F3ADF.7070903@kkip.pl> User-Agent: Mutt/1.5.20 (2009-06-14) X-Originating-IP: 83.255.61.120 X-Scan-Result: No virus found in message 1OzqZ7-0002QG-8h. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1OzqZ7-0002QG-8h 0a892774c3892b51374096ffdd89df53 Cc: Roman Divacky , Dimitry Andric , 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: Sun, 26 Sep 2010 12:57:57 -0000 On Sun, Sep 26, 2010 at 02:21:51PM +0200, Bartosz Stec wrote: > W dniu 2010-09-24 16:34, Dimitry Andric pisze: > > On 2010-09-24 14:13, Bartosz Stec wrote: > >>> Could you please try to rename this make.conf to e.g. > >>> make.conf.disable, > >>> and retry the world build? > >> Still the same without make.conf. My personal guess is, that clang > >> builded by clang with CPUTYPE=athlon-xp is somehow broken. I don't think > >> CFLAGS=-O2 -pipe could do any harm, and also note that clang builded by > >> GCC with exactly the same make.conf has no problems with world > >> building :) > > > > I still cannot reproduce your issue... To check, I have built world > > with CPUTYPE=athlon-xp, verified it used "-O2 -pipe -march=athlon-xp" as > > compilation flags for the world stage, and installed the resulting clang > > executables. > > > > Those clang executables do not exhibit the same problem as yours do; > > they can build tblgen (during the bootstrap-tools stage) fine. > > > > I suggest you comment out the CPUTYPE macro in make.conf for now, > > rebuild your world with gcc, and then rebuild it with clang again, to > > see if the issue goes away. > > Indeed, I was right. Problem is gone after hashing out CPUTYPE line, > building world with GCC, and with clang after that. Now world is > building without problems. > > But hey, i just realized that: > > # dmesg | grep -i cpu > CPU: mobile AMD Athlon(tm) XP 2200+ (1800.11-MHz 686-class CPU) > > I simply forgot that about a year ago I changed Athlon XP in this BOX to > Athlon MP and I didn't changed CPUTYPE in make.conf... > So maybe clang in fact did exactly what it should and created binary > designed to other CPUTYPE ;) I don't know exact differences between > Athlon XP/MP architecture (registers specially) but I just started > another try with CPUTYPE=Athlon-mp and I will post results :) The only difference between Athlon XP and Athlon MP is that the MP variants are certified for multi-processor use (in reality most Athlon XP also worked just fine in multi-processor systems, or could easily be modified to do so.) Available instructions and registers are identical between the two. Mobile variants of the Athlon XP should also be identical from a programming point of view. -- Erik Trulsson ertr1013@student.uu.se