Nimbin[12]?Mirrors & Forks / jhalfs / commits / a9360e1

jhalfs git · trunk

jhalfs LFS build automation (mirror)

lfs mirror bash · first commit 2005-09-11 · last commit 2024-02-13 (2 years ago) · synced 3 days ago · upstream: git.linuxfromscratch.org/jhalfs

Python 78.4% Shell 19.8% Makefile 1.8%
git clone https://git.christianimmanuel.de/mirrors-forks/jhalfs.gitwget https://git.christianimmanuel.de/mirrors-forks/jhalfs/archive/jhalfs.tar.gz

Fix MAKEFLAGS for binutils-pass1

Pierre Labastie · 2023-11-17 14:55 · a9360e10a757f6832b631c9ee4ae3bbe7e500f75

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.
 LFS/lfs.xsl                  | 12 +++++++++++-
 common/libs/func_book_parser |  4 +++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl
index 26982b0..d96aa60 100644
--- a/LFS/lfs.xsl
+++ b/LFS/lfs.xsl
@@ -31,6 +31,9 @@
   <!-- Parallelism (LFS >= 12.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? -->
   <xsl:param name="ncurses5" select="'n'"/>
 
@@ -1251,7 +1254,14 @@ cd $PKGDIR
     </xsl:if>
     <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>SECONDS=${PREV_SEC}
diff --git a/common/libs/func_book_parser b/common/libs/func_book_parser
index 6b7435b..e754666 100644
--- a/common/libs/func_book_parser
+++ b/common/libs/func_book_parser
@@ -67,8 +67,9 @@ extract_commands() {         #
 	  JOBS="\$(nproc)"
   else
 	  JOBS="$N_PARALLEL"
-
   fi
+  if [ "REALSBU" = y ]; then JOBSBP1=1; else JOBSBP1="$JOBS"; fi
+
   # First profile the book, for revision and arch. Note that
   # MULTIBLIB is set to "default" if pure 64 bit book. In this case,
   # profiling on arch is useless, but does not hurt either.
@@ -109,6 +110,7 @@ extract_commands() {         #
            --stringparam log-level      "$LOG_LEVEL"    \
            --stringparam script-root    "$SCRIPT_ROOT"  \
            --stringparam jobs           "$JOBS"         \
+           --stringparam jobs-bp1       "$JOBSBP1"      \
            --output "./${COMMANDS}/"                    \
            $XSL                                         \
            prbook.xml >> $LOGDIR/$LOG 2>&1