[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 7/8] handle sysrooted paths when reading dependencies to la f
From: |
Paolo Bonzini |
Subject: |
[RFC PATCH 7/8] handle sysrooted paths when reading dependencies to la files |
Date: |
Thu, 22 Jul 2010 20:36:29 +0200 |
---
libltdl/config/ltmain.m4sh | 18 ++++++++++++++----
tests/sysroot.at | 6 ++++++
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 4251bb3..1a8041f 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -1282,6 +1282,9 @@ func_mode_execute ()
dir=
case $file in
*.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
# Check to see that this really is a libtool archive.
func_lalib_unsafe_p "$file" \
|| func_fatal_help "\`$lib' is not a valid libtool archive"
@@ -1634,6 +1637,9 @@ func_mode_install ()
;;
*.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
# Check to see that this really is a libtool archive.
func_lalib_unsafe_p "$file" \
|| func_fatal_help "\`$file' is not a valid libtool archive"
@@ -4498,16 +4504,17 @@ func_mode_link ()
*.la)
# A libtool-controlled library.
+ func_resolve_sysroot "$arg"
if test "$prev" = dlfiles; then
# This library was specified with -dlopen.
- dlfiles="$dlfiles $arg"
+ dlfiles="$dlfiles $func_resolve_sysroot_result"
prev=
elif test "$prev" = dlprefiles; then
# The library was specified with -dlpreopen.
- dlprefiles="$dlprefiles $arg"
+ dlprefiles="$dlprefiles $func_resolve_sysroot_result"
prev=
else
- deplibs="$deplibs $arg"
+ deplibs="$deplibs $func_resolve_sysroot_result"
fi
continue
;;
@@ -4833,7 +4840,10 @@ func_mode_link ()
deplibs="$deplib $deplibs"
continue
;;
- *.la) lib="$deplib" ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
*.$libext)
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
diff --git a/tests/sysroot.at b/tests/sysroot.at
index 5fabc25..896f6e8 100644
--- a/tests/sysroot.at
+++ b/tests/sysroot.at
@@ -175,6 +175,12 @@ LT_AT_BOOTSTRAP([], [-I $abs_top_srcdir/libltdl/m4],
[ignore],
AT_CHECK([$MAKE install DESTDIR=$sysroot], [0], [ignore], [ignore])
AT_CHECK([test -f $sysroot/$prefix/bin/prog$EXEEXT])
AT_CHECK([grep -F "$sysroot" "$sysroot/$prefix/bin/prog$EXEEXT"], [1])
+
+# missing tests
+# 1) pass absolute .la files
+# 2) pass absolute -L
+# 2) pass relative .la files
+
cd ..
AT_CLEANUP
])
--
1.7.1
- [RFC PATCH 0/8] sysroot support, Paolo Bonzini, 2010/07/22
- [RFC PATCH 1/8] handle sysroot flags, Paolo Bonzini, 2010/07/22
- [RFC PATCH 2/8] fix buglet, Paolo Bonzini, 2010/07/22
- [RFC PATCH 3/8] provide shell functions to configure, Paolo Bonzini, 2010/07/22
- [RFC PATCH 4/8] Add --with-sysroot, Paolo Bonzini, 2010/07/22
- [RFC PATCH 5/8] add a basic sysroot test, Paolo Bonzini, 2010/07/22
- [RFC PATCH 6/8] teach libtool -L= and -R=, Paolo Bonzini, 2010/07/22
- [RFC PATCH 7/8] handle sysrooted paths when reading dependencies to la files,
Paolo Bonzini <=
- [RFC PATCH 8/8] emit sysrooted paths when installing .la files, Paolo Bonzini, 2010/07/22
- Re: [RFC PATCH 0/8] sysroot support, Charles Wilson, 2010/07/23