Building newlib without -mhard-float

Jeff Johnston jjohnstn@redhat.com
Tue Sep 4 23:26:00 GMT 2007


Rick Mann wrote:
> I'm having a heck of a time getting newlib variants for ARM with VFP 
> instructions. I configure using --with-float=soft, but it still builds a 
> bunch of versions using -mhard-float. I tried modifying 
> CFLAGS_FOR_TARGET to include -mcpu=xscale and/or -march=armv5te, but 
> then I get errors about it confilicting with -mhard-float.
> 
> How do i get newlib to build without -mhard-float?
> 

A couple of choices.

1. Create a version of the compiler which doesn't multilib -mhard-float.
    If you call the compiler with the --print-multi-lib option you will
    get a list of directories and options that it will permutate to
    create the various libraries.  Newlib uses that list unless you
    specify --disable-multilib when you configure.  If you modify the
    compiler, then you can trim that list to whatever you want.

2. Disable multilib and manually build a library you want.  In this
    particular case, you should use TARGET_CFLAGS to append whatever
    compiler options you want to the default options used to build
    newlib.  You disable multilib by adding --disable-multilib to
    your configuration options.

-- Jeff J.


> TIA,
> Rick
> 



More information about the Newlib mailing list