From owner-freebsd-current@FreeBSD.ORG Mon Sep 2 11:45:40 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9388179B; Mon, 2 Sep 2013 11:45:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF36B2896; Mon, 2 Sep 2013 11:45:39 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id c10so1882419wiw.2 for ; Mon, 02 Sep 2013 04:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Ng3DkMVTLnuUTIYDhbmUIKwGqfuizgIp+ddTwW7g2bk=; b=krvFIztTsf9ztUhgvd/QayND6WX0bzp8Pe/UFVxf215MgEIAhaURfx7JARGbCCyJXa Omq702tI4wt99P7UO7gH4j0+07L0SlyaHPIWAxVwioxC49Q5+BjbpSNH+4aiQ048us24 SQnf5DB9BlTg+7iRCv8U/adCrBRn5zlr+mxfIexJMM5UFwOFLP0IHLvyIzorIcAxoFAc pTOK2luPraXi+uvFHtJ7OoyzUPwf1B8H4Dt6ahbdO4I6K9OvWEpcBoQbbIfauU8ir9IK ogU/pBkNNk0FWIUQkUeGZRJIfBCbmJnk6X5c9nGA2V2cyIwLBFFlF8WtPkHXsUl/9p3I xJhw== MIME-Version: 1.0 X-Received: by 10.180.211.206 with SMTP id ne14mr13499633wic.30.1378122338169; Mon, 02 Sep 2013 04:45:38 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.146.2 with HTTP; Mon, 2 Sep 2013 04:45:37 -0700 (PDT) In-Reply-To: <2CFFB2A1-7885-40A0-8C96-D56A7492CBDF@FreeBSD.org> References: <20130902020129.GD36239@funkthat.com> <2CFFB2A1-7885-40A0-8C96-D56A7492CBDF@FreeBSD.org> Date: Mon, 2 Sep 2013 04:45:37 -0700 X-Google-Sender-Auth: PZmisVEYKvKVTgIlJb8RuEgm1zk Message-ID: Subject: Re: how do i cross build world/kernel with clang? From: Adrian Chadd To: David Chisnall Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: John-Mark Gurney , 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 11:45:40 -0000 On 2 September 2013 00:47, David Chisnall wrote: > 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. Thanks! -adrian