native toolchain for freestanding apps

Tim Kientzle tim at kientzle.com
Sun Mar 4 20:32:42 UTC 2012


On Mar 4, 2012, at 11:56 AM, Warner Losh wrote:

> 
> 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.

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



More information about the freebsd-arm mailing list