Article View: gnu.gcc.bug
Article #19Re: __builtin_saveregs and libraries
From: Tim Moore
Date: Thu, 29 Oct 1992 13:51
Date: Thu, 29 Oct 1992 13:51
30 lines
1921 bytes
1921 bytes
In article <Bwv3sM.I53@cs.columbia.edu> carson@cs.columbia.edu (Carson A. Gaspar) writes:
When one compiles libraries that include functions that use varargs
with gcc (got that?) the libraries contain unresolved references to
__builtin_saveregs. This makes the libraries dependent on gcc. A
better way of handling this is to make the __builtin_saveregs assembly
code in-line (this adds only 4 instructions on a sparc).
Well, six, but who's counting. Most ports of gcc2 do handle
__builtin_saveregs "inline", i.e. by generating rtl. The sparc and
mips maintainers probably just haven't gotten around to it.
The only machine for which it is impractical to inline
__builtin_saveregs seems to be the i860, which has a really hairy
va_list structure.
This all came to my attention because the X11R5 libraries are now
dependent on gcc. We are temporarily adding __builtin_saveregs to our
libc so we can run programs without recompiling them (assuming they
are dynamically linked.)
If your libraries are built with gcc, shouldn't they be dynamically
linked against all of libgcc, not just __builtin_saveregs?
Carson Gaspar
carson@cs.columbia.edu
--
Tim Moore moore@cs.utah.edu {bellcore,hplabs}!utah-cs!moore
"Wind in my hair - Shifting and drifting - Mechanical music - Adrenaline surge"
- Rush
Technical Details
Message-ID:
<MOORE.92Oct29085109@defmacro.cs.utah.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!bu.edu!att!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!hellgate.utah.edu!moore%csReferences:
moore%cs@hellgate.utah.edu (Tim Moore)Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!bu.edu!att!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!hellgate.utah.edu!moore%cs From: moore%cs@hellgate.utah.edu (Tim Moore) Newsgroups: gnu.gcc.bug Subject: Re: __builtin_saveregs and libraries Message-ID: <MOORE.92Oct29085109@defmacro.cs.utah.edu> Date: 29 Oct 92 13:51:09 GMT References: moore%cs@hellgate.utah.edu (Tim Moore) Sender: gnulists@ai.mit.edu Distribution: gnu Organization: University of Utah CS Dept Lines: 30 Approved: bug-gcc@prep.ai.mit.edu