From owner-freebsd-current@FreeBSD.ORG Sun Sep 26 13:19:40 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 BCB7D106564A for ; Sun, 26 Sep 2010 13:19:40 +0000 (UTC) (envelope-from admin@kkip.pl) Received: from mainframe.kkip.pl (kkip.pl [87.105.164.78]) by mx1.freebsd.org (Postfix) with ESMTP id 4BB3D8FC0C for ; Sun, 26 Sep 2010 13:19:40 +0000 (UTC) Received: from mb01.admin.lan.kkip.pl ([10.66.3.0]) by mainframe.kkip.pl with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1Ozr8Q-0000QH-JJ; Sun, 26 Sep 2010 15:19:37 +0200 Message-ID: <4C9F4857.2070801@kkip.pl> Date: Sun, 26 Sep 2010 15:19:19 +0200 From: Bartosz Stec User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.9) Gecko/20100915 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 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> <20100926124244.GA34061@owl.midgard.homeip.net> <4C9F427B.3010904@kkip.pl> In-Reply-To: <4C9F427B.3010904@kkip.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-User: admin@kkip.pl X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Spam-Score: -7.6 X-Spam-Score-Int: -75 X-Exim-Version: 4.72 (build at 10-Jun-2010 13:05:33) X-Date: 2010-09-26 15:19:37 X-Connected-IP: 10.66.3.0:3181 X-Message-Linecount: 90 X-Body-Linecount: 77 X-Message-Size: 4139 X-Body-Size: 3191 X-Received-Count: 1 X-Recipient-Count: 2 X-Local-Recipient-Count: 2 X-Local-Recipient-Defer-Count: 0 X-Local-Recipient-Fail-Count: 0 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: Sun, 26 Sep 2010 13:19:40 -0000 W dniu 2010-09-26 14:54, Bartosz Stec pisze: > W dniu 2010-09-26 14:42, Erik Trulsson pisze: >> 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. >> >> >> > That's what I thought too, but in that case, why are they different > optimisations available? > In /usr/share/examples/etc/make.conf: > > # Currently the following CPU types are recognized: > # Intel x86 architecture: > # (AMD CPUs) opteron athlon64 athlon-mp athlon-xp athlon-4 > # athlon-tbird athlon k8 k6-3 k6-2 k6 k5 > > Or maybe some of them are in fact bywords to compiler? > > Still, my CURRENT box is at idle mostly, so I will experiment a little > and see what I get. > > Cheers > Argh, I assumed that 'Mobile Athlon XP' == 'Athlon MP' while it seem's that they aren't. CPUTYPE=athlon-xp was a right choice for my CPU. Sorry for mistake. -- Bartosz Stec