[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.
  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"
    if ./depdemo; then
      echo "Worked, as expected"
      echo "shlibpath_overrides_runpath should be set to yes"
    rm -f $objdir/lt-depdemo

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.

  $ elfdump -L depdemo/.libs/depdemo | grep RPATH

Both /opt/build/libtool-1.4.2/depdemo/l3/.libs and
/opt/build/libtool-1.4.2/tests/_inst/lib/extra contain 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 earlier in
build-relink2 so does not contain var_l3. This results
  $ .libs/depdemo
  174396:./depdemo: rld: Error: unresolvable symbol in
/opt/build/libtool-1.4.2/tests/_inst/lib/ var_l3
  174396:./depdemo: rld: Fatal Error: this executable has unresolvable

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
diff -u -3 -p -r1.166.2.32 libtool.m4
--- libtool.m4  15 Nov 2001 01:22:58 -0000
+++ 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'
       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'
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]