Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | build/ltmain.sh | 32 +++++++++++++++++++++++++++----- |
| 2 | 1 file changed, 27 insertions(+), 5 deletions(-) |
| 3 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 4 | Index: httpd-2.4.29/build/ltmain.sh |
| 5 | =================================================================== |
| 6 | --- httpd-2.4.29.orig/build/ltmain.sh |
| 7 | +++ httpd-2.4.29/build/ltmain.sh |
| 8 | @@ -6969,7 +6969,7 @@ func_mode_link () |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 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" && \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 17 | @@ -8167,7 +8167,7 @@ func_mode_link () |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 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. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 26 | @@ -8434,7 +8434,7 @@ func_mode_link () |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 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 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 35 | @@ -9086,7 +9086,8 @@ func_mode_link () |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 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 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 45 | @@ -9534,7 +9535,7 @@ EOF |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 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= |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 54 | @@ -10272,6 +10273,27 @@ EOF |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 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 |