Patchwork dnsmasq: fix parallel make failure

login
register
mail settings
Submitter Shrikant Bobade
Date Aug. 1, 2014, 1:46 p.m.
Message ID <1406900794-19878-1-git-send-email-bobadeshrikant@gmail.com>
Download mbox | patch
Permalink /patch/77117/
State New
Headers show

Comments

Shrikant Bobade - Aug. 1, 2014, 1:46 p.m.
From: Shrikant Bobade <Shrikant_Bobade@mentor.com>

The dnsmasq target depends on .configured and $(objs). .configured does an rm
-f *.o. Yet the only thing telling make to build the .configured target before
the $(objs) target was the order of the dependencies of the dnsmasq target. We
can't rely on that order when doing a paralllel make build, so add an explicit
rule to enforce that order.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
---
 .../recipes-support/dnsmasq/dnsmasq.inc            |    1 +
 .../dnsmasq/files/parallel-make.patch              |   18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 meta-networking/recipes-support/dnsmasq/files/parallel-make.patch
Richard Purdie - Aug. 4, 2014, 8:54 a.m.
On Fri, 2014-08-01 at 19:16 +0530, Shrikant Bobade wrote:
> From: Shrikant Bobade <Shrikant_Bobade@mentor.com>
> 
> The dnsmasq target depends on .configured and $(objs). .configured does an rm
> -f *.o. Yet the only thing telling make to build the .configured target before
> the $(objs) target was the order of the dependencies of the dnsmasq target. We
> can't rely on that order when doing a paralllel make build, so add an explicit
> rule to enforce that order.
> 
> Signed-off-by: Christopher Larson <kergoth@gmail.com>
> Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
> ---
>  .../recipes-support/dnsmasq/dnsmasq.inc            |    1 +
>  .../dnsmasq/files/parallel-make.patch              |   18 ++++++++++++++++++
>  2 files changed, 19 insertions(+)
>  create mode 100644 meta-networking/recipes-support/dnsmasq/files/parallel-make.patch


Should be to the oe-devel list, not oe-core...

Cheers,

Richard
Shrikant Bobade - Aug. 4, 2014, 9:04 a.m.
Thanks Richard,

Pushing it to oe-devel list..

Thanks
Shrikant


On Mon, Aug 4, 2014 at 2:24 PM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Fri, 2014-08-01 at 19:16 +0530, Shrikant Bobade wrote:
> > From: Shrikant Bobade <Shrikant_Bobade@mentor.com>
> >
> > The dnsmasq target depends on .configured and $(objs). .configured does
> an rm
> > -f *.o. Yet the only thing telling make to build the .configured target
> before
> > the $(objs) target was the order of the dependencies of the dnsmasq
> target. We
> > can't rely on that order when doing a paralllel make build, so add an
> explicit
> > rule to enforce that order.
> >
> > Signed-off-by: Christopher Larson <kergoth@gmail.com>
> > Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
> > ---
> >  .../recipes-support/dnsmasq/dnsmasq.inc            |    1 +
> >  .../dnsmasq/files/parallel-make.patch              |   18
> ++++++++++++++++++
> >  2 files changed, 19 insertions(+)
> >  create mode 100644
> meta-networking/recipes-support/dnsmasq/files/parallel-make.patch
>
>
> Should be to the oe-devel list, not oe-core...
>
> Cheers,
>
> Richard
>
>

Patch

diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
index e57ab72..1955d6f 100644
--- a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
+++ b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
@@ -11,6 +11,7 @@  SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV
            file://init \
            file://dnsmasq.conf \
            file://dnsmasq.service \
+           file://parallel-make.patch \
 "
 
 inherit update-rc.d systemd
diff --git a/meta-networking/recipes-support/dnsmasq/files/parallel-make.patch b/meta-networking/recipes-support/dnsmasq/files/parallel-make.patch
new file mode 100644
index 0000000..3d1040c
--- /dev/null
+++ b/meta-networking/recipes-support/dnsmasq/files/parallel-make.patch
@@ -0,0 +1,18 @@ 
+The dnsmasq target depends on .configured and $(objs). .configured does an rm
+-f *.o. Yet the only thing telling make to build the .configured target before
+the $(objs) target was the order of the dependencies of the dnsmasq target. We
+can't rely on that order when doing a paralllel make build, so add an explicit
+rule to enforce that order.
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+--- dnsmasq-2.68.orig/Makefile
++++ dnsmasq-2.68/Makefile
+@@ -139,6 +139,8 @@ bloatcheck : $(BUILDDIR)/dnsmasq_baselin
+	@rm -f *.o
+	@touch $@
+
++$(objs): .configured
++
+ $(objs:.o=.c) $(hdrs):
+	ln -s $(top)/$(SRC)/$@ .