]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Don't omit directories from the constructed rpath.
authorSergey Poznyakoff <gray@gnu.org>
Wed, 9 Oct 2024 18:34:01 +0000 (21:34 +0300)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Thu, 10 Oct 2024 14:15:18 +0000 (17:15 +0300)
This fixes bug introduced by 0e1b333324.

* build-aux/ltmain.in: Don't omit paths that are not under $progdir
from the compiled_rpath.  Append them to the end of it.

build-aux/ltmain.in

index 68aca6051294a5b5c6f77d7e960ec38ff440fc9b..2c486fa7020719ebbd156f02a19735d01ca05854 100644 (file)
@@ -4632,6 +4632,7 @@ func_mode_link ()
     finalize_command=$nonopt
 
     compile_rpath=
+    compile_rpath_tail=
     finalize_rpath=
     compile_shlibpath=
     finalize_shlibpath=
@@ -6273,10 +6274,11 @@ func_mode_link ()
            case " $sys_lib_dlsearch_path " in
            *" $absdir "*) ;;
            *)
-             case "$compile_rpath " in
+             case "$compile_rpath$compile_rpath_tail " in
              *" $absdir "*) ;;
              *) case $absdir in
                  "$progdir/"*) func_append compile_rpath " $absdir" ;;
+                 *) func_append compile_rpath_tail " $absdir" ;;
                 esac
              esac
              ;;
@@ -6349,10 +6351,11 @@ func_mode_link ()
            case " $sys_lib_dlsearch_path " in
            *" $absdir "*) ;;
            *)
-             case "$compile_rpath " in
+             case "$compile_rpath$compile_rpath_tail " in
              *" $absdir "*) ;;
              *) case $absdir in
                  "$progdir/"*) func_append compile_rpath " $absdir" ;;
+                 *) func_append compile_rpath_tail " $absdir" ;;
                 esac
              esac
              ;;
@@ -6716,6 +6719,8 @@ func_mode_link ()
       done # for deplib in $libs
 
       func_append temp_rpath "$temp_rpath_tail"
+      func_append compile_rpath "$compile_rpath_tail"
+
       if test link = "$pass"; then
        if test prog = "$linkmode"; then
          compile_deplibs="$new_inherited_linker_flags $compile_deplibs"