This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A shared version of libgcc
Mark Mitchell <mark@codesourcery.com> writes:
> >>>>> "Mark" == Mark Kettenis <kettenis@wins.uva.nl> writes:
>
> Mark> But if you put them in libstdc++ as well as the additional
> Mark> C++ runtime library, people only have to distribute one
> Mark> shared library instead of two :-).
>
> I have no objection to that, if it all works. You know a lot more
> about the magic of ELF linker semantics than I.
>
> However, I'm still worried about some more fundamental questions.
> Like, does the code in libgcc work if PIC on all machines where peope
> configure --enable-shared? Do the assemblers and linkers on those
> targets handle that correctly? Is the code going to need to change in
> any way because it's going to be shared?
It's already shared when it is linked into a shared library. So it
had better be working now.
On machines where we support shared libraries, typically libgcc is
already compiled PIC.
> So, in summary, I'd like to see us reach step 1 first, which means
> adjusting the Makefiles, configury, and specs files to build a shared
> libgcc. Run the testsuites, see how things are working.
On a Linux system, you will want to check that all combinations of a
libc, shared object, and application, built with old and new GCCs,
work. You have two libc versions, and two GCC versions, that you can
build the shared library or application with, and two libc versions
and 4 shared library versions that you can try to run it with, so
that's 32 possible test cases (some of which may not be supposed to
work).
Or, of course, you could try to write out a design that explains how
all these cases will work, or not work, and why.
> At that point, I think we will be better poised to decide what
> switches to add to GCC to make users live easier, which of Richard's
> heuristics to implement to avoid having to use the switches, and which
> changes to the library structure might be most appropriate to reduce
> the number of shared objects we have to ship.
Then, if you had a written design, the answers to these questions may
be easier to find...
--
- Geoffrey Keating <geoffk@cygnus.com>