Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | Upstream-Status: Inappropriate [embedded specific] |
| 2 | |
| 3 | Enalbing sysroot support exposed a bug where the final library |
| 4 | had an RPATH encoded into it which still pointed to the sysroot. |
| 5 | This works around the issue until it gets sorted out upstream. |
| 6 | |
| 7 | Fix suggested by Richard Purdie <richard.purdie@intel.com> |
| 8 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> |
| 9 | Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> |
| 10 | Updated by: Robert Yang <liezhi.yang@windriver.com> |
| 11 | |
| 12 | diff --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 |