All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@impinj.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/3] package/dvb-apps: is not parallel-safe
Date: Tue, 28 Nov 2017 19:09:03 +0000	[thread overview]
Message-ID: <1511896142.9792.8.camel@impinj.com> (raw)
In-Reply-To: <87r2sj9vx9.fsf@dell.be.48ers.dk>

On Mon, 2017-11-27 at 23:52 +0100, Peter Korsgaard wrote:
> > > > > > "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> 
>  > This is invisible because the timings make it excessively difficult to
>  > hit, but the Makefile is inherently flawed for parallel build, as it
>  > contains:
> 
>  >     $(objects): atsc_psip_section.c atsc_psip_section.h
> 
>  >     atsc_psip_section.c atsc_psip_section.h:
>  >         perl section_generate.pl atsc_psip_section.pl
> 
>  > and the perl script section_generate.pl will create both the .c and .h
>  > files in one go, but given the construct above, there can be two such
>  > script that run in parallel, which can clobber the generated .c and/or
>  > .h files.

I gather this is the common parallel build issue with a recipe that
produces two outputs. This can be fixed by using a pattern rule for the
recipe that produces multiple outputs.

%section.c %section.h: %section.pl
	perl section_generate.pl $<

GNU make understands a pattern rule that produces multiple outputs to
produce all of them via a single running of the rule.

Seems like a simple patch.

  reply	other threads:[~2017-11-28 19:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 10:48 [Buildroot] [PATCH 0/3] package/dvb-apps: misc fixes Yann E. MORIN
2017-11-27 10:48 ` [Buildroot] [PATCH 1/3] package/dvb-apps: fix build with some perl version Yann E. MORIN
2017-11-27 11:39   ` Baruch Siach
2017-11-27 11:51     ` Yann E. MORIN
2017-11-27 22:53   ` Peter Korsgaard
2017-11-27 10:48 ` [Buildroot] [PATCH 2/3] package/dvb-apps: is not parallel-safe Yann E. MORIN
2017-11-27 22:52   ` Peter Korsgaard
2017-11-28 19:09     ` Trent Piepho [this message]
2017-11-27 10:48 ` [Buildroot] [PATCH 3/3] package/dvb-apps: fix build with kernel headers >= 4.14 Yann E. MORIN
2017-11-27 20:33 ` [Buildroot] [PATCH 0/3] package/dvb-apps: misc fixes Thomas Petazzoni

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=1511896142.9792.8.camel@impinj.com \
    --to=tpiepho@impinj.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.