From 77c2971d24e943160589cc604d655c9858e4d36b Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 11 Dec 2018 18:14:02 +0000 Subject: Passing -j build options to dependency building bottle-necks Some host Make systems may not allow automatic passing of the number of threads to sub-Makes. So while building the basic dependencies, we'll need to explicity add the `-j' option to the Make files that can benefit most from it: those that are dependencies of many others (Tar & Make), or are the last to build (Coreutils). --- reproduce/src/make/dependencies-basic.mk | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'reproduce') diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk index bedf0a0..a852ae0 100644 --- a/reproduce/src/make/dependencies-basic.mk +++ b/reproduce/src/make/dependencies-basic.mk @@ -281,7 +281,11 @@ $(ibdir)/tar: $(tdir)/tar-$(tar-version).tar.gz \ $(ibdir)/lzip \ $(ibdir)/gzip \ $(ibdir)/xz - $(call gbuild, $<, tar-$(tar-version)) + # Since all later programs depend on Tar, the pipeline will be + # stuck here, only making Tar. So its more efficient to built it on + # multiple threads (when the user's Make doesn't pass down the + # number of threads). + $(call gbuild, $<, tar-$(tar-version), , , -j$(numthreads)) @@ -300,7 +304,8 @@ $(ibdir)/tar: $(tdir)/tar-$(tar-version).tar.gz \ # second. So, we'll have to build it dynamically for now. $(ibdir)/make: $(tdir)/make-$(make-version).tar.lz \ $(ibdir)/tar - $(call gbuild, $<, make-$(make-version)) + # See Tar's comments for the `-j' option. + $(call gbuild, $<, make-$(make-version), , , -j$(numthreads)) @@ -401,9 +406,11 @@ $(ibdir)/grep: $(tdir)/grep-$(grep-version).tar.xz \ $(ibdir)/ls: $(tdir)/coreutils-$(coreutils-version).tar.xz \ $(ilidir)/openssl # Coreutils will use the hashing features of OpenSSL's `libcrypto'. + # See Tar's comments for the `-j' option. $(call gbuild, $<, coreutils-$(coreutils-version), static, \ LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ - --enable-rpath --disable-silent-rules --with-openssl) + --enable-rpath --disable-silent-rules --with-openssl, + -j$(numthreads)) $(ibdir)/pkg-config: $(tdir)/pkg-config-$(pkgconfig-version).tar.gz \ $(ibdir)/make -- cgit v1.2.1