Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] perl: use parallel build where possible
@ 2018-03-02 15:32 Alexander Kanavin
  2018-03-03  8:53 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2018-03-02 15:32 UTC (permalink / raw)
  To: openembedded-core

While the upstream just runs a number of make tasks hardcoded to a single thread
in succession, we can add '-j n_threads' to a few of them. The benefit
is real: on my machine the do_compile() time goes from 250 seconds to about 90.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/recipes-devtools/perl/perl_5.24.1.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/perl/perl_5.24.1.bb b/meta/recipes-devtools/perl/perl_5.24.1.bb
index f13a63a80a3..67cc8d668db 100644
--- a/meta/recipes-devtools/perl/perl_5.24.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.24.1.bb
@@ -184,6 +184,11 @@ do_compile() {
         # Fix to avoid recursive substitution of path
         sed -i -e 's|(@libpath, ".*"|(@libpath, "${STAGING_LIBDIR}"|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
 
+        # Build auxillary make targets (more/more2/more3/more4) in parallel.
+        # Unfortunately the core target will race, and so remains single-threaded.
+        # Still, this cuts do_compile() time from 250 seconds to about 90.
+        sed -i -e 's, more, ${PARALLEL_MAKE} more,g' Cross/Makefile
+
         cd Cross
         oe_runmake perl LD="${CCLD}"
 }
-- 
2.15.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-05 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-02 15:32 [PATCH] perl: use parallel build where possible Alexander Kanavin
2018-03-03  8:53 ` Richard Purdie
2018-03-05 14:03   ` Alexander Kanavin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox