diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/0014-sync-with-OE-libtool-changes.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/0014-sync-with-OE-libtool-changes.patch | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0014-sync-with-OE-libtool-changes.patch b/meta/recipes-devtools/binutils/binutils/0014-sync-with-OE-libtool-changes.patch new file mode 100644 index 0000000000..65ba10a553 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0014-sync-with-OE-libtool-changes.patch | |||
@@ -0,0 +1,89 @@ | |||
1 | From b7729343206fa196b9a11747a92b3cf563277056 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@intel.com> | ||
3 | Date: Mon, 6 Mar 2017 23:33:27 -0800 | ||
4 | Subject: [PATCH 14/15] sync with OE libtool changes | ||
5 | |||
6 | Apply these patches from our libtool patches as not only are redundant RPATHs a | ||
7 | waste of space but they can cause incorrect linking when native packages are | ||
8 | restored from sstate. | ||
9 | |||
10 | fix-rpath.patch: | ||
11 | We don't want to add RPATHS which match default linker | ||
12 | search paths, they're a waste of space. This patch | ||
13 | filters libtools list and removes the ones we don't need. | ||
14 | |||
15 | norm-rpath.patch: | ||
16 | Libtool may be passed link paths of the form "/usr/lib/../lib", which | ||
17 | fool its detection code into thinking it should be included as an | ||
18 | RPATH in the generated binary. Normalize before comparision. | ||
19 | |||
20 | Upstream-Status: Inappropriate | ||
21 | |||
22 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
23 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
24 | --- | ||
25 | ltmain.sh | 34 ++++++++++++++++++++++++++++------ | ||
26 | 1 file changed, 28 insertions(+), 6 deletions(-) | ||
27 | |||
28 | diff --git a/ltmain.sh b/ltmain.sh | ||
29 | index 11ee684ccc..3b19ac1532 100644 | ||
30 | --- a/ltmain.sh | ||
31 | +++ b/ltmain.sh | ||
32 | @@ -8053,8 +8053,16 @@ EOF | ||
33 | esac | ||
34 | fi | ||
35 | else | ||
36 | - eval flag=\"$hardcode_libdir_flag_spec\" | ||
37 | - func_append dep_rpath " $flag" | ||
38 | + # We only want to hardcode in an rpath if it isn't in the | ||
39 | + # default dlsearch path. | ||
40 | + func_normal_abspath "$libdir" | ||
41 | + libdir_norm=$func_normal_abspath_result | ||
42 | + case " $sys_lib_dlsearch_path " in | ||
43 | + *" $libdir_norm "*) ;; | ||
44 | + *) eval flag=\"$hardcode_libdir_flag_spec\" | ||
45 | + func_append dep_rpath " $flag" | ||
46 | + ;; | ||
47 | + esac | ||
48 | fi | ||
49 | elif test -n "$runpath_var"; then | ||
50 | case "$perm_rpath " in | ||
51 | @@ -8790,8 +8798,16 @@ EOF | ||
52 | esac | ||
53 | fi | ||
54 | else | ||
55 | - eval flag=\"$hardcode_libdir_flag_spec\" | ||
56 | - func_append rpath " $flag" | ||
57 | + # We only want to hardcode in an rpath if it isn't in the | ||
58 | + # default dlsearch path. | ||
59 | + func_normal_abspath "$libdir" | ||
60 | + libdir_norm=$func_normal_abspath_result | ||
61 | + case " $sys_lib_dlsearch_path " in | ||
62 | + *" $libdir_norm "*) ;; | ||
63 | + *) eval flag=\"$hardcode_libdir_flag_spec\" | ||
64 | + rpath+=" $flag" | ||
65 | + ;; | ||
66 | + esac | ||
67 | fi | ||
68 | elif test -n "$runpath_var"; then | ||
69 | case "$perm_rpath " in | ||
70 | @@ -8841,8 +8857,14 @@ EOF | ||
71 | esac | ||
72 | fi | ||
73 | else | ||
74 | - eval flag=\"$hardcode_libdir_flag_spec\" | ||
75 | - func_append rpath " $flag" | ||
76 | + # We only want to hardcode in an rpath if it isn't in the | ||
77 | + # default dlsearch path. | ||
78 | + case " $sys_lib_dlsearch_path " in | ||
79 | + *" $libdir "*) ;; | ||
80 | + *) eval flag=\"$hardcode_libdir_flag_spec\" | ||
81 | + func_append rpath " $flag" | ||
82 | + ;; | ||
83 | + esac | ||
84 | fi | ||
85 | elif test -n "$runpath_var"; then | ||
86 | case "$finalize_perm_rpath " in | ||
87 | -- | ||
88 | 2.20.1 | ||
89 | |||