[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool 1.4 branch and IRIX 6.x
From: |
Albert Chin |
Subject: |
libtool 1.4 branch and IRIX 6.x |
Date: |
Mon, 28 Jan 2002 11:51:47 -0600 |
User-agent: |
Mutt/1.2.5i |
When using CC=cc on IRIX 6.x, ld is used to create shared libraries.
However:
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
This causes -Wl,-rpath to be passed to ld. Unfortunately, ld
recognizes -rpath but not -Wl so we get errors like:
(null): WARNING 1 : Unknown option: Wl,-rpath (ignored).
So, the solution would seem to be the patch below. However, after
applying this patch and running 'make check', build-relink2 dies at
the end:
if test "$shlibpath_overrides_runpath" != yes; then
rm -f $objdir/lt-depdemo || exit 1
cp $objdir/depdemo $objdir/lt-depdemo || exit 1
echo "running ../depdemo/depdemo with installed libl3.la"
if ./depdemo; then
echo "Worked, as expected"
else
echo "shlibpath_overrides_runpath should be set to yes"
status=1
fi
rm -f $objdir/lt-depdemo
fi
For IRIX 6.x:
shlibpath_overrides_runpath = no
because, according to rld(5):
The search path for shared objects is as follows:
1. The path of the shared object, if specified in the liblist. That
is, if the soname of the shared object has a path. For more
information, see the ld(1) man page.
2. DT_RPATH, if it is defined in the executable or any DSO that rld
has opened.
3. Use LD_LIBRARY_PATH, if it is defined in the environment at the
time of execution.
4. The default library search path.
However:
$ elfdump -L depdemo/.libs/depdemo | grep RPATH
/opt/build/libtool-1.4.2/depdemo/l1/.libs:/opt/build/libtool-1.4.2/tests/_inst/lib:/opt/build/libtool-1.4.2/depdemo/l2/.libs:/opt/build/libtool-1.4.2/depdemo/l3/.libs:/opt/build/libtool-1.4.2/tests/_inst/lib/extra
Both /opt/build/libtool-1.4.2/depdemo/l3/.libs and
/opt/build/libtool-1.4.2/tests/_inst/lib/extra contain libl3.so.1.0 so
the version in /opt/build/libtool-1.4.2/depdemo/l3/.libs is selected
as it is first in the search path. However, before the
shlibpath_overrides_runpath test, we broke libl3.so.1.0 earlier in
build-relink2 so libl3.so.1.0 does not contain var_l3. This results
in:
$ .libs/depdemo
174396:./depdemo: rld: Error: unresolvable symbol in
/opt/build/libtool-1.4.2/tests/_inst/lib/libl4.so.1: var_l3
174396:./depdemo: rld: Fatal Error: this executable has unresolvable
symbols
causing the test to fail. So, is build-relink2.test broken?
--
albert chin (address@hidden)
-- snip snip
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.166.2.32
diff -u -3 -p -r1.166.2.32 libtool.m4
--- libtool.m4 15 Nov 2001 01:22:58 -0000 1.166.2.32
+++ libtool.m4 28 Jan 2002 17:37:35 -0000
@@ -1636,10 +1636,11 @@ else
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname
${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring`
${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname
$soname `test -n "$verstring" && echo -set_version $verstring` -update_registry
${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='-rpath $libdir'
fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
link_all_deplibs=yes
;;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- libtool 1.4 branch and IRIX 6.x,
Albert Chin <=