When using 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. -Khem Raj Adapted to libtool-2.4.6 build-aux/ltmain.in Jürgen Buchmüller --- build-aux/ltmain.in 2015-02-06 13:57:56.000000000 +0100 +++ build-aux/ltmain.in 2015-10-20 13:40:29.959988582 +0200 @@ -6456,7 +6456,7 @@ 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