summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-10-30 11:28:09 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-10-30 11:30:29 +0100
commitdf785d5861f601ec829f4ab1f40e259c8b4b42d4 (patch)
treeed903ec0400c8083153002453b0afe37009b2c9f
parent7b0b3500bb74938538356492eee1ef0223e5866a (diff)
downloadptxdist-df785d5861f601ec829f4ab1f40e259c8b4b42d4.tar.gz
ptxdist-df785d5861f601ec829f4ab1f40e259c8b4b42d4.tar.xz
ptxd_make_serialize_init: use --jobserver-auth if necessary
In make 4.2 --jobserver-fds was renamed to --jobserver-auth and is now a public command line option. Use the new option if it is recognized. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/lib/ptxd_make_serialize.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/lib/ptxd_make_serialize.sh b/scripts/lib/ptxd_make_serialize.sh
index ba3f1e168..3ea8e13b0 100644
--- a/scripts/lib/ptxd_make_serialize.sh
+++ b/scripts/lib/ptxd_make_serialize.sh
@@ -47,12 +47,16 @@ export -f ptxd_make_serialize_setup
ptxd_make_serialize_init() {
local num="${PTXDIST_PARALLELMFLAGS#-j}"
- local sync mflags
+ local sync mflags jobserver
if [ -n "${num}" ]; then
ptxd_make_serialize_setup global "${num}" || return
sync="${PTXDIST_OUTPUT_SYNC:+${PTXDIST_OUTPUT_SYNC}recurse}"
- mflags="${sync} -j --jobserver-fds=${ptxd_make_serialize_global_readfd},${ptxd_make_serialize_global_writefd}"
+ jobserver="--jobserver-auth"
+ if ! "${PTXCONF_SETUP_HOST_MAKE}" ${jobserver}=42,43 --help >& /dev/null; then
+ jobserver="-j --jobserver-fds"
+ fi
+ mflags="${sync} ${jobserver}=${ptxd_make_serialize_global_readfd},${ptxd_make_serialize_global_writefd}"
PTXDIST_PARALLELMFLAGS_INTERN="${mflags}"
PTXDIST_PARALLELMFLAGS_EXTERN="${mflags}"
else