From owner-freebsd-current@FreeBSD.ORG Mon Sep 2 07:47:33 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E4111ECF; Mon, 2 Sep 2013 07:47:33 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1AD824C4; Mon, 2 Sep 2013 07:47:33 +0000 (UTC) Received: from [192.168.0.2] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginmedia.com [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r827lUrw035816 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 2 Sep 2013 07:47:32 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: how do i cross build world/kernel with clang? From: David Chisnall In-Reply-To: <20130902020129.GD36239@funkthat.com> Date: Mon, 2 Sep 2013 08:47:26 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <2CFFB2A1-7885-40A0-8C96-D56A7492CBDF@FreeBSD.org> References: <20130902020129.GD36239@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.1508) Cc: Adrian Chadd , freebsd-current , "freebsd-mips@freebsd.org" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 02 Sep 2013 07:47:34 -0000 On 2 Sep 2013, at 03:01, John-Mark Gurney wrote: > b/crtn.o: warning: linking PIC files with non-PIC files I think that this is an issue in our import of clang. I'll have to = check whether I upstreamed the code, but it's basically just not setting = the e_flags field in the ELF header correctly (this required a little = bit of tweaking in LLVM, because MIPS is the only platform that uses = e_flags in quite this way - for everything else you know what the value = should be from the target triple). > exect.So: In function `exect': > (.text+0x18): relocation truncated to fit: R_MIPS_PC16 against = `__cerror' I believe that this is a limitation of our ld. The PC16 relocation = ought to be made to point to a PLT entry if it's too close, but it is = just being truncated instead. This is fixed in upstream ld-bfd, and = hopefully will be easy to fix with MCLinker if it doesn't already work. = I'll see if we can make clang default to using larger relocation types = for things not in the same compilation unit. David