blob: 413dc535e4e4aa1dc2fdf23c6745ba8d63414d76 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001 build/ltmain.sh | 32 +++++++++++++++++++++++++++-----
2 1 file changed, 27 insertions(+), 5 deletions(-)
3
4diff --git a/build/ltmain.sh b/build/ltmain.sh
5index 5eca4ae..805b461 100644
6--- a/build/ltmain.sh
7+++ b/build/ltmain.sh
8@@ -6944,7 +6944,7 @@ func_mode_link ()
9 dir=$func_resolve_sysroot_result
10 # We need an absolute path.
11 case $dir in
12- [\\/]* | [A-Za-z]:[\\/]*) ;;
13+ =* | [\\/]* | [A-Za-z]:[\\/]*) ;;
14 *)
15 absdir=`cd "$dir" && pwd`
16 test -z "$absdir" && \
17@@ -8137,7 +8137,7 @@ func_mode_link ()
18 $ECHO "*** $linklib is not portable!"
19 fi
20 if test lib = "$linkmode" &&
21- test yes = "$hardcode_into_libs"; then
22+ test "x$wrs_use_rpaths" = "xyes" && test "$hardcode_into_libs" = yes; then
23 # Hardcode the library path.
24 # Skip directories that are in the system default run-time
25 # search path.
26@@ -8404,7 +8404,7 @@ func_mode_link ()
27
28 if test lib = "$linkmode"; then
29 if test -n "$dependency_libs" &&
30- { test yes != "$hardcode_into_libs" ||
31+ { test yes != "$hardcode_into_libs" || test "x$wrs_use_rpaths" != "xyes" ||
32 test yes = "$build_old_libs" ||
33 test yes = "$link_static"; }; then
34 # Extract -R from dependency_libs
35@@ -9025,7 +9025,8 @@ func_mode_link ()
36 *) func_append finalize_rpath " $libdir" ;;
37 esac
38 done
39- if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
40+ if test yes != "$hardcode_into_libs" || test "x$wrs_use_rpaths" != "xyes" ||
41+ test yes = "$build_old_libs"; then
42 dependency_libs="$temp_xrpath $dependency_libs"
43 fi
44 fi
45@@ -9473,7 +9474,7 @@ EOF
46 case $archive_cmds in
47 *\$LD\ *) wl= ;;
48 esac
49- if test yes = "$hardcode_into_libs"; then
50+ if test yes = "$hardcode_into_libs" && test "x$wrs_use_rpaths" = "xyes"; then
51 # Hardcode the library paths
52 hardcode_libdirs=
53 dep_rpath=
54@@ -10211,6 +10212,27 @@ EOF
55 # Now hardcode the library paths
56 rpath=
57 hardcode_libdirs=
58+
59+ # short circuit putting rpaths in executables
60+ #
61+ if test "x$wrs_use_rpaths" != "xyes" ; then
62+ flag=
63+ for libdir in $compile_rpath; do
64+ case $(echo $libdir | ${SED} 's,/[/]*,/,g') in
65+ /usr/lib/* | /usr/lib32/* | /usr/lib64/* ) flag="$flag $libdir" ;;
66+ esac
67+ done
68+ compile_rpath="$flag"
69+
70+ flag=
71+ for libdir in $finalize_rpath; do
72+ case $(echo $libdir | ${SED} 's,/[/]*,/,g') in
73+ /usr/lib/* | /usr/lib32/* | /usr/lib64/* ) flag="$flag $libdir" ;;
74+ esac
75+ done
76+ finalize_rpath="$flag"
77+ fi
78+
79 for libdir in $compile_rpath $finalize_rpath; do
80 if test -n "$hardcode_libdir_flag_spec"; then
81 if test -n "$hardcode_libdir_separator"; then
82--
831.9.1
84