libtool: Make sure ltmain.sh gets regenerated by libtool-cross, fix nmedit paths, fix library search paths for installed=no binaries particuarly on darwin but applies to other archs too

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3274 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie 2007-11-30 08:25:30 +00:00
parent f0ff6c7854
commit cc5a871123
4 changed files with 132 additions and 3 deletions

View File

@ -0,0 +1,64 @@
OE changes to installed=no which means we can't run the original test
and just look in $objdir. We therefore look in both, preferring
$objdir if it exists - RP 29/11/2007
--- libtool-1.5.10/ltmain.in.orig
+++ libtool-1.5.10/ltmain.in
@@ -3105,8 +3105,11 @@
fi
;;
esac
- if grep "^installed=no" $deplib > /dev/null; then
- path="$absdir/$objdir"
+# OE changes to installed=no which means we can't run the original test
+# and just look in $objdir. We therefore look in both, preferring
+# $objdir if it exists, see below. - RP 29/11/2007
+# if grep "^installed=no" $deplib > /dev/null; then
+# path="$absdir/$objdir"
# This interferes with crosscompilation. -CL
# else
# eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
@@ -3117,7 +3120,7 @@
# if test "$absdir" != "$libdir"; then
# $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
# fi
- else
+ if ! grep "^installed=no" $deplib > /dev/null; then
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
@@ -3138,9 +3141,17 @@
for tmp in $deplibrary_names ; do
depdepl=$tmp
done
- if test -f "$path/$depdepl" ; then
- depdepl="$path/$depdepl"
+
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ path="$absdir/$objdir"
+ elif test -f "$absdir/$depdepl" ; then
+ depdepl="$absdir/$depdepl"
+ path="$absdir"
+ else
+ path="$absdir/$objdir"
fi
+
# do not add paths which are already there
case " $newlib_search_path " in
*" $path "*) ;;
@@ -3150,7 +3161,13 @@
path=""
;;
*)
- path="-L$path"
+ if test -d "$absdir/$objdir" ; then
+ path="-L$absdir/$objdir"
+ elif test -d "$absdir" ; then
+ path="-L$absdir"
+ else
+ path="-L$absdir/$objdir"
+ fi
;;
esac
;;

View File

@ -0,0 +1,56 @@
Fix so instead of calling "nmedit" it gets prefixed with the host triplet.
RP - 30/11/2007
Index: libtool-1.5.10/libtool.m4
===================================================================
--- libtool-1.5.10.orig/libtool.m4 2007-11-29 19:27:31.000000000 +0000
+++ libtool-1.5.10/libtool.m4 2007-11-29 19:29:09.000000000 +0000
@@ -2927,11 +2927,11 @@
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~$host-nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~$host-nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
fi
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~$host-nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
case "$cc_basename" in
xlc*)
@@ -2939,8 +2939,8 @@
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~$host-nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~$host-nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
_LT_AC_TAGVAR(ld_shlibs, $1)=no
@@ -5474,8 +5474,8 @@
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~$host-nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~$host-nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
case "$cc_basename" in
xlc*)
@@ -5483,8 +5483,8 @@
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~$host-nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~$host-nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
_LT_AC_TAGVAR(ld_shlibs, $1)=no

View File

@ -1,13 +1,15 @@
SECTION = "devel"
require libtool_${PV}.bb
PR = "r8"
PR = "r9"
PACKAGES = ""
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libtool-${PV}"
SRC_URI_append = " file://libdir-la.patch;patch=1 \
file://libdir-la2.patch;patch=1 \
file://prefix.patch;patch=1 \
file://tag.patch;patch=1 \
file://install-path-check.patch;patch=1 \
file://nmedit_fix.patch;patch=1 \
file://nousrlib.patch;patch=1"
S = "${WORKDIR}/libtool-${PV}"
@ -17,7 +19,13 @@ exec_prefix = "${STAGING_DIR_NATIVE}${layout_exec_prefix}"
bindir = "${STAGING_BINDIR_NATIVE}"
do_compile () {
:
rm -f ltmain.shT
date=`/bin/sh ./mkstamp < ./ChangeLog` && \
sed -e 's/@''PACKAGE@/libtool/' -e 's/@''VERSION@/1.5.10/' \
-e "s%@""TIMESTAMP@%$date%" ./ltmain.in > ltmain.shT
mv -f ltmain.shT ltmain.sh || \
(rm -f ltmain.sh && cp ltmain.shT ltmain.sh && rm -f ltmain.shT)
cp ltmain.sh ./libltdl/
}
do_stage () {

View File

@ -1,9 +1,10 @@
SECTION = "devel"
require libtool_${PV}.bb
PR = "r8"
PR = "r9"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libtool-${PV}"
SRC_URI_append = " file://libdir-la.patch;patch=1 \
file://libdir-la2.patch;patch=1 \
file://prefix.patch;patch=1 \
file://tag.patch;patch=1 \
file://install-path-check.patch;patch=1 \