bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What semantics should -R have for libs? (was: testsuite: 24 25 64 failed


From: Ralf Wildenhues
Subject: What semantics should -R have for libs? (was: testsuite: 24 25 64 failed)
Date: Mon, 24 Mar 2008 21:47:40 +0100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hello Nix, all,

thanks for re-testing.  I can confirm the failure here.

The test failure on GNU/Linux, with Libtool configured --disable-static,
exposes an interesting issue.  Namely, the question what kind of
semantics '-R /some/path' should have when passed on a command line
creating a library.

Obviously there is a difference in the semantics intended by the authors
of the -R support code from those tested in runpath-in-lalib.at.

The patch below fixes ltmain to match the test, and the documentation of
-R in the manual.  However, I'm really not sure whether that's the only
way to proceed.

I think what was originally intended was something like this:
If you use -R, then either
- if you create a shared library, and hard-coding of paths is done,
  then the run path is hard-coded into that library,
- or the -R is written into the .la file in order to be used for a
  subsequent library or program.  For example, because you just create
  a static library (which cannot itself carry this run path), or because
  hard-coding into libraries is not done on this system.


What I am sure of is that having decent test suite exposure finally
helps nailing down things better.  :-)

Cheers,
Ralf

2008-03-24  Ralf Wildenhues  <address@hidden>

        Fix -R semantics to match those tested in runpath-in-lalib.at.
        * libltdl/config/ltmain.m4sh (func_mode_link): Treat -R also
        when static libraries are not built and hardcode_into_libs is
        yes.  This makes addition of -R to output.la and to subsequent
        linked libraries and programs independent of whether static
        libraries are created, and whether paths are hard-coded into
        libs.
        Report by Nix.

Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.102
diff -u -r1.102 ltmain.m4sh
--- libltdl/config/ltmain.m4sh  16 Mar 2008 08:34:25 -0000      1.102
+++ libltdl/config/ltmain.m4sh  24 Mar 2008 20:15:06 -0000
@@ -4895,10 +4895,7 @@
        fi # link shared/static library?
 
        if test "$linkmode" = lib; then
-         if test -n "$dependency_libs" &&
-            { test "$hardcode_into_libs" != yes ||
-              test "$build_old_libs" = yes ||
-              test "$link_static" = yes; }; then
+         if test -n "$dependency_libs"; then
            # Extract -R from dependency_libs
            temp_deplibs=
            for libdir in $dependency_libs; do
@@ -5478,9 +5475,7 @@
          *) finalize_rpath="$finalize_rpath $libdir" ;;
          esac
        done
-       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; 
then
-         dependency_libs="$temp_xrpath $dependency_libs"
-       fi
+       dependency_libs="$temp_xrpath $dependency_libs"
       fi
 
       # Make sure dlfiles contains only unique files that won't be dlpreopened




reply via email to

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