[Buildroot] [PATCH 9/9] toolchain: speed up sysroot lib copying

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Sun Oct 9 21:46:21 UTC 2011


Thomas, All,

On Sunday 09 October 2011 19:44:32 Thomas Petazzoni wrote:
> From: Mike Frysinger <vapier at gentoo.org>
> 
> 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
> <yann.morin.1998 at anciens.enib.fr> and Arnout Vandecappelle
> <arnout at mind.be>, added by Thomas Petazzoni
> <thomas.petazzoni at free-electrons.com>.
> 
> Signed-off-by: Mike Frysinger <vapier at gentoo.org>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998 at anciens.enib.fr>

BTW, what's the policy when replying: should I also CC: Mike, as he's
the original author, or just the person that submitted the patch?

Regards,
Yann E. MORIN.

> ---
>  toolchain/helpers.mk |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index 7f3efaa..5585f45 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}`; \
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list