* [Buildroot] [PATCH] toolchain: speed up sysroot lib copying
@ 2010-12-12 16:25 Mike Frysinger
2010-12-13 21:26 ` Thomas Petazzoni
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Mike Frysinger @ 2010-12-12 16:25 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
toolchain/helpers.mk | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 05d43e7..674e7b4 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -24,7 +24,10 @@ copy_toolchain_lib_root = \
STRIP="$(strip $4)"; \
\
LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
- find -L . -path "./lib/$${LIB}.*" -o \
+ find -L \
+ ./lib/ ./usr/lib/ ./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/ \
+ -maxdepth 1 \
+ -path "./lib/$${LIB}.*" -o \
-path "./usr/lib/$${LIB}.*" -o \
-path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
)` ; \
--
1.7.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] toolchain: speed up sysroot lib copying
2010-12-12 16:25 [Buildroot] [PATCH] toolchain: speed up sysroot lib copying Mike Frysinger
@ 2010-12-13 21:26 ` Thomas Petazzoni
2010-12-13 22:10 ` Mike Frysinger
2010-12-13 22:23 ` Lionel Landwerlin
2010-12-14 20:59 ` [Buildroot] [PATCH v2] " Mike Frysinger
2 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2010-12-13 21:26 UTC (permalink / raw)
To: buildroot
On Sun, 12 Dec 2010 11:25:20 -0500
Mike Frysinger <vapier@gentoo.org> wrote:
> 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.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> toolchain/helpers.mk | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index 05d43e7..674e7b4 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -24,7 +24,10 @@ copy_toolchain_lib_root = \
> STRIP="$(strip $4)"; \
> \
> LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
> - find -L . -path "./lib/$${LIB}.*" -o \
> + find -L \
> + ./lib/ ./usr/lib/ ./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/ \
> + -maxdepth 1 \
> + -path "./lib/$${LIB}.*" -o \
> -path "./usr/lib/$${LIB}.*" -o \
> -path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
> )` ; \
Can't we replace the 3 -path conditions with a single -name "$${LIB}.*"
condition ?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] toolchain: speed up sysroot lib copying
2010-12-13 21:26 ` Thomas Petazzoni
@ 2010-12-13 22:10 ` Mike Frysinger
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2010-12-13 22:10 UTC (permalink / raw)
To: buildroot
On Monday, December 13, 2010 16:26:39 Thomas Petazzoni wrote:
> On Sun, 12 Dec 2010 11:25:20 -0500 Mike Frysinger wrote:
> > 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.
> >
> > diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> > index 05d43e7..674e7b4 100644
> > --- a/toolchain/helpers.mk
> > +++ b/toolchain/helpers.mk
> > @@ -24,7 +24,10 @@ copy_toolchain_lib_root = \
> >
> > LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
> > - find -L . -path "./lib/$${LIB}.*" -o \
> > + find -L \
> > + ./lib/ ./usr/lib/
./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/ \
> > + -maxdepth 1 \
> > + -path "./lib/$${LIB}.*" -o \
> >
> > -path "./usr/lib/$${LIB}.*" -o \
> > -path
"./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
> > )` ; \
>
> Can't we replace the 3 -path conditions with a single -name "$${LIB}.*"
> condition ?
sure, i can send an updated patch that does that
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101213/082589b2/attachment-0001.pgp>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] toolchain: speed up sysroot lib copying
2010-12-12 16:25 [Buildroot] [PATCH] toolchain: speed up sysroot lib copying Mike Frysinger
2010-12-13 21:26 ` Thomas Petazzoni
@ 2010-12-13 22:23 ` Lionel Landwerlin
2010-12-13 23:13 ` Mike Frysinger
2010-12-14 20:59 ` [Buildroot] [PATCH v2] " Mike Frysinger
2 siblings, 1 reply; 6+ messages in thread
From: Lionel Landwerlin @ 2010-12-13 22:23 UTC (permalink / raw)
To: buildroot
Le dimanche 12 d?cembre 2010 ? 11:25 -0500, Mike Frysinger a ?crit :
> LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
> - find -L . -path "./lib/$${LIB}.*" -o \
> + find -L \
> + ./lib/ ./usr/lib/ ./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/ \
> + -maxdepth 1 \
> + -path "./lib/$${LIB}.*" -o \
> -path "./usr/lib/$${LIB}.*" -o \
> -path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
> )` ; \
Aren't we missing the locales files here ?
Like this one :
/usr/share/locale/fr/LC_MESSAGES/libc.mo
(I might be wrong...)
Regards,
--
Lionel Landwerlin
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] toolchain: speed up sysroot lib copying
2010-12-13 22:23 ` Lionel Landwerlin
@ 2010-12-13 23:13 ` Mike Frysinger
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2010-12-13 23:13 UTC (permalink / raw)
To: buildroot
On Monday, December 13, 2010 17:23:05 Lionel Landwerlin wrote:
> Le dimanche 12 d?cembre 2010 ? 11:25 -0500, Mike Frysinger a ?crit :
> > LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
> >
> > - find -L . -path "./lib/$${LIB}.*" -o \
> > + find -L \
> > + ./lib/ ./usr/lib/
./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/ \
> > + -maxdepth 1 \
> > + -path "./lib/$${LIB}.*" -o \
> >
> > -path "./usr/lib/$${LIB}.*" -o \
> > -path
"./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
> >
> > )` ; \
>
> Aren't we missing the locales files here ?
>
> Like this one :
>
> /usr/share/locale/fr/LC_MESSAGES/libc.mo
the point of this is to copy just library files. the full sysroot copy
happens elsewhere.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101213/01d4f89a/attachment-0001.pgp>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH v2] toolchain: speed up sysroot lib copying
2010-12-12 16:25 [Buildroot] [PATCH] toolchain: speed up sysroot lib copying Mike Frysinger
2010-12-13 21:26 ` Thomas Petazzoni
2010-12-13 22:23 ` Lionel Landwerlin
@ 2010-12-14 20:59 ` Mike Frysinger
2 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2010-12-14 20:59 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
v2
- unify -path's too
toolchain/helpers.mk | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index d4caf48..3ea9075 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -22,9 +22,9 @@ 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 \
+ $(for d in lib* usr/lib* usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*; do test -e "$d" && echo $d) \
+ -maxdepth 1 -name "$${LIB}.*" \
)` ; \
for FILE in $${LIBS} ; do \
LIB=`basename $${FILE}`; \
--
1.7.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-12-14 20:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-12 16:25 [Buildroot] [PATCH] toolchain: speed up sysroot lib copying Mike Frysinger
2010-12-13 21:26 ` Thomas Petazzoni
2010-12-13 22:10 ` Mike Frysinger
2010-12-13 22:23 ` Lionel Landwerlin
2010-12-13 23:13 ` Mike Frysinger
2010-12-14 20:59 ` [Buildroot] [PATCH v2] " Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox