From owner-freebsd-arm@FreeBSD.ORG Sun Mar 4 20:32:42 2012 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81AB71065678 for ; Sun, 4 Mar 2012 20:32:42 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 3B7BB8FC16 for ; Sun, 4 Mar 2012 20:32:41 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q24KWVqC083007; Sun, 4 Mar 2012 20:32:31 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.119] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id ccnre7h5nvwu8sdhmryzqrfe6w; Sun, 04 Mar 2012 20:32:31 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <7BF42BF4-547A-424D-A0F0-99075BE86C15@bsdimp.com> Date: Sun, 4 Mar 2012 12:32:29 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <070DCE47-0AE4-48B4-9300-1A361AE0557A@kientzle.com> References: <23CB6C35-9450-40BA-9FA3-37C44B328CA8@freebsd.org> <8042D895-3B3D-431E-ADCC-A150BDC838ED@kientzle.com> <890D6B89-8031-496C-A5A2-A2836369F765@FreeBSD.org> <88338819-70CF-4BA7-92AE-95864F159FF4@FreeBSD.org> <3206B98F-E9F1-4758-9741-AF29FE7CCBFA@kientzle.com> <20120304221219.434706ca@fubar.geek.nz> <7BF42BF4-547A-424D-A0F0-99075BE86C15@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1257) Cc: "arm@freebsd.org" Subject: Re: native toolchain for freestanding apps X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 20:32:42 -0000 On Mar 4, 2012, at 11:56 AM, Warner Losh wrote: >=20 > On Mar 4, 2012, at 2:12 AM, Andrew Turner wrote: >=20 >> On Sun, 4 Mar 2012 00:40:06 -0800 >> Tim Kientzle wrote: >>=20 >>> On Mar 3, 2012, at 7:23 PM, Tim Kientzle wrote: >>>> On Mar 3, 2012, at 5:29 PM, Stanislav Sedov wrote: >>>>> On Mar 3, 2012, at 11:03 AM, Tim Kientzle = wrote: >>>>>>=20 >>>>>> 2) Missing div/mod functions in ARM libgcc. >>>>>>=20 >>>>>=20 >>>>> Hmm, maybe they are disabled because libc supplies them? >>>>=20 >>>> If I copy the various div/mod object files from libc.a into >>>> libgcc.a, then u-boot compiles ... >>>>=20 >>>> Is there any compelling reason they can't be in both places? >> Have you tried to build a FreeBSD binary when both lots of symbols = are >> provided? If it links properly then I can't think of any reason we >> couldn't provide both. The compiler-rt versions are hidden so = shouldn't >> be exposed. >>=20 >>> Here's the patch for libcompiler_rt (aka libgcc.a) that just = includes >>> an extra copy of the numeric routines (duplicating the ones in = libc). >>>=20 >>> With this, I'm now able to build u-boot (and other freestanding >>> programs) using the FreeBSD xdev tools on ARM. >>>=20 >>> Any comments? >> I have done the same with the ARM EABI support as compiler-rt = provides >> the required __aeabi_* symbols. This will mean with it's support the >> libc versions are unneeded. >=20 > I'd say 'commit it unless it gets in the way of something' then :) = The patch looks good to my eye. I'm running a "make universe" with those symbols duplicated in libc and libcompiler_rt (aka libgcc.a) for both ARM and MIPS. If that passes, I'll commit and see who yells. ;-) Thanks for the feedback. I'm still feeling my way around the ARM stuff. Tim