blob: 5c9f8cc9c0d62da69edf63276bdd000b058dc71c [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001Upstream-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>
9Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
10Updated by: Robert Yang <liezhi.yang@windriver.com>
11
12diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
13--- a/build-aux/ltmain.in
14+++ b/build-aux/ltmain.in
15@@ -7569,9 +7569,11 @@ EOF
16 test relink = "$opt_mode" || rpath=$compile_rpath$rpath
17 for libdir in $rpath; do
18 if test -n "$hardcode_libdir_flag_spec"; then
19+ func_replace_sysroot "$libdir"
20+ libdir=$func_replace_sysroot_result
21+ func_stripname '=' '' "$libdir"
22+ libdir=$func_stripname_result
23 if test -n "$hardcode_libdir_separator"; then
24- func_replace_sysroot "$libdir"
25- libdir=$func_replace_sysroot_result
26 if test -z "$hardcode_libdirs"; then
27 hardcode_libdirs=$libdir
28 else
29@@ -8301,6 +8303,10 @@ EOF
30 hardcode_libdirs=
31 for libdir in $compile_rpath $finalize_rpath; do
32 if test -n "$hardcode_libdir_flag_spec"; then
33+ func_replace_sysroot "$libdir"
34+ libdir=$func_replace_sysroot_result
35+ func_stripname '=' '' "$libdir"
36+ libdir=$func_stripname_result
37 if test -n "$hardcode_libdir_separator"; then
38 if test -z "$hardcode_libdirs"; then
39 hardcode_libdirs=$libdir
40@@ -8352,6 +8358,10 @@ EOF
41 hardcode_libdirs=
42 for libdir in $finalize_rpath; do
43 if test -n "$hardcode_libdir_flag_spec"; then
44+ func_replace_sysroot "$libdir"
45+ libdir=$func_replace_sysroot_result
46+ func_stripname '=' '' "$libdir"
47+ libdir=$func_stripname_result
48 if test -n "$hardcode_libdir_separator"; then
49 if test -z "$hardcode_libdirs"; then
50 hardcode_libdirs=$libdir