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: PATCH: Handle the shared libgcc is a system library


On Jul  1, 2001, "H . J . Lu" <hjl@lucon.org> wrote:

> On Sun, Jul 01, 2001 at 12:33:57PM -0700, Daniel Jacobowitz wrote:
>> Some comments....
>> 
>> > +  if test "$build" = "$target"; then
>> 
>> $build = $target is not the right test.  I've built cross compilers
>> where $build = $target != $host.  Sure, it's perverse, but that's life,
>> and that's supported.

> A few lines above, there is

> elif test "$host" != "$target"; then
>   slibdir='$(build_tooldir)/lib'
> else
>   slibdir='$(libdir)'
>   if test "$build" = "$target"; then

> At this point, $host = $target. When $build = $target != $host, you
> are building a cross compiler, slibdir is set to $(build_tooldir)/lib.

Would you please add a comment explaining the dependence on the code
above and the inferences you're making?  This could help the next
person who chooses to modify that chunk of code get the whole
picture.

> SONAME only exists in ELF. the gcc developers have promised that
> libgcc_s.so.1 will be here to stay. If there is a libgcc_s.so.2,
> we may have a bigger problem than where libgcc_s.so.2 should be
> installed.

Indeed.

> I don't think many people will do

> # make install

> for a canadian cross build. The possible usage is

I'll concede that I'm not a typical user, but I often do it.

> # make install prefix=/var/tmp/gcc
> # rm -f /var/tmp/gcc/lib/libgcc_s.so
> # ln -s ../../lib/libgcc_s.so.1 /var/tmp/gcc/usr/lib/libgcc_s.so

How about creating the .so link only inside GCC's internal gcc-lib
sub-directory, but having the SONAME file installed in lib?

> Why? It only gets installed in $(libsubdir) if there is a system
> shared libgcc.

I fail to see the point of making this distinction.

Isn't your argument that having more than one copy of libgcc_s.so.1
can get the whole system unstable?  How does moving it change this
fact?  There will still be one more copy, and users are likely to add
GCC's internal library search path to ld.so.conf as well.  For one,
that's where the libobjc libraries are installed.  For another, that's
what they're going to do to make sure they're using the newer copy of
libgcc_s.so.1, or just because they had to do it on other OSs that
don't have libgcc_s.so.1 in /lib.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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