blob: 1e4c65e024dba3f8fc7f54d98d412e0487ac37ab [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001libtool: normalize link paths before considering for RPATH
2
3Libtool may be passed link paths of the form "/usr/lib/../lib", which
4fool its detection code into thinking it should be included as an
5RPATH in the generated binary. Normalize before comparision.
6
7Signed-off-by: Andy Ross <andy.ross@windriver.com>
8Upstream-Status: Pending
9
10Updated by: Robert Yang <liezhi.yang@windriver.com>
11
12diff -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 ;;