summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/libtool
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/libtool')
-rw-r--r--meta/recipes-devtools/libtool/libtool-2.4.2.inc51
-rw-r--r--meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb43
-rw-r--r--meta/recipes-devtools/libtool/libtool-native_2.4.2.bb25
-rw-r--r--meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch39
-rw-r--r--meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch24
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch38
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch41
-rw-r--r--meta/recipes-devtools/libtool/libtool/fix-rpath.patch63
-rw-r--r--meta/recipes-devtools/libtool/libtool/fixinstall.patch101
-rw-r--r--meta/recipes-devtools/libtool/libtool/norm-rpath.patch36
-rw-r--r--meta/recipes-devtools/libtool/libtool/prefix.patch111
-rw-r--r--meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch166
-rw-r--r--meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch53
-rw-r--r--meta/recipes-devtools/libtool/libtool/trailingslash.patch34
-rw-r--r--meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch22
-rw-r--r--meta/recipes-devtools/libtool/libtool_2.4.2.bb15
-rw-r--r--meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb35
17 files changed, 897 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libtool/libtool-2.4.2.inc b/meta/recipes-devtools/libtool/libtool-2.4.2.inc
new file mode 100644
index 0000000000..d26982dc62
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool-2.4.2.inc
@@ -0,0 +1,51 @@
1SUMMARY = "Generic library support script"
2DESCRIPTION = "This is GNU libtool, a generic library support script. \
3Libtool hides the complexity of generating special library types \
4(such as shared libraries) behind a consistent interface."
5HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
6SECTION = "devel"
7LICENSE = "GPLv2 & LGPLv2.1"
8LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
9 file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
10
11INC_PR = "r6"
12
13SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
14 file://trailingslash.patch \
15 file://rename-with-sysroot.patch \
16 file://use-sysroot-in-libpath.patch \
17 file://fix-final-rpath.patch \
18 file://avoid_absolute_paths_for_general_utils.patch \
19 file://fix-rpath.patch \
20 file://respect-fstack-protector.patch \
21 file://norm-rpath.patch \
22 file://dont-depend-on-help2man.patch \
23 file://fix-resolve-lt-sysroot.patch \
24 "
25
26SRC_URI[md5sum] = "d2f3b7d4627e69e13514a40e72a24d50"
27SRC_URI[sha256sum] = "b38de44862a987293cd3d8dfae1c409d514b6c4e794ebc93648febf9afc38918"
28
29do_compile_prepend () {
30 # Sometimes this file doesn't get rebuilt, force the issue
31 rm -f ${S}/libltdl/config/ltmain.sh
32 make libltdl/config/ltmain.sh
33 ./config.status
34}
35
36inherit autotools
37EXTRA_AUTORECONF = "--exclude=libtoolize"
38
39DEPENDS = "libtool-native"
40
41PACKAGES =+ "libltdl libltdl-dev libltdl-dbg libltdl-staticdev"
42FILES_${PN} += "${datadir}/aclocal"
43FILES_${PN}-dev = "${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la \
44 ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig \
45 ${base_libdir}/*.o ${libdir}/${BPN}/*.la ${base_libdir}/*.la"
46
47#FILES_${PN}-dev := "${@oe_filter_out('${datadir}/aclocal', '${FILES_libtool-dev}', d)}"
48FILES_libltdl = "${libdir}/libltdl${SOLIBS}"
49FILES_libltdl-dev = "${libdir}/libltdl${SOLIBSDEV} ${includedir}"
50FILES_libltdl-staticdev = "${libdir}/libltdl.a"
51FILES_libltdl-dbg = "${libdir}/.debug/"
diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb b/meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb
new file mode 100644
index 0000000000..72fad37eaf
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool-cross_2.4.2.bb
@@ -0,0 +1,43 @@
1require libtool-${PV}.inc
2
3PR = "${INC_PR}.1"
4PACKAGES = ""
5SRC_URI += "file://prefix.patch"
6SRC_URI += "file://fixinstall.patch"
7
8datadir = "${STAGING_DIR_TARGET}${target_datadir}"
9
10do_configure_prepend () {
11 # Remove any existing libtool m4 since old stale versions would break
12 # any upgrade
13 rm -f ${STAGING_DATADIR}/aclocal/libtool.m4
14 rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
15}
16
17do_install () {
18 install -d ${D}${bindir_crossscripts}/
19 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
20 install -d ${D}${bindir_crossscripts}/
21 install -m 0755 libtoolize ${D}${bindir_crossscripts}/
22 install -d ${D}${target_datadir}/libtool/config/
23 install -d ${D}${target_datadir}/aclocal/
24 install -c ${S}/libltdl/config/compile ${D}${target_datadir}/libtool/config/
25 install -c ${S}/libltdl/config/config.guess ${D}${target_datadir}/libtool/config/
26 install -c ${S}/libltdl/config/config.sub ${D}${target_datadir}/libtool/config/
27 install -c ${S}/libltdl/config/depcomp ${D}${target_datadir}/libtool/config/
28 install -c ${S}/libltdl/config/install-sh ${D}${target_datadir}/libtool/config/
29 install -c ${S}/libltdl/config/missing ${D}${target_datadir}/libtool/config/
30 install -c -m 0644 ${S}/libltdl/config/ltmain.sh ${D}${target_datadir}/libtool/config/
31 install -c -m 0644 ${S}/libltdl/m4/*.m4 ${D}${target_datadir}/aclocal/
32}
33
34SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess"
35
36libtoolcross_sysroot_preprocess () {
37 sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
38 sysroot_stage_dir ${D}${target_datadir} ${SYSROOT_DESTDIR}${target_datadir}
39}
40
41SSTATE_SCAN_FILES += "libtoolize *-libtool"
42
43export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-devtools/libtool/libtool-native_2.4.2.bb b/meta/recipes-devtools/libtool/libtool-native_2.4.2.bb
new file mode 100644
index 0000000000..f1051d84f3
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool-native_2.4.2.bb
@@ -0,0 +1,25 @@
1require libtool-${PV}.inc
2
3DEPENDS = ""
4
5PR = "${INC_PR}.1"
6SRC_URI += "file://prefix.patch"
7
8inherit native
9
10EXTRA_OECONF = " --with-libtool-sysroot=${STAGING_DIR_NATIVE}"
11
12do_configure_prepend () {
13 # Remove any existing libtool m4 since old stale versions would break
14 # any upgrade
15 rm -f ${STAGING_DATADIR}/aclocal/libtool.m4
16 rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
17}
18
19do_install () {
20 autotools_do_install
21 install -d ${D}${bindir}/
22 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
23}
24
25export CONFIG_SHELL="/bin/bash"
diff --git a/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch b/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch
new file mode 100644
index 0000000000..3c751ed0e2
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/avoid_absolute_paths_for_general_utils.patch
@@ -0,0 +1,39 @@
1Upstream-Status: Pending
2
3On some distro the path of utils like sed, grep etc are different than the
4buildhost system.
5 This was causing runtime issue while running libtoolize from the
6libtool-nativesdk package.
7 This patch takes out the absolute paths of these utils, and put
8responsibility on the end-user to set correct paths for these utilities to be
9found out.
10
11Nitin A Kamble <nitin.a.kamble@intel.com>
122011/02/18
13
14
15Index: libtool-2.4.2/libltdl/config/general.m4sh
16===================================================================
17--- libtool-2.4.2.orig/libltdl/config/general.m4sh
18+++ libtool-2.4.2/libltdl/config/general.m4sh
19@@ -45,15 +45,15 @@ progpath="$0"
20 M4SH_VERBATIM([[
21 : ${CP="cp -f"}
22 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
23-: ${EGREP="@EGREP@"}
24-: ${FGREP="@FGREP@"}
25-: ${GREP="@GREP@"}
26-: ${LN_S="@LN_S@"}
27+: ${EGREP="egrep"}
28+: ${FGREP="fgrep"}
29+: ${GREP="grep"}
30+: ${LN_S="ln -s"}
31 : ${MAKE="make"}
32 : ${MKDIR="mkdir"}
33 : ${MV="mv -f"}
34 : ${RM="rm -f"}
35-: ${SED="@SED@"}
36+: ${SED="sed"}
37 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
38 : ${Xsed="$SED -e 1s/^X//"}
39
diff --git a/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch b/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch
new file mode 100644
index 0000000000..67552b0ff5
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch
@@ -0,0 +1,24 @@
1Upstream-Status: Inappropriate
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd libtool-2.4.2/Makefile.am libtool-2.4.2/Makefile.am
5--- libtool-2.4.2/Makefile.am 2011-10-17 13:17:04.000000000 +0300
6+++ libtool-2.4.2/Makefile.am 2013-01-01 22:03:36.865586811 +0200
7@@ -327,17 +327,6 @@
8 cd $(srcdir)/doc && \
9 $(MAKEINFO) --no-headers $(MAKEINFOFLAGS) -o notes.txt notes.texi
10
11-dist_man1_MANS = $(srcdir)/doc/libtool.1 $(srcdir)/doc/libtoolize.1
12-MAINTAINERCLEANFILES += $(dist_man1_MANS)
13-update_mans = \
14- PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \
15- $(HELP2MAN) --output=$@
16-$(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh
17- $(update_mans) --help-option=--help-all libtool
18-$(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in
19- $(update_mans) libtoolize
20-
21-
22 ## ------------- ##
23 ## Installation. ##
24 ## ------------- ##
diff --git a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch b/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
new file mode 100644
index 0000000000..5c275ffd32
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Enalbing sysroot support exposed a bug where the final library
4had an RPATH encoded into it which still pointed to the sysroot.
5This works around the issue until it gets sorted out upstream.
6
7Fix suggested by Richard Purdie <richard.purdie@intel.com>
8Signed-off-by: Scott Garman <scott.a.garman@intel.com>
9
10Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
11===================================================================
12--- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
13+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
14@@ -7268,9 +7268,11 @@ EOF
15 test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
16 for libdir in $rpath; do
17 if test -n "$hardcode_libdir_flag_spec"; then
18+ func_replace_sysroot "$libdir"
19+ libdir=$func_replace_sysroot_result
20+ func_stripname '=' '' "$libdir"
21+ libdir=$func_stripname_result
22 if test -n "$hardcode_libdir_separator"; then
23- func_replace_sysroot "$libdir"
24- libdir=$func_replace_sysroot_result
25 if test -z "$hardcode_libdirs"; then
26 hardcode_libdirs="$libdir"
27 else
28@@ -7999,6 +8001,10 @@ EOF
29 hardcode_libdirs=
30 for libdir in $compile_rpath $finalize_rpath; do
31 if test -n "$hardcode_libdir_flag_spec"; then
32+ func_replace_sysroot "$libdir"
33+ libdir=$func_replace_sysroot_result
34+ func_stripname '=' '' "$libdir"
35+ libdir=$func_stripname_result
36 if test -n "$hardcode_libdir_separator"; then
37 if test -z "$hardcode_libdirs"; then
38 hardcode_libdirs="$libdir"
diff --git a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch b/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch
new file mode 100644
index 0000000000..44e9fe17ae
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Pending
2
3This patch updates libtool.m4 (and its output) to resolve a problem
4with variable 'lt_sysroot' not being properly updated if the option
5'--with[-libtool]-sysroot' is not provided when running the 'configure'
6script for a package.
7
8I have also reported the problem to libtool here
9
10http://lists.gnu.org/archive/html/bug-libtool/2013-09/msg00005.html
11
12Signed-off-by: Hans Beckerus <hans.beckerus at gmail.com>
13---
14diff -ur libtool-2.4.2.orig/libltdl/m4/libtool.m4 libtool-2.4.2/libltdl/m4/libtool.m4
15--- libtool-2.4.2.orig/libltdl/m4/libtool.m4 2013-09-13 22:37:43.647282945 +0200
16+++ libtool-2.4.2/libltdl/m4/libtool.m4 2013-09-14 10:27:37.168178605 +0200
17@@ -1234,16 +1234,21 @@
18 dnl in case the user passed a directory name.
19 lt_sysroot=
20 case ${with_libtool_sysroot} in #(
21- yes)
22+ no)
23 if test "$GCC" = yes; then
24 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
25+ # Treat "/" the same a an unset sysroot. It seems to be more
26+ # compatible across host platforms that way!?
27+ if test "$lt_sysroot" = /; then
28+ lt_sysroot=
29+ fi
30 fi
31 ;; #(
32+ yes|''|/)
33+ ;; #(
34 /*)
35 lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
36 ;; #(
37- no|'')
38- ;; #(
39 *)
40 AC_MSG_RESULT([${with_libtool_sysroot}])
41 AC_MSG_ERROR([The sysroot must be an absolute path.])
diff --git a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch b/meta/recipes-devtools/libtool/libtool/fix-rpath.patch
new file mode 100644
index 0000000000..1571178a6a
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/fix-rpath.patch
@@ -0,0 +1,63 @@
1We don't want to add RPATHS which match default linker
2search paths, they're a waste of space. This patch
3filters libtools list and removes the ones we don't need.
4
5RP 23/9/2011
6
7Upstream-Status: Pending
8
9Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
10===================================================================
11--- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
12+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
13@@ -7286,8 +7286,14 @@ EOF
14 esac
15 fi
16 else
17- eval flag=\"$hardcode_libdir_flag_spec\"
18- func_append dep_rpath " $flag"
19+ # We only want to hardcode in an rpath if it isn't in the
20+ # default dlsearch path.
21+ case " $sys_lib_dlsearch_path " in
22+ *" $libdir "*) ;;
23+ *) eval flag=\"$hardcode_libdir_flag_spec\"
24+ func_append dep_rpath " $flag"
25+ ;;
26+ esac
27 fi
28 elif test -n "$runpath_var"; then
29 case "$perm_rpath " in
30@@ -8019,8 +8025,14 @@ EOF
31 esac
32 fi
33 else
34- eval flag=\"$hardcode_libdir_flag_spec\"
35- func_append rpath " $flag"
36+ # We only want to hardcode in an rpath if it isn't in the
37+ # default dlsearch path.
38+ case " $sys_lib_dlsearch_path " in
39+ *" $libdir "*) ;;
40+ *) eval flag=\"$hardcode_libdir_flag_spec\"
41+ rpath+=" $flag"
42+ ;;
43+ esac
44 fi
45 elif test -n "$runpath_var"; then
46 case "$perm_rpath " in
47@@ -8070,8 +8082,14 @@ EOF
48 esac
49 fi
50 else
51- eval flag=\"$hardcode_libdir_flag_spec\"
52- func_append rpath " $flag"
53+ # We only want to hardcode in an rpath if it isn't in the
54+ # default dlsearch path.
55+ case " $sys_lib_dlsearch_path " in
56+ *" $libdir "*) ;;
57+ *) eval flag=\"$hardcode_libdir_flag_spec\"
58+ func_append rpath " $flag"
59+ ;;
60+ esac
61 fi
62 elif test -n "$runpath_var"; then
63 case "$finalize_perm_rpath " in
diff --git a/meta/recipes-devtools/libtool/libtool/fixinstall.patch b/meta/recipes-devtools/libtool/libtool/fixinstall.patch
new file mode 100644
index 0000000000..279c07be37
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/fixinstall.patch
@@ -0,0 +1,101 @@
1There is no point in having "executable" binaries in the .libs
2directory linked with different rpaths to the target which
3could concivably be run on the build system when cross compiling.
4
5This patch removes the extra rpaths ($compile_rpath) so that the
6output from the "link" stage can be used on the target. We can then
7avoid having to "relink" during the install stage.
8
9This saves some build time (do_install is over 2 minutes faster for
10pulseaudio).
11
12This patch also removes an annoying "seems to be moved" warning
13which is totally bogus in the sysroot case.
14
15Upstream-Status: Inappropriate [upstream are unlikely to take a patch like this]
16
17RP 2011/11/16
18
19Index: libtool-2.4/libltdl/config/ltmain.m4sh
20===================================================================
21--- libtool-2.4.orig/libltdl/config/ltmain.m4sh 2011-11-16 14:50:01.070383779 +0000
22+++ libtool-2.4/libltdl/config/ltmain.m4sh 2011-11-16 15:27:13.582310413 +0000
23@@ -2163,7 +2163,7 @@
24 dir="$func_dirname_result"
25 func_append dir "$objdir"
26
27- if test -n "$relink_command"; then
28+ if test "$fast_install" = no && test -n "$relink_command"; then
29 # Strip any trailing slash from the destination.
30 func_stripname '' '/' "$libdir"
31 destlibdir=$func_stripname_result
32@@ -2202,7 +2202,7 @@
33 shift
34
35 srcname="$realname"
36- test -n "$relink_command" && srcname="$realname"T
37+ test "$fast_install" = no && test -n "$relink_command" && srcname="$realname"T
38
39 # Install the shared library and build the symlinks.
40 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
41@@ -5856,15 +5856,15 @@
42 # Hardcode the library path.
43 # Skip directories that are in the system default run-time
44 # search path.
45- case " $sys_lib_dlsearch_path " in
46- *" $absdir "*) ;;
47- *)
48- case "$compile_rpath " in
49- *" $absdir "*) ;;
50- *) func_append compile_rpath " $absdir" ;;
51- esac
52- ;;
53- esac
54+ #case " $sys_lib_dlsearch_path " in
55+ #*" $absdir "*) ;;
56+ #*)
57+ # case "$compile_rpath " in
58+ # *" $absdir "*) ;;
59+ # *) func_append compile_rpath " $absdir" ;;
60+ # esac
61+ # ;;
62+ #esac
63 case " $sys_lib_dlsearch_path " in
64 *" $libdir "*) ;;
65 *)
66@@ -5930,15 +5930,15 @@
67 # Hardcode the library path.
68 # Skip directories that are in the system default run-time
69 # search path.
70- case " $sys_lib_dlsearch_path " in
71- *" $absdir "*) ;;
72- *)
73- case "$compile_rpath " in
74- *" $absdir "*) ;;
75- *) func_append compile_rpath " $absdir" ;;
76- esac
77- ;;
78- esac
79+ #case " $sys_lib_dlsearch_path " in
80+ #*" $absdir "*) ;;
81+ #*)
82+ # case "$compile_rpath " in
83+ # *" $absdir "*) ;;
84+ # *) func_append compile_rpath " $absdir" ;;
85+ # esac
86+ # ;;
87+ #esac
88 case " $sys_lib_dlsearch_path " in
89 *" $libdir "*) ;;
90 *)
91@@ -6284,8 +6284,8 @@
92 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
93 test -z "$libdir" && \
94 func_fatal_error "\`$deplib' is not a valid libtool archive"
95- test "$absdir" != "$libdir" && \
96- func_warning "\`$deplib' seems to be moved"
97+ #test "$absdir" != "$libdir" && \
98+ # func_warning "\`$deplib' seems to be moved"
99
100 path="-L$absdir"
101 fi
diff --git a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch
new file mode 100644
index 0000000000..dce1576c41
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch
@@ -0,0 +1,36 @@
1libtool: normalize link paths before considering for RPATH
2
3Libtool may be passed link paths of the form "/usr/lib/../lib", which
4fool its detection code into thinking it should be included as an
5RPATH in the generated binary. Normalize before comparision.
6
7Signed-off-by: Andy Ross <andy.ross@windriver.com>
8Upstream-Status: Pending
9
10diff -ur a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
11--- a/libltdl/config/ltmain.m4sh 2012-08-16 13:58:55.058900363 -0700
12+++ b/libltdl/config/ltmain.m4sh 2012-08-22 11:01:34.191345989 -0700
13@@ -7288,8 +7288,10 @@
14 else
15 # We only want to hardcode in an rpath if it isn't in the
16 # default dlsearch path.
17+ func_normal_abspath "$libdir"
18+ libdir_norm=$func_normal_abspath_result
19 case " $sys_lib_dlsearch_path " in
20- *" $libdir "*) ;;
21+ *" $libdir_norm "*) ;;
22 *) eval flag=\"$hardcode_libdir_flag_spec\"
23 func_append dep_rpath " $flag"
24 ;;
25@@ -8027,8 +8029,10 @@
26 else
27 # We only want to hardcode in an rpath if it isn't in the
28 # default dlsearch path.
29+ func_normal_abspath "$libdir"
30+ libdir_norm=$func_normal_abspath_result
31 case " $sys_lib_dlsearch_path " in
32- *" $libdir "*) ;;
33+ *" $libdir_norm "*) ;;
34 *) eval flag=\"$hardcode_libdir_flag_spec\"
35 rpath+=" $flag"
36 ;;
diff --git a/meta/recipes-devtools/libtool/libtool/prefix.patch b/meta/recipes-devtools/libtool/libtool/prefix.patch
new file mode 100644
index 0000000000..5e46e68f03
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/prefix.patch
@@ -0,0 +1,111 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure
4it can't be confused with the host libtool.
5
6Originally by: RP
7
8Updated: Date: 2010/06/28
9Nitin A Kamble <nitin.a.kamble@intel.com>
10
11It also adjusts libtool so that the header at the script is used for
12script execution and not thevalue of $SHELL. This is because many
13Makefiles change $SHELL so dash can get used to execute what is
14otherwise configured as a bash shell script. Since we don't need to
15execute scipts this way on any system I'm aware of us building upon,
16the simplest fix is just to remove $SHELL.
17
18Updated: Date: 2011/11/09
19RP
20
21Index: libtool-2.4.2/libltdl/m4/libtool.m4
22===================================================================
23--- libtool-2.4.2.orig/libltdl/m4/libtool.m4
24+++ libtool-2.4.2/libltdl/m4/libtool.m4
25@@ -94,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1])
26 LIBTOOL_DEPS="$ltmain"
27
28 # Always use our own libtool.
29-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
30+LIBTOOL='$(top_builddir)'
31+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
32 AC_SUBST(LIBTOOL)dnl
33
34 _LT_SETUP
35@@ -206,7 +207,7 @@ aix3*)
36 esac
37
38 # Global variables:
39-ofile=libtool
40+ofile=${host_alias}-libtool
41 can_build_shared=yes
42
43 # All known linkers require a `.a' archive for static linking (except MSVC,
44Index: libtool-2.4.2/Makefile.am
45===================================================================
46--- libtool-2.4.2.orig/Makefile.am
47+++ libtool-2.4.2/Makefile.am
48@@ -31,7 +31,7 @@ AM_LDFLAGS =
49 DIST_SUBDIRS = .
50 EXTRA_DIST =
51
52-BUILT_SOURCES = libtool libtoolize
53+BUILT_SOURCES = $(host_alias)-libtool libtoolize
54
55 CLEANFILES =
56 MOSTLYCLEANFILES =
57@@ -72,7 +72,7 @@ EXTRA_DIST += bootstrap $(srcdir)/li
58 ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 \
59 ChangeLog.2005 ChangeLog.2006 ChangeLog.2007 \
60 ChangeLog.2008 ChangeLog.2009 ChangeLog.2010
61-CLEANFILES += libtool libtoolize libtoolize.tmp \
62+CLEANFILES += $(host_alias)-libtool libtoolize libtoolize.tmp \
63 $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
64
65 ## These are the replacements that need to be made at bootstrap time,
66@@ -231,7 +231,7 @@ configure_edit = sed \
67 -e 's,@SED\@,$(SED),g'
68
69 # The libtool distributor and the standalone libtool script.
70-bin_SCRIPTS = libtoolize libtool
71+bin_SCRIPTS = libtoolize $(host_alias)-libtool
72
73 libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
74 rm -f libtoolize.tmp libtoolize
75@@ -244,8 +244,8 @@ libtoolize: $(srcdir)/libtoolize.in $(to
76 # We used to do this with a 'stamp-vcl' file, but non-gmake builds
77 # would rerun configure on every invocation, so now we manually
78 # check the version numbers from the build rule when necessary.
79-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
80- @target=libtool; $(rebuild); \
81+$(host_alias)-libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog
82+ @target=$(host_alias)-libtool; $(rebuild); \
83 if test -f "$$target"; then \
84 set dummy `./$$target --version | sed 1q`; actualver="$$5"; \
85 test "$$actualver" = "$$correctver" && rebuild=false; \
86@@ -254,8 +254,8 @@ libtool: $(top_builddir)/config.status $
87 case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \
88 done; \
89 if $$rebuild; then \
90- echo $(SHELL) ./config.status $$target; \
91- cd $(top_builddir) && $(SHELL) ./config.status $$target; \
92+ echo $(SHELL) ./config.status libtool; \
93+ cd $(top_builddir) && $(SHELL) ./config.status libtool; \
94 fi
95
96 .PHONY: configure-subdirs
97@@ -535,12 +535,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$
98
99 BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
100 LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
101- LIBTOOL="$(abs_top_builddir)/libtool" \
102+ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
103 tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4"
104
105 INSTALLCHECK_ENVIRONMENT = \
106 LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \
107- LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \
108+ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool | sed '$(program_transform_name)'`" \
109 LTDLINCL="-I$(includedir)" \
110 LIBLTDL="$(libdir)/libltdl.la" \
111 tst_aclocaldir="$(aclocaldir)"
diff --git a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch b/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
new file mode 100644
index 0000000000..c3e3e867aa
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch
@@ -0,0 +1,166 @@
1Upstream-Status: Pending
2
3This patch renames the --with-sysroot option to --with-libtool-sysroot
4to avoid namespace conflict with binutils, gcc and other toolchain
5components.
6
7I also reported the problem to libtool here
8
9http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html
10
11-Khem Raj <raj.khem@gmail.com>
12
13Index: libtool-2.4.2/libltdl/m4/libtool.m4
14===================================================================
15--- libtool-2.4.2.orig/libltdl/m4/libtool.m4
16+++ libtool-2.4.2/libltdl/m4/libtool.m4
17@@ -1224,27 +1224,27 @@ _LT_DECL([], [ECHO], [1], [An echo progr
18 # ----------------
19 AC_DEFUN([_LT_WITH_SYSROOT],
20 [AC_MSG_CHECKING([for sysroot])
21-AC_ARG_WITH([sysroot],
22-[ --with-sysroot[=DIR] Search for dependent libraries within DIR
23+AC_ARG_WITH([libtool-sysroot],
24+[ --with-libtool-sysroot[=DIR] Search for dependent libraries within DIR
25 (or the compiler's sysroot if not specified).],
26-[], [with_sysroot=no])
27+[], [with_libtool_sysroot=no])
28
29 dnl lt_sysroot will always be passed unquoted. We quote it here
30 dnl in case the user passed a directory name.
31 lt_sysroot=
32-case ${with_sysroot} in #(
33+case ${with_libtool_sysroot} in #(
34 yes)
35 if test "$GCC" = yes; then
36 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
37 fi
38 ;; #(
39 /*)
40- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
41+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
42 ;; #(
43 no|'')
44 ;; #(
45 *)
46- AC_MSG_RESULT([${with_sysroot}])
47+ AC_MSG_RESULT([${with_libtool_sysroot}])
48 AC_MSG_ERROR([The sysroot must be an absolute path.])
49 ;;
50 esac
51Index: libtool-2.4.2/tests/sysroot.at
52===================================================================
53--- libtool-2.4.2.orig/tests/sysroot.at
54+++ libtool-2.4.2/tests/sysroot.at
55@@ -64,7 +64,7 @@ while read file; do
56 done])
57
58 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
59-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
60+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
61
62 #???
63 if test "$shlibpath_var" = PATH; then
64@@ -114,7 +114,7 @@ AM_INIT_AUTOMAKE([foreign])
65 AC_PROG_CC
66 AC_CONFIG_SRCDIR([lib2.c])
67 LT_INIT
68-sysroot=$with_sysroot
69+sysroot=$with_libtool_sysroot
70 AC_SUBST([sysroot])
71 AC_OUTPUT(Makefile)
72 ]])
73@@ -155,7 +155,7 @@ AM_INIT_AUTOMAKE([foreign])
74 AC_PROG_CC
75 AC_CONFIG_SRCDIR([prog.c])
76 LT_INIT
77-sysroot=$with_sysroot
78+sysroot=$with_libtool_sysroot
79 AC_SUBST([sysroot])
80 AC_OUTPUT(Makefile)
81 ]])
82Index: libtool-2.4.2/tests/testsuite
83===================================================================
84--- libtool-2.4.2.orig/tests/testsuite
85+++ libtool-2.4.2/tests/testsuite
86@@ -26676,7 +26676,7 @@ $at_traceon; }
87
88
89 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
90-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
91+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
92
93 #???
94 if test "$shlibpath_var" = PATH; then
95@@ -26874,7 +26874,7 @@ AM_INIT_AUTOMAKE([foreign])
96 AC_PROG_CC
97 AC_CONFIG_SRCDIR([lib2.c])
98 LT_INIT
99-sysroot=$with_sysroot
100+sysroot=$with_libtool_sysroot
101 AC_SUBST([sysroot])
102 AC_OUTPUT(Makefile)
103 _ATEOF
104@@ -27051,7 +27051,7 @@ AM_INIT_AUTOMAKE([foreign])
105 AC_PROG_CC
106 AC_CONFIG_SRCDIR([prog.c])
107 LT_INIT
108-sysroot=$with_sysroot
109+sysroot=$with_libtool_sysroot
110 AC_SUBST([sysroot])
111 AC_OUTPUT(Makefile)
112 _ATEOF
113@@ -27392,7 +27392,7 @@ $at_traceon; }
114
115
116 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
117-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
118+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
119
120 #???
121 if test "$shlibpath_var" = PATH; then
122@@ -27590,7 +27590,7 @@ AM_INIT_AUTOMAKE([foreign])
123 AC_PROG_CC
124 AC_CONFIG_SRCDIR([lib2.c])
125 LT_INIT
126-sysroot=$with_sysroot
127+sysroot=$with_libtool_sysroot
128 AC_SUBST([sysroot])
129 AC_OUTPUT(Makefile)
130 _ATEOF
131@@ -27767,7 +27767,7 @@ AM_INIT_AUTOMAKE([foreign])
132 AC_PROG_CC
133 AC_CONFIG_SRCDIR([prog.c])
134 LT_INIT
135-sysroot=$with_sysroot
136+sysroot=$with_libtool_sysroot
137 AC_SUBST([sysroot])
138 AC_OUTPUT(Makefile)
139 _ATEOF
140@@ -28108,7 +28108,7 @@ $at_traceon; }
141
142
143 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
144-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
145+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
146
147 #???
148 if test "$shlibpath_var" = PATH; then
149@@ -28306,7 +28306,7 @@ AM_INIT_AUTOMAKE([foreign])
150 AC_PROG_CC
151 AC_CONFIG_SRCDIR([lib2.c])
152 LT_INIT
153-sysroot=$with_sysroot
154+sysroot=$with_libtool_sysroot
155 AC_SUBST([sysroot])
156 AC_OUTPUT(Makefile)
157 _ATEOF
158@@ -28483,7 +28483,7 @@ AM_INIT_AUTOMAKE([foreign])
159 AC_PROG_CC
160 AC_CONFIG_SRCDIR([prog.c])
161 LT_INIT
162-sysroot=$with_sysroot
163+sysroot=$with_libtool_sysroot
164 AC_SUBST([sysroot])
165 AC_OUTPUT(Makefile)
166 _ATEOF
diff --git a/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch b/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
new file mode 100644
index 0000000000..a82b2ec5a1
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
@@ -0,0 +1,53 @@
1Source: http://permalink.gmane.org/gmane.comp.gnu.libtool.bugs/7341
2
3Bug confirmed. When code is compiled with -fstack-protector{,-all},
4GCC "emits extra code to check for buffer overflows, such as stack
5smashing attacks". This extra code uses symbols from libssp, and
6therefore (at least) Cygwin's GCC specs contain:
7
8*link_ssp:
9%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}
10
11Therefore, when libtool fails to pass -fstack-protector{,-all} at link
12stage, the link fails.
13
14Patch attached. (Yes, I have a copyright assignment on file.)
15
16Yaakov
17Cygwin/X
18
19From b79f4e117b6f73cc461a2e232063e08481d33300 Mon Sep 17 00:00:00 2001
20From: Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
21Date: Tue, 1 Jun 2010 22:18:51 -0500
22Subject: [PATCH] Fix linking with -fstack-protector
23
24* libltdl/config/ltmain.m4sh (func_mode_link): Pass -fstack-protector*
25to the linker as it is required at link time to resolve libssp symbols.
26
27Signed-off-by: Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
28---
29 libltdl/config/ltmain.m4sh | 4 +++-
30 1 files changed, 3 insertions(+), 1 deletions(-)
31
32Signed-off-by: Khem Raj <raj.khem@gmail.com>
33Upstream-Status: Pending
34Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
35===================================================================
36--- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh 2012-06-01 12:35:44.089638130 -0700
37+++ libtool-2.4.2/libltdl/config/ltmain.m4sh 2012-06-01 12:37:25.789643055 -0700
38@@ -5067,13 +5067,14 @@
39 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
40 # -F/path path to uninstalled frameworks, gcc on darwin
41 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
42+ # -fstack-protector* stack protector flags for GCC
43 # @file GCC response files
44 # -tp=* Portland pgcc target processor selection
45 # --sysroot=* for sysroot support
46 # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
47 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
48 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
49- -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
50+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*)
51 func_quote_for_eval "$arg"
52 arg="$func_quote_for_eval_result"
53 func_append compile_command " $arg"
diff --git a/meta/recipes-devtools/libtool/libtool/trailingslash.patch b/meta/recipes-devtools/libtool/libtool/trailingslash.patch
new file mode 100644
index 0000000000..bb7a761e25
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/trailingslash.patch
@@ -0,0 +1,34 @@
1Upstream-Status: Pending
2
3A 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)
4
5This is because libdir has a trailing slash which breaks the comparision.
6
7RP 2/1/10
8
9Merged a patch received from Gary Thomas <gary@mlbassoc.com>
10
11Date: 2010/07/12
12Nitin A Kamble <nitin.a.kamble@intel.com>
13
14Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
15===================================================================
16--- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
17+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
18@@ -2167,8 +2167,15 @@ func_mode_install ()
19 func_append dir "$objdir"
20
21 if test -n "$relink_command"; then
22+ # Strip any trailing slash from the destination.
23+ func_stripname '' '/' "$libdir"
24+ destlibdir=$func_stripname_result
25+
26+ func_stripname '' '/' "$destdir"
27+ s_destdir=$func_stripname_result
28+
29 # Determine the prefix the user has applied to our future dir.
30- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
31+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
32
33 # Don't allow the user to place us outside of our expected
34 # location b/c this prevents finding dependent libraries that
diff --git a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch b/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
new file mode 100644
index 0000000000..0cd66ad524
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch
@@ -0,0 +1,22 @@
1Upstream-Status: Pending
2
3When using sysroot we should append it to libdir, which is helpful in
4cross builds as the system is staged in the sysroot. For normal builds,
5i.e. when lt_sysroot is not set, it will still behave the same and add
6-L/usr/lib to the relink command.
7
8-Khem Raj <raj.khem@gmail.com>
9
10Index: libtool-2.4.2/libltdl/config/ltmain.m4sh
11===================================================================
12--- libtool-2.4.2.orig/libltdl/config/ltmain.m4sh
13+++ libtool-2.4.2/libltdl/config/ltmain.m4sh
14@@ -6138,7 +6138,7 @@ func_mode_link ()
15 fi
16 else
17 # We cannot seem to hardcode it, guess we'll fake it.
18- add_dir="-L$libdir"
19+ add_dir="-L$lt_sysroot$libdir"
20 # Try looking first in the location we're being installed to.
21 if test -n "$inst_prefix_dir"; then
22 case $libdir in
diff --git a/meta/recipes-devtools/libtool/libtool_2.4.2.bb b/meta/recipes-devtools/libtool/libtool_2.4.2.bb
new file mode 100644
index 0000000000..a2eb4ea437
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool_2.4.2.bb
@@ -0,0 +1,15 @@
1require libtool-${PV}.inc
2
3PR = "${INC_PR}.0"
4
5#
6# We want the results of libtool-cross preserved - don't stage anything ourselves.
7#
8SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
9
10libtool_sysroot_preprocess () {
11 rm -rf ${SYSROOT_DESTDIR}${bindir}/*
12 rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/*
13 rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/config/*
14}
15
diff --git a/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb b/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb
new file mode 100644
index 0000000000..fff15e916d
--- /dev/null
+++ b/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bb
@@ -0,0 +1,35 @@
1require libtool-${PV}.inc
2
3PR = "${INC_PR}.0"
4
5FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:"
6
7SRC_URI += "file://prefix.patch"
8SRC_URI += "file://fixinstall.patch"
9
10inherit nativesdk
11
12S = "${WORKDIR}/libtool-${PV}"
13FILES_${PN} += "${datadir}/libtool/*"
14
15do_configure_prepend () {
16 # Remove any existing libtool m4 since old stale versions would break
17 # any upgrade
18 rm -f ${STAGING_DATADIR}/aclocal/libtool.m4
19 rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
20}
21
22do_install () {
23 autotools_do_install
24 install -d ${D}${bindir}/
25 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/
26}
27
28SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess"
29
30libtoolnativesdk_sysroot_preprocess () {
31 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
32 install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/${HOST_SYS}-libtool
33}
34
35export CONFIG_SHELL="/bin/bash"