[jhalfs] 01/03: Pass sanitized MAKEFLAGS to scriptlets

"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.automated
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch xry111/parallelism
in repository jhalfs.

commit 078ef3cf122130dfc69fd1c1948a5583104986ce
Author: Pierre Labastie <[email protected]>
AuthorDate: Fri Nov 17 13:18:12 2023 +0100

    Pass sanitized MAKEFLAGS to scriptlets
    
    Now that we have MAKEFLAGS in the environment, "make" in chroot
    is run with MAKEFLAGS set. This cause it to pass the -j value
    into MAKEFLAGS to inferiors (scriptlets), but it is passed with
    a --jobserver-auth value added. If we do not precede the command
    running the scriptlet with a +, it passes --jobserver-auth=-2,-2
    meaning that the jobserver is disabled, and "make" in the scriptlet
    understands that it should only run one job at a time (defeating
    the value of the -j flag). But even if we do precede the command
    running the scriptlet with a +, it passes --jobserver-auth=3,4,
    which shows it is running, but this jobserver will authorize only
    one job at a time since the parent make contains the target
    .NOTPARALLEL!
    To work around this problem, tje only solution is to change the
    MAKEFLAGS at the beginning of the scriptlet. Fortunately, lfs.xsl
    knows what we want as job number (either $(nproc) or a fixed number),
    so use it to set MAKEFLAGS.
---
 LFS/lfs.xsl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl
index 49fbdf2..26982b0 100644
--- a/LFS/lfs.xsl
+++ b/LFS/lfs.xsl
@@ -1249,6 +1249,11 @@ tar -xf $PACKAGE
 cd $PKGDIR
 </xsl:text>
     </xsl:if>
+    <xsl:text>
+export MAKEFLAGS="-j</xsl:text>
+    <xsl:value-of select="$jobs"/>
+    <xsl:text>"
+</xsl:text>
     <xsl:text>SECONDS=${PREV_SEC}
 
 # Start of LFS book script

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.