From 5c105d9f3fd086aff195d3849dcf847d6b0bd927 Mon Sep 17 00:00:00 2001 From: blogic Date: Fri, 5 Oct 2012 10:12:53 +0000 Subject: branch Attitude Adjustment git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- tools/libtool/patches/000-relocatable.patch | 96 ++++++++++++++++++ tools/libtool/patches/001-fix-func_append.patch | 22 ++++ tools/libtool/patches/100-libdir-fixes.patch | 94 +++++++++++++++++ .../110-dont-use-target-dir-for-relinking.patch | 20 ++++ .../120-strip-unsafe-dirs-for-relinking.patch | 24 +++++ tools/libtool/patches/150-trailingslash.patch | 49 +++++++++ tools/libtool/patches/200-openwrt-branding.patch | 112 +++++++++++++++++++++ 7 files changed, 417 insertions(+) create mode 100644 tools/libtool/patches/000-relocatable.patch create mode 100644 tools/libtool/patches/001-fix-func_append.patch create mode 100644 tools/libtool/patches/100-libdir-fixes.patch create mode 100644 tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch create mode 100644 tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch create mode 100644 tools/libtool/patches/150-trailingslash.patch create mode 100644 tools/libtool/patches/200-openwrt-branding.patch (limited to 'tools/libtool/patches') diff --git a/tools/libtool/patches/000-relocatable.patch b/tools/libtool/patches/000-relocatable.patch new file mode 100644 index 000000000..c36b80658 --- /dev/null +++ b/tools/libtool/patches/000-relocatable.patch @@ -0,0 +1,96 @@ +--- a/libltdl/config/general.m4sh ++++ b/libltdl/config/general.m4sh +@@ -53,7 +53,7 @@ test "${ECHO+set}" = set || ECHO=${as_ec + : ${MKDIR="mkdir"} + : ${MV="mv -f"} + : ${RM="rm -f"} +-: ${SED="@SED@"} ++test "${STAGING_DIR+set}" = set && ${SED="$STAGING_DIR/../host/bin/sed"} || ${SED="@SED@"} + : ${SHELL="${CONFIG_SHELL-/bin/sh}"} + : ${Xsed="$SED -e 1s/^X//"} + +--- a/libtoolize.in ++++ b/libtoolize.in +@@ -334,7 +334,11 @@ test "${ECHO+set}" = set || ECHO=${as_ec + : ${MKDIR="mkdir"} + : ${MV="mv -f"} + : ${RM="rm -f"} +-: ${SED="@SED@"} ++if test -n "$STAGING_DIR"; then ++ : ${SED="$STAGING_DIR/../host/bin/sed"} ++else ++ : ${SED="@SED@"} ++fi + : ${SHELL="${CONFIG_SHELL-/bin/sh}"} + : ${Xsed="$SED -e 1s/^X//"} + +@@ -2476,10 +2480,17 @@ func_check_macros () + + # Locations for important files: + prefix=@prefix@ +- datadir=@datadir@ +- pkgdatadir=@pkgdatadir@ +- pkgltdldir=@pkgdatadir@ +- aclocaldir=@aclocaldir@ ++ if test -n "$STAGING_DIR"; then ++ datadir="$STAGING_DIR/../host/share" ++ pkgdatadir="$STAGING_DIR/../host/share/libtool" ++ pkgltdldir="$STAGING_DIR/../host/share/libtool" ++ aclocaldir="$STAGING_DIR/../host/share/aclocal" ++ else ++ datadir=@datadir@ ++ pkgdatadir=@pkgdatadir@ ++ pkgltdldir=@pkgdatadir@ ++ aclocaldir=@aclocaldir@ ++ fi + auxdir= + macrodir= + configure_ac=configure.in +--- a/libtoolize.m4sh ++++ b/libtoolize.m4sh +@@ -1450,10 +1450,17 @@ func_check_macros () + + # Locations for important files: + prefix=@prefix@ +- datadir=@datadir@ +- pkgdatadir=@pkgdatadir@ +- pkgltdldir=@pkgdatadir@ +- aclocaldir=@aclocaldir@ ++ if test -n "$STAGING_DIR"; then ++ datadir="$STAGING_DIR/../host/share" ++ pkgdatadir="$STAGING_DIR/../host/share/libtool" ++ pkgltdldir="$STAGING_DIR/../host/share/libtool" ++ aclocaldir="$STAGING_DIR/../host/share/aclocal" ++ else ++ datadir=@datadir@ ++ pkgdatadir=@pkgdatadir@ ++ pkgltdldir=@pkgdatadir@ ++ aclocaldir=@aclocaldir@ ++ fi + auxdir= + macrodir= + configure_ac=configure.in +--- a/libltdl/m4/libtool.m4 ++++ b/libltdl/m4/libtool.m4 +@@ -875,9 +875,8 @@ dnl AC_DEFUN([AC_LIBTOOL_RC], []) + # ---------------- + m4_defun([_LT_TAG_COMPILER], + [AC_REQUIRE([AC_PROG_CC])dnl +- + _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl ++_LT_DECL([LTCFLAGS], [CFLAGS], ["-O2 -I\${STAGING_DIR:-$STAGING_DIR}/../host/include"], [LTCC compiler flags])dnl + _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl + _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +@@ -7544,9 +7543,8 @@ AC_SUBST([DLLTOOL]) + # as few characters as possible. Prefer GNU sed if found. + m4_defun([_LT_DECL_SED], + [AC_PROG_SED +-test -z "$SED" && SED=sed + Xsed="$SED -e 1s/^X//" +-_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) ++_LT_DECL([], [SED], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/sed"], [A sed program that does not truncate output]) + _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) + ])# _LT_DECL_SED diff --git a/tools/libtool/patches/001-fix-func_append.patch b/tools/libtool/patches/001-fix-func_append.patch new file mode 100644 index 000000000..4c3c07b77 --- /dev/null +++ b/tools/libtool/patches/001-fix-func_append.patch @@ -0,0 +1,22 @@ +--- a/libltdl/config/ltmain.m4sh ++++ b/libltdl/config/ltmain.m4sh +@@ -7261,7 +7261,7 @@ EOF + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; +- *) func_apped perm_rpath " $libdir" ;; ++ *) func_append perm_rpath " $libdir" ;; + esac + fi + done +--- a/libltdl/config/ltmain.sh ++++ b/libltdl/config/ltmain.sh +@@ -8050,7 +8050,7 @@ EOF + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; +- *) func_apped perm_rpath " $libdir" ;; ++ *) func_append perm_rpath " $libdir" ;; + esac + fi + done diff --git a/tools/libtool/patches/100-libdir-fixes.patch b/tools/libtool/patches/100-libdir-fixes.patch new file mode 100644 index 000000000..d4e6f785c --- /dev/null +++ b/tools/libtool/patches/100-libdir-fixes.patch @@ -0,0 +1,94 @@ +--- a/libltdl/config/ltmain.m4sh ++++ b/libltdl/config/ltmain.m4sh +@@ -5715,8 +5715,14 @@ func_mode_link () + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$lt_sysroot$libdir" +- absdir="$lt_sysroot$libdir" ++ # Adding 'libdir' from the .la file to our library search paths ++ # breaks crosscompilation horribly. We cheat here and don't add ++ # it, instead adding the path where we found the .la. -CL ++ dir="$lt_sysroot$abs_ladir" ++ absdir="$abs_ladir" ++ libdir="$abs_ladir" ++ #dir="$libdir" ++ #absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else +@@ -6114,8 +6120,6 @@ func_mode_link () + add="$libdir/$linklib" + fi + else +- # We cannot seem to hardcode it, guess we'll fake it. +- add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in +@@ -6270,7 +6274,17 @@ func_mode_link () + fi + ;; + *) +- path="-L$absdir/$objdir" ++ # OE sets installed=no in staging. We need to look in $objdir and $absdir, ++ # preferring $objdir. RP 31/04/2008 ++ if test -f "$absdir/$objdir/$depdepl" ; then ++ depdepl="$absdir/$objdir/$depdepl" ++ path="-L$absdir/$objdir" ++ elif test -f "$absdir/$depdepl" ; then ++ depdepl="$absdir/$depdepl" ++ path="-L$absdir" ++ else ++ path="-L$absdir/$objdir" ++ fi + ;; + esac + else +--- a/libltdl/config/ltmain.sh ++++ b/libltdl/config/ltmain.sh +@@ -6504,8 +6504,14 @@ func_mode_link () + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$lt_sysroot$libdir" +- absdir="$lt_sysroot$libdir" ++ # Adding 'libdir' from the .la file to our library search paths ++ # breaks crosscompilation horribly. We cheat here and don't add ++ # it, instead adding the path where we found the .la. -CL ++ dir="$lt_sysroot$abs_ladir" ++ absdir="$abs_ladir" ++ libdir="$abs_ladir" ++ #dir="$libdir" ++ #absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else +@@ -6903,8 +6909,6 @@ func_mode_link () + add="$libdir/$linklib" + fi + else +- # We cannot seem to hardcode it, guess we'll fake it. +- add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in +@@ -7059,7 +7063,17 @@ func_mode_link () + fi + ;; + *) +- path="-L$absdir/$objdir" ++ # OE sets installed=no in staging. We need to look in $objdir and $absdir, ++ # preferring $objdir. RP 31/04/2008 ++ if test -f "$absdir/$objdir/$depdepl" ; then ++ depdepl="$absdir/$objdir/$depdepl" ++ path="-L$absdir/$objdir" ++ elif test -f "$absdir/$depdepl" ; then ++ depdepl="$absdir/$depdepl" ++ path="-L$absdir" ++ else ++ path="-L$absdir/$objdir" ++ fi + ;; + esac + else diff --git a/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch b/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch new file mode 100644 index 000000000..c78058934 --- /dev/null +++ b/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch @@ -0,0 +1,20 @@ +--- a/libltdl/config/ltmain.m4sh ++++ b/libltdl/config/ltmain.m4sh +@@ -6104,7 +6104,6 @@ func_mode_link () + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then +- add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in +--- a/libltdl/config/ltmain.sh ++++ b/libltdl/config/ltmain.sh +@@ -6893,7 +6893,6 @@ func_mode_link () + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then +- add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in diff --git a/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch b/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch new file mode 100644 index 000000000..1c3df4c00 --- /dev/null +++ b/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch @@ -0,0 +1,24 @@ +--- a/libltdl/config/ltmain.m4sh ++++ b/libltdl/config/ltmain.m4sh +@@ -2183,6 +2183,9 @@ func_mode_install () + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + ++ relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"` ++ relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"` ++ + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' +--- a/libltdl/config/ltmain.sh ++++ b/libltdl/config/ltmain.sh +@@ -2972,6 +2972,9 @@ func_mode_install () + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + ++ relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"` ++ relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"` ++ + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' diff --git a/tools/libtool/patches/150-trailingslash.patch b/tools/libtool/patches/150-trailingslash.patch new file mode 100644 index 000000000..a01f9be77 --- /dev/null +++ b/tools/libtool/patches/150-trailingslash.patch @@ -0,0 +1,49 @@ +A command like /bin/sh ../../i586-poky-linux-libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la '/media/data1/builds/poky1/tmp/work/core2-poky-linux/gnome-keyring-2.26.1-r1/image/usr/lib/gnome-keyring/standalone/' fails (e.g. gnome-keyring or pulseaudio) + +This is because libdir has a trailing slash which breaks the comparision. + +RP 2/1/10 + +Merged a patch received from Gary Thomas + +Date: 2010/07/12 +Nitin A Kamble + +--- a/libltdl/config/ltmain.m4sh ++++ b/libltdl/config/ltmain.m4sh +@@ -2164,8 +2164,15 @@ func_mode_install () + func_append dir "$objdir" + + if test -n "$relink_command"; then ++ # Strip any trailing slash from the destination. ++ func_stripname '' '/' "$libdir" ++ destlibdir=$func_stripname_result ++ ++ func_stripname '' '/' "$destdir" ++ s_destdir=$func_stripname_result ++ + # Determine the prefix the user has applied to our future dir. +- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` ++ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that +--- a/libltdl/config/ltmain.sh ++++ b/libltdl/config/ltmain.sh +@@ -2953,8 +2953,15 @@ func_mode_install () + func_append dir "$objdir" + + if test -n "$relink_command"; then ++ # Strip any trailing slash from the destination. ++ func_stripname '' '/' "$libdir" ++ destlibdir=$func_stripname_result ++ ++ func_stripname '' '/' "$destdir" ++ s_destdir=$func_stripname_result ++ + # Determine the prefix the user has applied to our future dir. +- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` ++ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that diff --git a/tools/libtool/patches/200-openwrt-branding.patch b/tools/libtool/patches/200-openwrt-branding.patch new file mode 100644 index 000000000..56ea8bf21 --- /dev/null +++ b/tools/libtool/patches/200-openwrt-branding.patch @@ -0,0 +1,112 @@ +--- a/libltdl/config/general.m4sh ++++ b/libltdl/config/general.m4sh +@@ -352,7 +352,7 @@ opt_warning=: + # name if it has been set yet. + func_echo () + { +- $ECHO "$progname: ${opt_mode+$opt_mode: }$*" ++ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }$*" + } + + # func_verbose arg... +@@ -378,14 +378,14 @@ func_echo_all () + # Echo program name prefixed message to standard error. + func_error () + { +- $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 ++ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 + } + + # func_warning arg... + # Echo program name prefixed warning message to standard error. + func_warning () + { +- $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 ++ $opt_warning && $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +--- a/libltdl/config/ltmain.sh ++++ b/libltdl/config/ltmain.sh +@@ -443,7 +443,7 @@ opt_warning=: + # name if it has been set yet. + func_echo () + { +- $ECHO "$progname: ${opt_mode+$opt_mode: }$*" ++ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }$*" + } + + # func_verbose arg... +@@ -469,14 +469,14 @@ func_echo_all () + # Echo program name prefixed message to standard error. + func_error () + { +- $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 ++ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 + } + + # func_warning arg... + # Echo program name prefixed warning message to standard error. + func_warning () + { +- $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 ++ $opt_warning && $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +--- a/libtoolize.in ++++ b/libtoolize.in +@@ -637,7 +637,7 @@ opt_warning=: + # name if it has been set yet. + func_echo () + { +- $ECHO "$progname: ${opt_mode+$opt_mode: }$*" ++ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }$*" + } + + # func_verbose arg... +@@ -663,14 +663,14 @@ func_echo_all () + # Echo program name prefixed message to standard error. + func_error () + { +- $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 ++ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 + } + + # func_warning arg... + # Echo program name prefixed warning message to standard error. + func_warning () + { +- $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 ++ $opt_warning && $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +--- a/tests/defs.in ++++ b/tests/defs.in +@@ -588,7 +588,7 @@ opt_warning=: + # name if it has been set yet. + func_echo () + { +- $ECHO "$progname: ${opt_mode+$opt_mode: }$*" ++ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }$*" + } + + # func_verbose arg... +@@ -614,14 +614,14 @@ func_echo_all () + # Echo program name prefixed message to standard error. + func_error () + { +- $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 ++ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 + } + + # func_warning arg... + # Echo program name prefixed warning message to standard error. + func_warning () + { +- $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 ++ $opt_warning && $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : -- cgit v1.2.3