From owner-freebsd-ppc@freebsd.org Tue Nov 21 06:25:03 2017 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5431ADE4281 for ; Tue, 21 Nov 2017 06:25:03 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-114.reflexion.net [208.70.210.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E31461E2C for ; Tue, 21 Nov 2017 06:25:02 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 13140 invoked from network); 21 Nov 2017 06:18:16 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 21 Nov 2017 06:18:16 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.3) with SMTP; Tue, 21 Nov 2017 01:18:16 -0500 (EST) Received: (qmail 9115 invoked from network); 21 Nov 2017 06:18:16 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 21 Nov 2017 06:18:16 -0000 Received: from [192.168.1.25] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id D1508EC7E18; Mon, 20 Nov 2017 22:18:15 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Alternative to using system binutils for cross builds targeting 32-bit powerpc? Message-Id: Date: Mon, 20 Nov 2017 22:18:15 -0800 To: FreeBSD PowerPC ML , FreeBSD Toolchain , freebsd-hackers X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Nov 2017 06:25:03 -0000 [I tend to experiment with using clang to target powerpc64 and powerpc, reporting things that I find.] [clang 5 generates R_PPC_PLTREL24 in the .o files for global symbols in places gcc 4.2.1 generates R_PPC_ADDR16_HA / R_PPC_ADDR16_LO pairs.] Trying to cross build the 32-bit powerpc kernel with the system clang 5 gets failures like: --- aha.ko.full --- ld: aha.kld(.text+0x2b8c): R_PPC_PLTREL24 reloc against local symbol aha.kld: could not read symbols: Bad value *** [aha.ko.full] Error code 1 Would an alternate binutils handle it? There is no devel/powerpc-binutils (but there is devel/powerpc64-binutils ). Does someone known a way to use an alternate binutils to target 32-bit powerpc? As stands it looks like I can only experiment with self-hosted builds and an alternate binutils ( devel/binutils ) as far as pre-existing things go. === Mark Millard markmi at dsl-only.net