Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | There is no point in having "executable" binaries in the .libs |
| 2 | directory linked with different rpaths to the target which |
| 3 | could concivably be run on the build system when cross compiling. |
| 4 | |
| 5 | This patch removes the extra rpaths ($compile_rpath) so that the |
| 6 | output from the "link" stage can be used on the target. We can then |
| 7 | avoid having to "relink" during the install stage. |
| 8 | |
| 9 | This saves some build time (do_install is over 2 minutes faster for |
| 10 | pulseaudio). |
| 11 | |
| 12 | This patch also removes an annoying "seems to be moved" warning |
| 13 | which is totally bogus in the sysroot case. |
| 14 | |
| 15 | Upstream-Status: Inappropriate [upstream are unlikely to take a patch like this] |
| 16 | |
| 17 | RP 2011/11/16 |
| 18 | |
| 19 | Updated by: Robert Yang <liezhi.yang@windriver.com> |
| 20 | |
| 21 | diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in |
| 22 | --- a/build-aux/ltmain.in |
| 23 | +++ b/build-aux/ltmain.in |
| 24 | @@ -2355,7 +2355,7 @@ func_mode_install () |
| 25 | dir=$func_dirname_result |
| 26 | func_append dir "$objdir" |
| 27 | |
| 28 | - if test -n "$relink_command"; then |
| 29 | + if test "$fast_install" = no && test -n "$relink_command"; then |
| 30 | # Strip any trailing slash from the destination. |
| 31 | func_stripname '' '/' "$libdir" |
| 32 | destlibdir=$func_stripname_result |
| 33 | @@ -2394,7 +2394,7 @@ func_mode_install () |
| 34 | shift |
| 35 | |
| 36 | srcname=$realname |
| 37 | - test -n "$relink_command" && srcname=${realname}T |
| 38 | + test "$fast_install" = no && test -n "$relink_command" && srcname="$realname"T |
| 39 | |
| 40 | # Install the shared library and build the symlinks. |
| 41 | func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ |
| 42 | @@ -6162,15 +6162,15 @@ func_mode_link () |
| 43 | # Hardcode the library path. |
| 44 | # Skip directories that are in the system default run-time |
| 45 | # search path. |
| 46 | - case " $sys_lib_dlsearch_path " in |
| 47 | - *" $absdir "*) ;; |
| 48 | - *) |
| 49 | - case "$compile_rpath " in |
| 50 | - *" $absdir "*) ;; |
| 51 | - *) func_append compile_rpath " $absdir" ;; |
| 52 | - esac |
| 53 | - ;; |
| 54 | - esac |
| 55 | + #case " $sys_lib_dlsearch_path " in |
| 56 | + #*" $absdir "*) ;; |
| 57 | + #*) |
| 58 | + # case "$compile_rpath " in |
| 59 | + # *" $absdir "*) ;; |
| 60 | + # *) func_append compile_rpath " $absdir" ;; |
| 61 | + # esac |
| 62 | + # ;; |
| 63 | + #esac |
| 64 | case " $sys_lib_dlsearch_path " in |
| 65 | *" $libdir "*) ;; |
| 66 | *) |
| 67 | @@ -6236,15 +6236,15 @@ func_mode_link () |
| 68 | # Hardcode the library path. |
| 69 | # Skip directories that are in the system default run-time |
| 70 | # search path. |
| 71 | - case " $sys_lib_dlsearch_path " in |
| 72 | - *" $absdir "*) ;; |
| 73 | - *) |
| 74 | - case "$compile_rpath " in |
| 75 | - *" $absdir "*) ;; |
| 76 | - *) func_append compile_rpath " $absdir" ;; |
| 77 | - esac |
| 78 | - ;; |
| 79 | - esac |
| 80 | + #case " $sys_lib_dlsearch_path " in |
| 81 | + #*" $absdir "*) ;; |
| 82 | + #*) |
| 83 | + # case "$compile_rpath " in |
| 84 | + # *" $absdir "*) ;; |
| 85 | + # *) func_append compile_rpath " $absdir" ;; |
| 86 | + # esac |
| 87 | + # ;; |
| 88 | + #esac |
| 89 | case " $sys_lib_dlsearch_path " in |
| 90 | *" $libdir "*) ;; |
| 91 | *) |
| 92 | @@ -6590,8 +6590,8 @@ func_mode_link () |
| 93 | eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` |
| 94 | test -z "$libdir" && \ |
| 95 | func_fatal_error "'$deplib' is not a valid libtool archive" |
| 96 | - test "$absdir" != "$libdir" && \ |
| 97 | - func_warning "'$deplib' seems to be moved" |
| 98 | + #test "$absdir" != "$libdir" && \ |
| 99 | + # func_warning "'$deplib' seems to be moved" |
| 100 | |
| 101 | path=-L$absdir |
| 102 | fi |