Ignore:
Timestamp:
11/13/2023 01:00:03 PM (11 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
12.1, 12.1-rc1, 12.2, 12.2-rc1, multilib, trunk, xry111/arm64, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/update-glibc
Children:
a0a803c
Parents:
5196dae
Message:

hostreqs: Bump Coreutils minimal version to 8.1 and check for nproc

We'll use nproc for setting MAKEFLAGS and TESTSUITEFLAGS. And if nproc
is not available, we'll end up with "MAKEFLAGS=-j" which is very
dangerous because it allows make to spawn infinite number of jobs.
Check it early.

The nproc program is added in Coreutils 8.1 so we need to bump the
minimal version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter02/hostreqs.xml

    r5196dae re70bf8f  
    5555    </listitem>
    5656
    57     <listitem>
    58       <para><emphasis role="strong">Coreutils-7.0</emphasis></para>
     57    <!-- In Coreutils-8.1 the nproc program is added.  -->
     58    <listitem>
     59      <para><emphasis role="strong">Coreutils-8.1</emphasis></para>
    5960    </listitem>
    6061
     
    219220}
    220221
    221 # Coreutils first because-sort needs Coreutils >= 7.0
    222 ver_check Coreutils      sort     7.0 || bail "--version-sort unsupported"
     222# Coreutils first because --version-sort needs Coreutils >= 7.0
     223ver_check Coreutils      sort     8.1 || bail "Coreutils too old, stop"
    223224ver_check Bash           bash     3.2
    224225ver_check Binutils       ld       2.13.1
     
    260261then echo "OK:    g++ works";
    261262else echo "ERROR: g++ does NOT work"; fi
    262 rm -f a.out</literal>
     263rm -f a.out
     264
     265if [ "$(nproc)" = "" ]; then
     266   echo "ERROR: nproc is not available or it produces empty output"
     267else
     268   echo "OK: nproc reports $(nproc) logical cores are available"
     269fi</literal>
    263270EOF
    264271
Note: See TracChangeset for help on using the changeset viewer.