On 7/31/2010 7:52 AM, Paolo Bonzini wrote:
> On 07/30/2010 08:55 PM, Charles Wilson wrote:
>> Since the bug is cross-platform, it should be easy(er) to fix for you
>> non-cygwin types. Any ideas, Paolo?
>
> Not tested yet, but I am pretty sure this should do it:
Good news and bad news.
The good:
linux->mingw cross: tests 117-119 pass
cygwin->mingw cross: ditto
linux native: test new:41 now passes.
cygwin native: test new:41 now passes (as does new:101, and
old:tagdemo-conf+old:tagdemo-make).
So, all of the problems reported earlier are now solved. However...
I then did a complete (native) test run on linux, using libtool from
before this series (*) and after. In both cases all of the old tests
passed. However, the new testsuite, not so much:
- 37: Link order test ok
- 38: Link order of deplibs ok
+ 37: Link order test FAILED (link-order.at:87)
+ 38: Link order of deplibs FAILED (link-order2.at:123)
I expect similar behavior on cygwin native (the "after" test run has not
yet completed, but it did fail #37 and #38). I reply to this post
confirming those results when it gets finished.
(*) This series == all nine of Paolo's v3 patches, plus the attached.
>From the failing #37 testsuite.log:
rel/path/to/tests/link-order.at:87: $LIBTOOL --mode=install cp
src/liba.la $prefix/lib/liba.la
stderr:
libtool: install:
`/abs/path/to/libtool/_build/tests/testsuite.dir/037/src/liba.la' is not
a valid libtool archive
>From the failing #38 testsuite.log:
libtool: link: ( cd ".libs" && rm -f "liba1.la" && ln -s "../liba1.la"
"liba1.la" )
/abs/path/to/libtool/_build/libtool: line 1788: cd: -/: invalid option
cd: usage: cd [-L|-P] [dir]
libtool: link: cannot determine absolute directory name of
`-L/abs/path/to/libtool/_build/tests/testsuite.dir/038'
../../libtool-2.2.11a/tests/link-order2.at:123: $LIBTOOL --mode=link $CC
$CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0
stderr:
libtool: link: cannot find the library
`/abs/path/to/libtool/_build/tests/testsuite.dir/038/libb.la' or
unhandled argument
`/abs/path/to/libtool/_build/tests/testsuite.dir/038/libb.la'
stdout:
../../libtool-2.2.11a/tests/link-order2.at:123: exit code was 1, expected 0
38. link-order2.at:46: 38. Link order of deplibs (link-order2.at:46):
FAILED (link-order2.at:123)
1786 else
1787 func_dirname_and_basename "$1" "" "."
1788 absdir=`cd "$func_dirname_result" && pwd`
1789 test -z "$absdir" && \
1790 func_fatal_error "cannot determine absolute directory name
of \`$func_dirname_result'"
1791 func_resolve_sysroot_result="$absdir/$func_basename_result"
1792 fi
1793 ;;
So apparentely "$func_dirname_result" in line 1788 has the value "-/". Odd.
--
Chuck
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index b0b0ebc..945248a 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -8066,12 +8066,12 @@ EOF
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
;;
-L*)
- func_stripname -L '' "$i"
+ func_stripname -L '' "$deplib"
func_replace_sysroot "$func_stripname_result"
func_append newdependency_libs " -L$func_replace_sysroot_result"
;;
-R*)
- func_stripname -R '' "$i"
+ func_stripname -R '' "$deplib"
func_replace_sysroot "$func_stripname_result"
func_append newdependency_libs " -R$func_replace_sysroot_result"
;;
diff --git a/tests/runpath-in-lalib.at b/tests/runpath-in-lalib.at
index f7667f2..5dc1332 100644
--- a/tests/runpath-in-lalib.at
+++ b/tests/runpath-in-lalib.at
@@ -48,9 +48,9 @@ for file in a.c b.c; do
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
done
$CC $CPPFLAGS $CFLAGS -c m.c
-AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir -R$addrunpath],
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -no-undefined -rpath $libdir -R$addrunpath],
[], [ignore], [ignore])
-AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la],
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -no-undefined -rpath $libdir liba.la],
[], [ignore], [ignore])
AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT libb.la],
[], [ignore], [ignore])