From: Mike Frysinger Date: Sun, 9 Oct 2011 17:44:32 +0000 (+0200) Subject: toolchain: speed up sysroot lib copying X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da6353c9e7e6e6accfe72ee4cb5165bdf580b18a;p=buildroot.git toolchain: speed up sysroot lib copying The copy_toolchain_lib_root helper searches the entire sysroot, but is only interested in files in certain subdirs. So rather than waste time in walking the entire tree, walk the few subdirs at the depth level we are actually going to be poaching files from. Some simplification suggested by Yann E. MORIN and Arnout Vandecappelle , added by Thomas Petazzoni . Signed-off-by: Mike Frysinger Reviewed-by: "Yann E. MORIN" Signed-off-by: Peter Korsgaard --- diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index 7f3efaa40d..5585f45fe3 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -22,9 +22,8 @@ copy_toolchain_lib_root = \ DESTDIR="$(strip $3)" ; \ \ LIBS=`(cd $${ARCH_SYSROOT_DIR}; \ - find -L . -path "./lib/$${LIB}.*" -o \ - -path "./usr/lib/$${LIB}.*" -o \ - -path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \ + find -L lib* usr/lib* usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib* \ + -maxdepth 1 -name "$${LIB}.*" 2>/dev/null \ )` ; \ for FILE in $${LIBS} ; do \ LIB=`basename $${FILE}`; \