aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-12-11 18:14:02 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-12-11 18:16:41 +0000
commit77c2971d24e943160589cc604d655c9858e4d36b (patch)
tree5c5bb96734c945d4d0339ddf14cc2fd08730b50b /reproduce
parent66f12c0305aeb2e8ac046fd866d75bd6e16e8a42 (diff)
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).
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/src/make/dependencies-basic.mk13
1 files changed, 10 insertions, 3 deletions
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