Fix MAKEFLAGS for binutils-pass1

We need a special case for binutils-pass1 in case REALSBU is set
to y. Use variables JOBSBP1 in shell and jobs-bp1 in .xsl.
This commit is contained in:
Pierre Labastie 2023-11-17 15:55:36 +01:00
parent da4bce358d
commit a9360e10a7
2 changed files with 14 additions and 2 deletions

View file

@ -31,6 +31,9 @@
<!-- Parallelism (LFS >= 12.1) --> <!-- Parallelism (LFS >= 12.1) -->
<xsl:param name="jobs" select="1"/> <xsl:param name="jobs" select="1"/>
<!-- value of jobs for binutils-pass1 -->
<xsl:param name="jobs-bp1" select="1"/>
<!-- Install non wide character ncurses 5? --> <!-- Install non wide character ncurses 5? -->
<xsl:param name="ncurses5" select="'n'"/> <xsl:param name="ncurses5" select="'n'"/>
@ -1251,7 +1254,14 @@ cd $PKGDIR
</xsl:if> </xsl:if>
<xsl:text> <xsl:text>
export MAKEFLAGS="-j</xsl:text> export MAKEFLAGS="-j</xsl:text>
<xsl:value-of select="$jobs"/> <xsl:choose>
<xsl:when test="@id='ch-tools-binutils-pass1'">
<xsl:value-of select="$jobs-bp1"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$jobs"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>" <xsl:text>"
</xsl:text> </xsl:text>
<xsl:text>SECONDS=${PREV_SEC} <xsl:text>SECONDS=${PREV_SEC}

View file

@ -67,8 +67,9 @@ extract_commands() { #
JOBS="\$(nproc)" JOBS="\$(nproc)"
else else
JOBS="$N_PARALLEL" JOBS="$N_PARALLEL"
fi fi
if [ "REALSBU" = y ]; then JOBSBP1=1; else JOBSBP1="$JOBS"; fi
# First profile the book, for revision and arch. Note that # First profile the book, for revision and arch. Note that
# MULTIBLIB is set to "default" if pure 64 bit book. In this case, # MULTIBLIB is set to "default" if pure 64 bit book. In this case,
# profiling on arch is useless, but does not hurt either. # profiling on arch is useless, but does not hurt either.
@ -109,6 +110,7 @@ extract_commands() { #
--stringparam log-level "$LOG_LEVEL" \ --stringparam log-level "$LOG_LEVEL" \
--stringparam script-root "$SCRIPT_ROOT" \ --stringparam script-root "$SCRIPT_ROOT" \
--stringparam jobs "$JOBS" \ --stringparam jobs "$JOBS" \
--stringparam jobs-bp1 "$JOBSBP1" \
--output "./${COMMANDS}/" \ --output "./${COMMANDS}/" \
$XSL \ $XSL \
prbook.xml >> $LOGDIR/$LOG 2>&1 prbook.xml >> $LOGDIR/$LOG 2>&1