From owner-freebsd-arm@FreeBSD.ORG Sun Mar 4 03:23:08 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 8EFEB106566B; Sun, 4 Mar 2012 03:23:08 +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 6525B8FC12; Sun, 4 Mar 2012 03:23:08 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q243N757076981; Sun, 4 Mar 2012 03:23:07 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.119] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id k3kby8rqd3cj5n2yre67v3aqx2; Sun, 04 Mar 2012 03:23:07 +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: <88338819-70CF-4BA7-92AE-95864F159FF4@FreeBSD.org> Date: Sat, 3 Mar 2012 19:23:05 -0800 Content-Transfer-Encoding: 7bit Message-Id: <3206B98F-E9F1-4758-9741-AF29FE7CCBFA@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> To: Stanislav Sedov X-Mailer: Apple Mail (2.1257) Cc: "arm@freebsd.org" Subject: Re: ports cross-compilers vs. native toolchain 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 03:23:08 -0000 On Mar 3, 2012, at 5:29 PM, Stanislav Sedov wrote: > > On Mar 3, 2012, at 11:03 AM, Tim Kientzle wrote: > >> >> 2) Missing div/mod functions in ARM libgcc. >> >> You can work around this by adding -lc to a couple >> of places in the u-boot makefiles. I'm also looking into >> a fix for FreeBSD libgcc. (Looks like these functions >> were disabled deliberately? > > Hmm, maybe they are disabled because libc supplies them? Yes, this seems to be exactly the rationale. If I copy the various div/mod object files from libc.a into libgcc.a, then u-boot compiles out-of-the-box with the FreeBSD xdev tools. I'm rebuilding the xdev tools now with the obvious one-line patch to libcompiler_rt to verify further. Is there any compelling reason they can't be in both places? Tim P.S. It is just a tad confusing that libgcc.a and libgcc.so are completely different libraries with different contents compiled from different sources. ;-)