This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libtarget.a?
- From: Mark Mitchell <mark at codesourcery dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>, Richard Henderson <rth at redhat dot com>, John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>, Alan Modra <amodra at bigpond dot net dot au>, Jeffrey Law <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 17 Feb 2002 17:21:26 -0800
- Subject: Re: libtarget.a?
> BUT, this is relevant to ppc32. Again, the System V Application
> Binary Interface PowerPC Processor Supplement (ppc32) EXPLICITLY states:
> "The retister saving and retoring functions described in this section use
> non-standard calling conventions which require them to be statically
> linked into any executable or shared object modules in which they are
> used." The FPR functions may happen to be safe, but the ABI does not
> guarantee that.
My two cents:
1. On GNU/Linux systems, using libc seems appropriate, as we just hashed
out for PA. It seems like the GNU linker magic allows you to make
libc really contain a static archive, and since everything's getting
linked against libc, you win automatically.
2. On other systems, crt*.o still seems like a fine place to put these
things to me. Alan's comment that you then end up linking in the
routines when you don't need them doesn't worry me -- you already
end up with static constructor stuff that you don't need. Besides,
we're talking about tiny routines -- probably only a few K of code
space. And if you don't have floating point at all on your target,
you can turn this stuff off. Or, you can have a --no-fp option
that links in a different crt*.o object that doesn't have the funky
routines.
3. On some other systems, GCC may be able to use the routines provided
by the vendor wherever they provided them. In that case, the target
can just indicate that we should link against this library.
So, I do not see the need for introducing yet more complexity into are
already incredibly tangled build process.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com