From owner-freebsd-current@FreeBSD.ORG Wed Sep 12 11:09:36 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 39853106566B for ; Wed, 12 Sep 2012 11:09:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id E92818FC0A for ; Wed, 12 Sep 2012 11:09:35 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:d8a:6180:883f:1cf5] (unknown [IPv6:2001:7b8:3a7:0:d8a:6180:883f:1cf5]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 857495C37; Wed, 12 Sep 2012 13:09:33 +0200 (CEST) Message-ID: <50506D6E.3040905@FreeBSD.org> Date: Wed, 12 Sep 2012 13:09:34 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120905 Thunderbird/16.0 MIME-Version: 1.0 To: Edward Meewis References: <5050680C.4020402@extraordinarymachine.nl> In-Reply-To: <5050680C.4020402@extraordinarymachine.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Building world with clang ToT 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, 12 Sep 2012 11:09:36 -0000 On 2012-09-12 12:46, Edward Meewis wrote: > Has anyone recently built FreeBSD10-current with clang on a FreeBSD9 > amd64 system? > > I've bumped into a number of issues. Mainly, buildworld picks up the old > system includes, which miss newly introduced symbols; same thing with > libraries. I fixed that by pointing compiler and linker to > /usr/obj/FreeBSD-HEAD/tmp/include and lib. Strange, it should not do that. How exactly did you "point compiler and linker"? What is your make.conf and/or src.conf? If had to hazard a guess based on this information alone, I would say you are assigning to CFLAGS somewhere, instead of using +=. > Building stops in lib/libstand: > > /usr/home/emeewis/src/FreeBSD-HEAD/lib/libstand/i386/_setjmp.S:50:82: > error: register %rbp is only available in 64-bit mode > .text; .p2align 4,0x90; .globl _setjmp; .type _setjmp,@function; > _setjmp:; pushq %rbp; movq %rsp,%rbp; call .mcount; popq %rbp; 9: > > Libstand is build in i386 mode, but includes machine/asm.h in _setjmp.S. > Is there a way to force it to use i386/asm.h? > > I had a go with gcc, but I got the same results... There must be a certain setting on your system which causes this. Most likely, it is again using your existing system headers, instead of those in /usr/obj.