This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Shared library annoyance with gcc-3_0-branch


Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:

> On 19 Feb 2001, Eric W. Biederman wrote:
> > A shared libgcc looks necessary to resolve problems of it's being
> > linked in multiple times by a program.  But for a shared libgcc to
> > work reliably it must be in /lib.   So we need gcc's make install to
> > put it there with an appropriate version number.
> 
> No.  Here, for example, we install GCC from an account different than
> root.

O.k.  What happens when you take that GCC and build a binary for use
during the unix bootstrap.  init, /bin/sh, or something called from
your initial scripts.

Everything works just fine until you boot a machine and try to use
that program, and then kaboom it fails.  But it works on any machine
that is fully up.  And it is very difficult to diagnose.

If most system programs weren't written in C.  And if gcc wasn't today
a drop in replacement for the vendors C compiler, I might go another
way.

But as it is if you don't try and put a shared libgcc in /lib by
default then your visibility will be much less and you will get
interesting surprises.  Now I will relax this and say if there is
enough variation out there /lib should be replaced with the directory
where the shared C library lives.

> And even if we would install as root, `make install` should *not* do
> anything about /lib which is on a local disk, unlike the software which
> is installed on a file server for use by the whole network.
> 
> Not all the world is GNU/Linux. And not all the world is a stand-alone
> machine.

I don't argue that you shouldn't be able to put the shared libgcc
someplace else, but if you do you should know the tradeoffs.
Installing libgcc where libc is installed by default just works for
most people and lets other people ask why so they can find out the
tradeoff.  The tradeoff that unless they move the shared libgcc they
can't use a certain class of programs compiled with gcc.

More than that the vast majority of new unix installs have gcc as
their default C compiler.  Linux, xBSD, Mac OS X, and an assortment of
small unixes.  So even if this was only an issue on platforms where
gcc was the default compiler (it isn't) that is most of the user base.

Eric


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]