]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
ltmain.in: Add missing sysroot to library path
authorKhem Raj <raj.khem@gmail.com>
Sat, 16 Apr 2022 17:58:21 +0000 (18:58 +0100)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Thu, 30 May 2024 14:43:15 +0000 (17:43 +0300)
When using a sysroot we should append it to libdir, which is helpful in
cross builds as the system is staged in the sysroot. For normal builds,
i.e. when lt_sysroot is not set, it will still behave the same and add
-L/usr/lib to the relink command.

* build-aux/ltmain.in: Prepend sysroot to libdir.

build-aux/ltmain.in

index 7e096a1a5a271f941cc2fb6bfcefc8e601c39cc7..3521883028b113ce5f156a16708a6acd5f0df82c 100644 (file)
@@ -6508,7 +6508,7 @@ func_mode_link ()
              fi
            else
              # We cannot seem to hardcode it, guess we'll fake it.
-             add_dir=-L$libdir
+             add_dir=-L$lt_sysroot$libdir
              # Try looking first in the location we're being installed to.
              if test -n "$inst_prefix_dir"; then
                case $libdir in