This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: ppc completely soft patches
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>,libc-alpha at sources dot redhat dot com
- Date: Mon, 4 Nov 2002 13:28:13 -0500
- Subject: Re: ppc completely soft patches
- References: <9BFF447A-E2EE-11D6-A887-000393750C1E@redhat.com> <200211041914.32605@enzo.bigblue.local> <20021104182328.GA15439@redhat.com>
On Mon, Nov 04, 2002 at 10:23:28AM -0800, Aldy Hernandez wrote:
>
> > > For soft-float, gcc will emit calls to these in user space, and we want
> > > to use the library functions in libc, not the ones that come with
> > > libgcc.
> >
> > Well, what's wrong with the functions in nof/libgcc.a? If gcc is used for
>
> libgcc is not only slower, but does not handle exceptions or rounding
> modes.
>
> And even if it did handle, say rounding modes-- how would you set it?
> Glibc's <fenv.h> routines set that.
>
> > linking they will always be used anyway, cause the link order is -lgcc -lc
> > -lgcc? If the functions in libgcc.a are broken, libgcc should be fixed
> > instead, or?
>
> Yup, you are correct. You'd have to add -lc to your command line to
> link libc first. It's on my TODO list to hack gcc to link -lc first
> when switch foo-foo-bar is passed.
It seems to me (especially in light of the recent discussion of where
to put the new __abs* routines) that overriding libgcc's helpers in
glibc is asking for trouble. Shouldn't fenv.h set them in a way that
libgcc can check, and the implementation be there?
I still don't understand what the FP emulator code is doing in glibc.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer