This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 3.4 PATCH: Fully support GNU linker in libtool on IRIX 5/6
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 Sep 2003 22:33:07 +0200 (MEST)
- Subject: Re: 3.4 PATCH: Fully support GNU linker in libtool on IRIX 5/6
- References: <16177.22188.675672.439616@xayide.TechFak.Uni-Bielefeld.DE><orznimy3lm.fsf@free.redhat.lsd.ic.unicamp.br>
Alexandre Oliva writes:
> On Aug 6, 2003, Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> wrote:
>
> > Ok for mainline?
>
> Only if an equivalent patch is already in libtool CVS. It's odd, I
> thought I'd already fixed these problems. I could build libstdc++
> with GNU ld at some point...
>
> /me looks at the code.
>
> At least in ltcf-c.sh and ltcf-gcj.sh, you're adding tests for
> with_gnu_ld = no in the branches that are used only for non-GNU ld.
> There are two huge case $os statements, one for GNU ld, one for
> non-GNU ld. So your change has no effect in these files.
Ok. I already wondered why e.g. libg2c.so built without my patch. Still
this difference between the different languages seems quite confusing (as
is most of libtool ;-).
> As for ltcf-cxx.sh, you've got an actual bug fix. Please post the
> corresponding patch to libtool CVS and, when it's checked in there,
> install your patch here as well. Thanks,
I tried to reproduce this with CVS libtool on IRIX 6.5 with gcc configured
to use gas and gld, but failed: prefixing -soname and $soname with ${wl}
already is in CVS libtool, and I didn't get a failure due to an attempt to
pass -set_version to GNU ld, either.
Looking a bit further, I found what seems to be wrong in GCC CVS:
While ltconfig sets version_type differently with and without GNU ld, it
immediately overrides this with version_type=irix, completely unlike CVS
libtool. I'm pretty sure this fixes the problem, but will re-bootstrap on
mips-sgi-irix6.5 with gas and gld to verify this.
Ok for mainline if it passes?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Tue Sep 23 20:32:19 2003 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* ltcf-cxx.sh (irix5*, irix6*): Prefix -soname and its arg with ${wl}.
* ltconfig (irix5*, irix6*): Don't override version_type.
Index: ltcf-cxx.sh
===================================================================
RCS file: /cvs/gcc/gcc/ltcf-cxx.sh,v
retrieving revision 1.25
diff -u -p -r1.25 ltcf-cxx.sh
--- ltcf-cxx.sh 20 Feb 2003 01:11:51 -0000 1.25
+++ ltcf-cxx.sh 23 Sep 2003 20:29:19 -0000
@@ -326,7 +326,7 @@ case $host_os in
if test "$with_gnu_ld" = no; then
archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
else
- archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
+ archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
fi
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
Index: ltconfig
===================================================================
RCS file: /cvs/gcc/gcc/ltconfig,v
retrieving revision 1.26
diff -u -p -r1.26 ltconfig
--- ltconfig 20 Feb 2003 02:09:45 -0000 1.26
+++ ltconfig 23 Sep 2003 20:29:19 -0000
@@ -1191,7 +1191,6 @@ irix5* | irix6*)
else
version_type=irix
fi
- version_type=irix
need_lib_prefix=no
need_version=no
soname_spec='${libname}${release}.so$major'