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


On Tue, Feb 20, 2001 at 03:27:08AM +1100, Fergus Henderson wrote:
> On 19-Feb-2001, Joseph S. Myers <jsm28@cam.ac.uk> wrote:
> > On 19 Feb 2001, Eric W. Biederman wrote:
> > 
> > > The question seems more to be the case how do you get libgcc_s.so to
> > > be installed in /lib (or at least where libc lives).  You need this
> > 
> > configure --with-slibdir=/lib
> 
> 1.  This needs to be documented prominently in the installation
>     instructions.
> 
> 2.  I don't think that is enough to solve the multiple versions problem,
>     is it?  Does that do all the usual things with symlinks and version
>     numbers when installing libgcc_s.so?
> 

glibc uses

# cd /lib
# ls -l libm.so* libm-*
-rwxr-xr-x    1 root     root       573299 Feb 13 15:08 libm-2.2.1.so
lrwxrwxrwx    1 root     root           13 Feb  2 14:22 libm.so.6 -> libm-2.2.1.so

That is the real file is libm-${version}.so and the soname is symlink:

# ln -s libm-${version}.so ${libm_soname}

Installing a new shared libm won't override the existing one since
${version} should be different. ldconfig from glibc will make sure
${libm_soname} is linked to the most recent version of the real libm.
Since the most recent version is 100% backward binary compatible with
the previous ones, all the existing binaries linked against
${libm_soname} will work fine. For the static linker, we have

# ls -l /usr/lib/libm.so
lrwxrwxrwx    1 root     root           19 Oct 19  1999 /usr/lib/libm.so -> ../../lib/libm.so.6

It is created manually once for one ${libm_soname}. I believe gcc
should do the same for shared libgcc. That is libgcc_s-$version.so
is the real file and ${libgcc_soname} should be a symlink.

-- 
H.J. Lu (hjl@valinux.com)


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