Arm toolchain with gcc / newlib / VFP / hard float - can it be done?

Joe Button ml_newlib@joebutton.co.uk
Fri Mar 8 13:01:00 GMT 2013


On 26/02/13 10:24, Freddie Chopin wrote:
> W dniu 2013-02-26 10:57, Joe Button pisze:
>>> That's why I suggested taking a look at the linaro toolchain, as in it
>>> newlib is built so that newlib takes multilib into account. What does
>>> your gcc say when you do:
>>> <prefix>-gcc -print-multi-lib
>> ./arm-none-eabi-gcc -print-multi-lib
>> .;
>> thumb;@mthumb
>> fpu;@mfloat-abi=hard
>
> So this look a bit short... In here I got sth like:
>
>> >arm-none-eabi-gcc -print-multi-lib
>> .;
>> thumb;@mthumb
>> fpu;@mfloat-abi=hard
>> armv6-m;@mthumb@march=armv6s-m
>> armv7-m;@mthumb@march=armv7-m
>> armv7e-m;@mthumb@march=armv7e-m
>> armv7-r/thumb;@mthumb@march=armv7-r
>> armv7e-m/softfp;@mthumb@march=armv7e-m@mfloat-abi=softfp@mfpu=fpv4-sp-d16 
>>
>> armv7e-m/fpu;@mthumb@march=armv7e-m@mfloat-abi=hard@mfpu=fpv4-sp-d16
>> armv7-r/thumb/softfp;@mthumb@march=armv7-r@mfloat-abi=softfp@mfpu=vfpv3-d16 
>>
>> armv7-r/thumb/fpu;@mthumb@march=armv7-r@mfloat-abi=hard@mfpu=vfpv3-d16
>
> The lines you have are for "default arch", which - as I said - (from 
> what I know) is ARMv4 (ARM7TDMI etc.), for your chip I guess you 
> should have sth like (just a guess):
> "armv5/fpu;@march=armv5@mfloat-abi=hard"
>
> And your GCC can generate code for ARMv5 (it would probably happily 
> generate code for Cortex-A15 too (; ), it just doesn't have libraries 
> for it, so you cannot use anything that comes from library (like 
> sqrt(), printf(), malloc(), ...).
>
> 4\/3!!

Hi. I feel like I should report back that I eventually got rid of the 
vfp abi errors, not by patching gcc or anything complicated but by 
setting my LIB path correctly. Vive l'incompetence.

Thanks,

Joe



More information about the Newlib mailing list