[OpenWrt-Devel] [PATCH] Fix parallel build of lzo package

Raphaël HUCK raphael.huck at efixo.com
Fri Jan 29 09:59:57 CET 2010


Le Thu, 28 Jan 2010 19:52:00 +0100,
Felix Fietkau <nbd at openwrt.org> a écrit :

> On 2010-01-28 5:35 PM, Raphaël HUCK wrote:
> > Hi all,
> > 
> > Several packages cannot be built in parallel.
> > 
> > This patch fixes this for the lzo package.
> I don't really see the connection between your changes (which do look
> correct) and parallel building. Could you please explain that a bit?

In order to build faster (on a octocore for example :) ) it is possible
to enable parallel building of packages (which is not the case by
default) by changing the follonwing line in include/package.mk:

	override MAKEFLAGS=

to

	override MAKEFLAGS=$(MAKE_JOBS)


Then the following make command in lzo package:

	$(MAKE) -C $(PKG_BUILD_DIR) \
		CFLAGS_O="$(TARGET_CFLAGS)" \
		DESTDIR="$(PKG_INSTALL_DIR)" \
		all install

will build the "all" and "install" rules in parallel, which will fail.

So in order to fix this you can either do:

	$(MAKE) -C $(PKG_BUILD_DIR) \
		CFLAGS_O="$(TARGET_CFLAGS)" \
		DESTDIR="$(PKG_INSTALL_DIR)" \
		all

	$(MAKE) -C $(PKG_BUILD_DIR) \
		CFLAGS_O="$(TARGET_CFLAGS)" \
		DESTDIR="$(PKG_INSTALL_DIR)" \
		install

or (as in the patch):

PKG_INSTALL:=1

MAKE_ARGS += CFLAGS_O="$(TARGET_CFLAGS)"

as default rules in OpenWrt will serialize all and install rules.

Other patches to fix parallel building can be found here:

* Update ntfs-3g to 2010.1.16 and fix parallel build
https://dev.openwrt.org/ticket/6577

* Fix libol package parallel build
https://dev.openwrt.org/ticket/6588

* Fix clearsilver parallel build, don't install static libraries
https://dev.openwrt.org/ticket/6592

* Fix libinklevel parallel build
https://dev.openwrt.org/ticket/6593

Thanks,

-Raphaël
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20100129/53e2c64f/attachment.pgp>


More information about the openwrt-devel mailing list