Skip to content

Commit 03e6562

Browse files
committed
MinGW host will now support multi-core processors.
As nproc is not implemented by MinGW, the number of processors is obtained from the NUMBER_OF_PROCESSORS environmental variable. On the other hand, Cygwin seems to support nproc.
1 parent b8648ee commit 03e6562

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

scripts/001-binutils-2.14.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,17 @@ cat ../../patches/binutils-$BINUTILS_VERSION-disable-makeinfo-when-texinfo-is-to
1919
cat ../../patches/binutils-gas.patch | patch -p0 || { exit 1; }
2020

2121
## Determine the maximum number of processes that Make can work with.
22-
## MinGW's Make doesn't work properly with multi-core processors.
2322
OSVER=$(uname)
2423
if [ ${OSVER:0:10} == MINGW32_NT ]; then
25-
PROC_NR=2
24+
PROC_NR=$NUMBER_OF_PROCESSORS
2625
elif [ ${OSVER:0:6} == Darwin ]; then
2726
PROC_NR=$(sysctl -n hw.ncpu)
2827
else
2928
PROC_NR=$(nproc)
3029
fi
3130

31+
echo "Building with $PROC_NR jobs"
32+
3233
## For each target...
3334
for TARGET in "ee" "iop" "dvp"; do
3435
## Create and enter the build directory.

scripts/002-gcc-3.2.3-stage1.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,16 @@ else
2626
fi
2727

2828
## Determine the maximum number of processes that Make can work with.
29-
## MinGW's Make doesn't work properly with multi-core processors.
3029
if [ ${OSVER:0:10} == MINGW32_NT ]; then
31-
PROC_NR=2
30+
PROC_NR=$NUMBER_OF_PROCESSORS
3231
elif [ ${OSVER:0:6} == Darwin ]; then
3332
PROC_NR=$(sysctl -n hw.ncpu)
3433
else
3534
PROC_NR=$(nproc)
3635
fi
3736

37+
echo "Building with $PROC_NR jobs"
38+
3839
## For each target...
3940
for TARGET in "ee" "iop"; do
4041
## Create and enter the build directory.

scripts/003-newlib-1.10.0.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ if [ -e ../../patches/newlib-$NEWLIB_VERSION-PS2.patch ]; then
1717
fi
1818

1919
## Determine the maximum number of processes that Make can work with.
20-
## MinGW's Make doesn't work properly with multi-core processors.
2120
OSVER=$(uname)
2221
if [ ${OSVER:0:10} == MINGW32_NT ]; then
23-
PROC_NR=2
22+
PROC_NR=$NUMBER_OF_PROCESSORS
2423
elif [ ${OSVER:0:6} == Darwin ]; then
2524
PROC_NR=$(sysctl -n hw.ncpu)
2625
else

scripts/004-gcc-3.2.3-stage2.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,17 @@ else
2525
TARG_XTRA_OPTS="--enable-cxx-flags=-G0"
2626
fi
2727

28-
## OS Windows doesn't properly work with multi-core processors
28+
## Determine the maximum number of processes that Make can work with.
2929
if [ ${OSVER:0:10} == MINGW32_NT ]; then
30-
PROC_NR=2
30+
PROC_NR=$NUMBER_OF_PROCESSORS
3131
elif [ ${OSVER:0:6} == Darwin ]; then
3232
PROC_NR=$(sysctl -n hw.ncpu)
3333
else
3434
PROC_NR=$(nproc)
3535
fi
3636

37+
echo "Building with $PROC_NR jobs"
38+
3739
TARGET="ee"
3840
## Create and enter the build directory.
3941
mkdir build-$TARGET-stage2 && cd build-$TARGET-stage2 || { exit 1; }

scripts/005-ps2sdk.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ else
1515
fi
1616

1717
## Determine the maximum number of processes that Make can work with.
18-
## MinGW's Make doesn't work properly with multi-core processors.
1918
OSVER=$(uname)
2019
if [ ${OSVER:0:10} == MINGW32_NT ]; then
21-
PROC_NR=2
20+
PROC_NR=$NUMBER_OF_PROCESSORS
2221
elif [ ${OSVER:0:6} == Darwin ]; then
2322
PROC_NR=$(sysctl -n hw.ncpu)
2423
else

0 commit comments

Comments
 (0)