Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | libtool: normalize link paths before considering for RPATH |
| 2 | |
| 3 | Libtool may be passed link paths of the form "/usr/lib/../lib", which |
| 4 | fool its detection code into thinking it should be included as an |
| 5 | RPATH in the generated binary. Normalize before comparision. |
| 6 | |
| 7 | Signed-off-by: Andy Ross <andy.ross@windriver.com> |
| 8 | Upstream-Status: Pending |
| 9 | |
| 10 | Updated by: Robert Yang <liezhi.yang@windriver.com> |
| 11 | |
| 12 | diff -ur a/build-aux/ltmain.in b/build-aux/ltmain.in |
| 13 | --- a/build-aux/ltmain.in 2012-08-16 13:58:55.058900363 -0700 |
| 14 | +++ b/build-aux/ltmain.in 2012-08-22 11:01:34.191345989 -0700 |
| 15 | @@ -7288,8 +7288,10 @@ |
| 16 | else |
| 17 | # We only want to hardcode in an rpath if it isn't in the |
| 18 | # default dlsearch path. |
| 19 | + func_normal_abspath "$libdir" |
| 20 | + libdir_norm=$func_normal_abspath_result |
| 21 | case " $sys_lib_dlsearch_path " in |
| 22 | - *" $libdir "*) ;; |
| 23 | + *" $libdir_norm "*) ;; |
| 24 | *) eval flag=\"$hardcode_libdir_flag_spec\" |
| 25 | func_append dep_rpath " $flag" |
| 26 | ;; |
| 27 | @@ -8027,8 +8029,10 @@ |
| 28 | else |
| 29 | # We only want to hardcode in an rpath if it isn't in the |
| 30 | # default dlsearch path. |
| 31 | + func_normal_abspath "$libdir" |
| 32 | + libdir_norm=$func_normal_abspath_result |
| 33 | case " $sys_lib_dlsearch_path " in |
| 34 | - *" $libdir "*) ;; |
| 35 | + *" $libdir_norm "*) ;; |
| 36 | *) eval flag=\"$hardcode_libdir_flag_spec\" |
| 37 | rpath+=" $flag" |
| 38 | ;; |