This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: compiling new-lib
- To: Jens-Christian Lache <lache at tu-harburg dot de>
- Subject: Re: compiling new-lib
- From: "J. Johnston" <jjohnstn at cygnus dot com>
- Date: Mon, 27 Nov 2000 18:44:56 -0500
- CC: newlib at sources dot redhat dot com
- Organization: Red Hat Inc.
- References: <00112719171200.06132@lab04>
Jens-Christian Lache wrote:
>
> Does anybody know if the files from new-lib get compiled
> with optimization -O2 turned on by default?
>
> If I do a doublexdouble - multiplikation (64x64) on a ARM7TDMI proc,
> I get times of 1160 Clock-Ticks per multiplikation.
>
> Jens-Christian
>
> --
>
> Jens-Christian Lache
> Technische Universitaet Hamburg-Harburg
> www.tu-harburg.de/~sejl1601
> Mail:
> lache@tu-harburg.de
> lache@ngi.de
> Tel.:
> +0491759610756
The default target flags are "-g -O2". This does not affect multiplication, however.
Code for the multiplication of doubles is part of the compiler.
What options did you specify when compiling? If your chip supports floating point, you
want to specify the -mhard-float option when you compile and link. Linking via gcc allows
you to specify this option so that the correct newlib library is linked in.
You should also note that the default newlib math library uses integer math. If
you want newlib to use floating-point algorithms, then configure with --enable-newlib-hw-fp.
-- Jeff Johnston