diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index 02cc0bb174..ee878e89a1 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -55,13 +55,13 @@ copy_toolchain_lib_root = \ $${ARCH_SYSROOT_DIR}/$${ARCH_LIB_DIR} \ $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \ $${SUPPORT_LIB_DIR} ; do \ - LIBSPATH=`find $${dir} -maxdepth 1 -name "$${LIB}" 2>/dev/null` ; \ - if test -n "$${LIBSPATH}" ; then \ + LIBPATHS=`find $${dir} -maxdepth 1 -name "$${LIB}" 2>/dev/null` ; \ + if test -n "$${LIBPATHS}" ; then \ break ; \ fi \ done ; \ mkdir -p $(TARGET_DIR)/$${DESTDIR}; \ - for LIBPATH in $${LIBSPATH} ; do \ + for LIBPATH in $${LIBPATHS} ; do \ while true ; do \ LIBNAME=`basename $${LIBPATH}`; \ LIBDIR=`dirname $${LIBPATH}` ; \