Patrick Welche wrote:
> 
> As some of the depdemo tests are failing for me under NetBSD-1.5B/i386, I
> just tried running
> 
> depdemo-shared.test
> depdemo-make.test
> depdemo-exec.test
> 
> I don't understand the last part of the output from depdemo-make.test:
> 
> /bin/sh ./libtool --mode=link gcc  -g -O2   -o depdemo.static  main.o
>   ./l1/libl1.la ./l2/libl2.la  ./l4/libl4.la
> gcc -g -O2 -o .libs/depdemo.static main.o  ./l1/.libs/libl1.so
>   ./l2/.libs/libl2.so ./l4/.libs/libl4.so
>   /usr/local/src/libtool/depdemo/l3/.libs/libl3.so
>   /usr/local/src/libtool/depdemo/l2/.libs/libl2.so
>   /usr/local/src/libtool/depdemo/l1/.libs/libl1.so -lm
>   -Wl,--rpath -Wl,/usr/local/src/libtool/tests/_inst/lib
>   -Wl,--rpath -Wl,/usr/local/src/libtool/tests/_inst/lib/extra
> 
> ...
> === Running depdemo-exec.test
> Executing uninstalled programs in ../depdemo
> Shared object "libl1.so.0" not found
> 
> Something seems strange about the test: as depdemo is not installed, the
> directory defined with --rpath doesn't exist, so how can libl1.so.0 possibly
> be found? (Also why do I see -o depdemo.static when I ran
> depdemo-shared.test?)

I don't (yet) understand the logic here, but the attached patch fixes
all the tests for the head branch for NetBSD-current (on i386 at least).
I'm still trying to understand why this works and if its definitely the
way to go.

Using hardcode_into_libs=all seems to work for a.out i386 as well.

Nick

> 
> Hmm yet depdemo has a relink_command which does include
>   -Wl,--rpath -Wl,/usr/local/src/libtool/depdemo/l1/.libs
> etc. which does contain libl1.so.0.
> 
> OK - help! What is happening?
> 
> Cheers,
> 
> Patrick
Index: ltconfig.in
===================================================================
RCS file: /home/cvs/libtool/ltconfig.in,v
retrieving revision 1.268
diff -u -5 -r1.268 ltconfig.in
--- ltconfig.in 2000/05/30 00:37:48     1.268
+++ ltconfig.in 2000/07/06 21:24:12
@@ -1690,10 +1690,11 @@
     dynamic_linker='NetBSD (a.out) ld.so'
   else
     library_names_spec='${libname}${release}.so$versuffix 
${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
     soname_spec='${libname}${release}.so$major'
     dynamic_linker='NetBSD ld.elf_so'
+    hardcode_into_libs=all
   fi
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
 openbsd*)
Index: ltmain.in
===================================================================
RCS file: /home/cvs/libtool/ltmain.in,v
retrieving revision 1.221
diff -u -5 -r1.221 ltmain.in
--- ltmain.in   2000/05/29 10:42:50     1.221
+++ ltmain.in   2000/07/06 21:24:31
@@ -1890,11 +1890,11 @@
            if test $linkmode = prog; then
              test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
              test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
            else
              test -n "$add_dir" && deplibs="$add_dir $deplibs"
-             test -n "$add" && deplibs="$add deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
            fi
          fi
        elif test $linkmode = prog; then
          # Here we assume that one of hardcode_direct or hardcode_minus_L
          # is not unsupported.  This is valid on all known static and

Reply via email to