libtool
[Top][All Lists]
Advanced

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

Re: mode=link and full path to dependent shared library?


From: Albert Chin
Subject: Re: mode=link and full path to dependent shared library?
Date: Mon, 10 Oct 2005 12:01:00 -0500
User-agent: Mutt/1.5.6i

On Thu, Oct 06, 2005 at 05:46:48PM -0500, Tim Mooney wrote:
> 
> Can someone point me to the place in the docs that explains libtool's
> handling of --mode=link when a dependent shared library is specified by
> full path?  I'm having trouble finding it.
> 
> I'm talking about a situation like this:
> 
> /bin/sh ./libtool --tag=CXX --mode=link cxx  -some_compiler_flags -o 
> libfoo.la -rpath /path/to/lib -version-info 16:3:1 -no-undefined foo.lo 
> bar.lo baz.lo /path/to/lib/libdep.so -llib2 -lc -rpath /path/to/lib
> 
> 
> libtool should be creating libfoo.la (and both shared and archive libfoo
> libraries) and should be linking against /path/to/lib/libdep.so, but it's
> eliding the /path/to/lib/libdep.so from the shared library creation line.
> I'm just trying to find where this behavior is discussed, so I can
> understand why it's doing that.

Does the below fix it for you?

-- 
albert chin (address@hidden)

-- snip snip
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.69
diff -u -3 -p -r1.334.2.69 ltmain.in
--- ltmain.in   4 May 2005 13:52:10 -0000       1.334.2.69
+++ ltmain.in   10 Oct 2005 16:59:04 -0000
@@ -1821,6 +1881,12 @@ EOF
        continue
        ;;
 
+      *$std_shrext)
+       # A shared library.
+       deplibs="$deplibs $arg"
+       continue
+       ;;
+
       *.la)
        # A libtool-controlled library.
 
@@ -2188,6 +2275,31 @@ EOF
          fi
          continue
          ;;
+       *$std_shrext)
+         case $linkmode in
+         lib)
+           deplibs="$deplib $deplibs"
+           test "$pass" = conv && continue
+           newdependency_libs="$deplib $newdependency_libs"
+           ;;
+         prog)
+           if test "$pass" = conv; then
+             deplibs="$deplib $deplibs"
+             continue
+           fi
+           if test "$pass" = scan; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           ;;
+         *)
+           $echo "$modename: warning: shared libraries ignored for 
archives/objects" 1>&2
+           ;;
+         esac # linkmode
+         continue
+         ;;
        %DEPLIBS%)
          alldeplibs=yes
          continue




reply via email to

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