This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to build newlib for ARM/thumb, sp -fshort-double issupporte d??


Hi Jepsen,

> To get better performance, we want to use the -fshort-double option.
> We are using eCos as RTOS.
>
> Is this correct? 
>
> If yes, how to build newlib, so that -fshort-double works? 
>
> If possible, we would like a multilib build of newlib, so that it
> selects the correct version of newlib, if -fshort-double is used. 

This is what you need.  The gcc sources are not set up to generate a
set of multilibs using the -fshort-double option, so you are going to
have to modify the sources and then rebuild/reinstall the compiler and
the libraries.

You will need to edit the t-arm-elf file in the gcc/config/arm
directory.  Note that this file has already been altered from the
officially released gcc sources by the application of the
gcc-3.2.1-arm-mulitlib.patch.

The file have some lines in it that set out which multilibs to build.
For example:

   MULTILIB_OPTIONS    += mthumb-interwork
   MULTILIB_DIRNAMES   += interwork

You need to add some extra lines like this:

   MULTILIB_OPTIONS    += fshort-double
   MULTILIB_DIRNAMES   += short-double

Note - you can choose any name for the MULTILIB_DIRNAME directory.
The "short-double" name I used above is just an example.

Note - you might also want to comment out some of the multilib options
if you are not using them.  This will reduce your build times and
reduce the amount of disk space used by the build/installation.  Be
careful not to delete the very first MULTILIB_OPTIONS,
MULTILIB_DIRNAMES, and MULTILIB_EXCEPTIONS entries as these set up
the makefile variables for use in later entries.

Cheers
        Nick
        



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]