--- ltmain.sh 2011-10-17 03:19:35.000000000 -0700 +++ ltmain.sh.new 2016-01-20 04:21:47.653255999 -0800 @@ -6901,7 +6901,7 @@ test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" + add_dir="-L$lt_sysroot/$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in @@ -6918,7 +6918,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