Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] jack2: use -j only when is PARALLEL_JOBS is defined
Date: Sun, 29 Mar 2015 15:17:06 +0200	[thread overview]
Message-ID: <20150329151706.7cdc6db6@free-electrons.com> (raw)
In-Reply-To: <1427614534-32460-1-git-send-email-fabio.porcedda@gmail.com>

Dear Fabio Porcedda,

On Sun, 29 Mar 2015 09:35:33 +0200, Fabio Porcedda wrote:
> When top-level parallel makefile is being used the PARALLEL_JOBS is
> empty but the build system of jack2 does not accept a -j without an
> argument so don't use the -j option when PARALLEL_JOBS is empty.

This is not quite true. PARALLEL_JOBS is empty because your
recommendation of using:

	make BR2_JLEVEL= -j$((`getconf _NPROCESSORS_ONLN`+1))

for top-level parallel build is maybe not the most appropriate one.

In addition, even when top-level parallel build is used, using purely
sequential build in each package may not be the good solution. Imagine
you have a number of packages to build, and one of them is particularly
long: if you don't build this package in parallel, the build time may
be increased.

So I believe that with the introduction of top-level parallel build, we
need a way of calculating a default reasonable BR2_JLEVEL, preferably
taking into account the make -jX value passed to the top-level make. We
indeed need to play on the number of jobs at the top-level, and the
number of jobs at the per-package level.

Also, your patch series does not handle all packages that use
$(PARALLEL_JOBS) :

package/boost/boost.mk: (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
package/boost/boost.mk: (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
package/boost/boost.mk: (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
package/boost/boost.mk: (cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -d+1 \
package/cmake/cmake.mk:                 --parallel=$(PARALLEL_JOBS) -- \
package/jack2/jack2.mk: (cd $(@D); $(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS))
package/midori/midori.mk:       (cd $(@D); $(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS))
package/qt/qt.mk:               MAKEFLAGS="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" ./configure \
package/qt5/qt5base/qt5base.mk:         MAKEFLAGS="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" \

We probably need to convert all of these to:

	$(if $(PARALLEL_JOBS),-j$(PARALLEL_JOBS))

like is done for the global $(MAKE) variable.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2015-03-29 13:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-29  7:35 [Buildroot] [PATCH 1/2] jack2: use -j only when is PARALLEL_JOBS is defined Fabio Porcedda
2015-03-29  7:35 ` [Buildroot] [PATCH 2/2] boost: " Fabio Porcedda
2015-03-29 13:17 ` Thomas Petazzoni [this message]
2015-04-01  7:23   ` [Buildroot] [PATCH 1/2] jack2: " Fabio Porcedda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150329151706.7cdc6db6@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox