native toolchain for freestanding apps

Warner Losh imp at bsdimp.com
Sun Mar 4 20:04:06 UTC 2012


On Mar 4, 2012, at 2:12 AM, Andrew Turner wrote:

> On Sun, 4 Mar 2012 00:40:06 -0800
> Tim Kientzle <tim at kientzle.com> wrote:
> 
>> 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 <tim at kientzle.com> wrote:
>>>>> 
>>>>> 2) Missing div/mod functions in ARM libgcc.
>>>>> 
>>>> 
>>>> Hmm, maybe they are disabled because libc supplies them?
>>> 
>>> If I copy the various div/mod object files from libc.a into
>>> libgcc.a, then u-boot compiles ...
>>> 
>>> 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.
> 
>> 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).
>> 
>> With this, I'm now able to build u-boot (and other freestanding
>> programs) using the FreeBSD xdev tools on ARM.
>> 
>> 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.

I'd say 'commit it unless it gets in the way of something' then :)  The patch looks good to my eye.

Warner



More information about the freebsd-arm mailing list