blob: 407424103796bc230cb9555bb648415bf5da6e86 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From bb9eb09411ddcef515f0f7ad7c29214b0766e960 Mon Sep 17 00:00:00 2001
Patrick Williamsc124f4f2015-09-15 14:41:29 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 2 Mar 2015 01:42:38 +0000
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05004Subject: [PATCH 10/14] Fix rpath in libtool when sysroot is enabled
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005
6Enabling sysroot support in libtool exposed a bug where the final
7library had an RPATH encoded into it which still pointed to the
8sysroot. This works around the issue until it gets sorted out
9upstream.
10
11Fix suggested by Richard Purdie <richard.purdie@linuxfoundation.org>
12
13Upstream-Status: Inappropriate [embedded specific]
14
15Signed-off-by: Scott Garman <scott.a.garman@intel.com>
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 ltmain.sh | 10 ++++++++--
19 1 file changed, 8 insertions(+), 2 deletions(-)
20
21diff --git a/ltmain.sh b/ltmain.sh
22index 70e856e..11ee684 100644
23--- a/ltmain.sh
24+++ b/ltmain.sh
25@@ -8035,9 +8035,11 @@ EOF
26 test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
27 for libdir in $rpath; do
28 if test -n "$hardcode_libdir_flag_spec"; then
29+ func_replace_sysroot "$libdir"
30+ libdir=$func_replace_sysroot_result
31+ func_stripname '=' '' "$libdir"
32+ libdir=$func_stripname_result
33 if test -n "$hardcode_libdir_separator"; then
34- func_replace_sysroot "$libdir"
35- libdir=$func_replace_sysroot_result
36 if test -z "$hardcode_libdirs"; then
37 hardcode_libdirs="$libdir"
38 else
39@@ -8770,6 +8772,10 @@ EOF
40 hardcode_libdirs=
41 for libdir in $compile_rpath $finalize_rpath; do
42 if test -n "$hardcode_libdir_flag_spec"; then
43+ func_replace_sysroot "$libdir"
44+ libdir=$func_replace_sysroot_result
45+ func_stripname '=' '' "$libdir"
46+ libdir=$func_stripname_result
47 if test -n "$hardcode_libdir_separator"; then
48 if test -z "$hardcode_libdirs"; then
49 hardcode_libdirs="$libdir"
50--
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500512.7.1
Patrick Williamsc124f4f2015-09-15 14:41:29 -050052