Le Thu, 28 Jan 2010 19:52:00 +0100,
Felix Fietkau <[email protected]> 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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to