summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/libtool
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-16 16:58:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-24 08:30:59 +0000
commit61c51bfce9ec68062adf8e525c30bf0e179a7f3c (patch)
tree0c346da13f556385751fe901776d87e9c76e68d6 /meta/recipes-devtools/libtool
parentdc2d701207435b0dbd521a11d152f11d0f18d11e (diff)
downloadpoky-61c51bfce9ec68062adf8e525c30bf0e179a7f3c.tar.gz
libtool: Avoid relinking when cross compiling, its pointless
There is no point in having "executable" binaries in the .libs directory linked with different rpaths to the target which could concivably be run on the build system when cross compiling. This patch removes the extra rpaths ($compile_rpath) so that the output from the "link" stage can be used on the target. We can then avoid having to "relink" during the install stage. This saves some build time (do_install is over 2 minutes faster for pulseaudio). This patch also removes an annoying "seems to be moved" warning which is totally bogus in the sysroot case. (From OE-Core rev: 0a1dedeb8eea4e230b47d1516b3e6e90495fe49d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/libtool')
-rw-r--r--meta/recipes-devtools/libtool/libtool-cross_2.4.bb3
-rw-r--r--meta/recipes-devtools/libtool/libtool-nativesdk_2.4.bb3
-rw-r--r--meta/recipes-devtools/libtool/libtool/fixinstall.patch101
3 files changed, 105 insertions, 2 deletions
diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.4.bb b/meta/recipes-devtools/libtool/libtool-cross_2.4.bb
index 5c06987195..5df690868f 100644
--- a/meta/recipes-devtools/libtool/libtool-cross_2.4.bb
+++ b/meta/recipes-devtools/libtool/libtool-cross_2.4.bb
@@ -1,8 +1,9 @@
1require libtool-${PV}.inc 1require libtool-${PV}.inc
2 2
3PR = "r4" 3PR = "r5"
4PACKAGES = "" 4PACKAGES = ""
5SRC_URI += "file://prefix.patch" 5SRC_URI += "file://prefix.patch"
6SRC_URI += "file://fixinstall.patch"
6 7
7datadir = "${STAGING_DIR_TARGET}${target_datadir}" 8datadir = "${STAGING_DIR_TARGET}${target_datadir}"
8 9
diff --git a/meta/recipes-devtools/libtool/libtool-nativesdk_2.4.bb b/meta/recipes-devtools/libtool/libtool-nativesdk_2.4.bb
index a96d1d1ac4..bf1928d8b0 100644
--- a/meta/recipes-devtools/libtool/libtool-nativesdk_2.4.bb
+++ b/meta/recipes-devtools/libtool/libtool-nativesdk_2.4.bb
@@ -1,7 +1,8 @@
1require libtool-${PV}.inc 1require libtool-${PV}.inc
2 2
3PR = "r4" 3PR = "r5"
4SRC_URI += "file://prefix.patch" 4SRC_URI += "file://prefix.patch"
5SRC_URI += "file://fixinstall.patch"
5 6
6inherit nativesdk 7inherit nativesdk
7 8
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