Module Name: src
Committed By: martin
Date: Sun May 28 09:49:03 UTC 2023
Modified Files:
src/external/gpl3/gcc/usr.bin/host-libcpp [netbsd-10]: Makefile
src/tools [netbsd-10]: Makefile.gnuhost
Log Message:
Pull up following revision(s) (requested by lukem in ticket #177):
tools/Makefile.gnuhost: revision 1.56
external/gpl3/gcc/usr.bin/host-libcpp/Makefile: revision 1.6
Fix passing -j NNN to gmake
Use a more restrictive pattern to extract -j NNN from MAKEFLAGS
into GMAKE_J_ARGS, to avoid false positives when the source directory
has "-j" in the path (e.g "amd64-job-000012" or "src-j9999").
Previously this could pass either -"-j" or "-j BIGNUM" to gmake
and result in "vfork: Resource temporarily unavailable" failures.
PR misc/54456
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.6.1 \
src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile
cvs rdiff -u -r1.54 -r1.54.2.1 src/tools/Makefile.gnuhost
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile
diff -u src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile:1.5 src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile:1.5.6.1
--- src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile:1.5 Wed Jun 24 05:06:08 2020
+++ src/external/gpl3/gcc/usr.bin/host-libcpp/Makefile Sun May 28 09:49:03 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2020/06/24 05:06:08 rin Exp $
+# $NetBSD: Makefile,v 1.5.6.1 2023/05/28 09:49:03 martin Exp $
BUILD_ENV= \
AR=${HOST_AR:Q} \
@@ -19,7 +19,7 @@ BUILD_ENV= \
RANLIB=${HOST_RANLIB:Q} \
YACC=${YACC:Q}
-GMAKE_J_ARGS?= ${MAKEFLAGS:[*]:M*-j*:C/.*(-j ?[0-9]*).*/\1/W}
+GMAKE_J_ARGS?= ${MAKEFLAGS:[*]:M*-j*:C/(^|.* )(-j ?[0-9][0-9]*).*/\2/W}
BUILD_COMMAND= /usr/bin/env -i ${BUILD_ENV} ${TOOL_GMAKE} ${GMAKE_J_ARGS} -e
libcpp/libcpp.a:
Index: src/tools/Makefile.gnuhost
diff -u src/tools/Makefile.gnuhost:1.54 src/tools/Makefile.gnuhost:1.54.2.1
--- src/tools/Makefile.gnuhost:1.54 Sun Aug 29 08:36:00 2021
+++ src/tools/Makefile.gnuhost Sun May 28 09:49:03 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.gnuhost,v 1.54 2021/08/29 08:36:00 rillig Exp $
+# $NetBSD: Makefile.gnuhost,v 1.54.2.1 2023/05/28 09:49:03 martin Exp $
#
# Rules used when building a GNU host package. Expects MODULE to be set.
#
@@ -100,7 +100,7 @@ BUILD_COMMAND= ${BUILD_ENV} ${MAKE} ${MA
# gmake version of this puts MAKE_ARGS in the environment to be sure that
# sub-gmake's get them, otherwise tools/gcc tries to build libgcc and
# fails. it also uses "env -i" to entirely clear out MAKEFLAGS.
-GMAKE_J_ARGS?= ${MAKEFLAGS:[*]:M*-j*:C/.*(-j ?[0-9]*).*/\1/W}
+GMAKE_J_ARGS?= ${MAKEFLAGS:[*]:M*-j*:C/(^|.* )(-j ?[0-9][0-9]*).*/\2/W}
BUILD_COMMAND= /usr/bin/env -i ${BUILD_ENV} ${MAKE_ARGS:N-*} ${TOOL_GMAKE} ${GMAKE_J_ARGS} -e ${MAKE_ARGS}
.endif