summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-05-18 13:46:11 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-05-18 13:46:11 +0200
commitf174239a122246cd43792ac75ddedd85b7214f08 (patch)
treebb1710cf22d884997b67b5c60690a737e6670eff /scripts
parenta5c1e6fc81ef990c56305fe10deccf55373afd30 (diff)
downloadtoolchains-f174239a122246cd43792ac75ddedd85b7214f08.tar.xz
toolchains-f174239a122246cd43792ac75ddedd85b7214f08.zip
build: improve parallelization
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/0150-build-static-deps.sh14
-rwxr-xr-xscripts/0200-build-target-binutils.sh2
-rwxr-xr-xscripts/0300-build-bootstrap-gcc.sh4
-rwxr-xr-xscripts/0400-build-target-newlib.sh2
-rwxr-xr-xscripts/0500-build-target-gcc.sh4
-rwxr-xr-xscripts/0600-build-target-gdb.sh2
6 files changed, 14 insertions, 14 deletions
diff --git a/scripts/0150-build-static-deps.sh b/scripts/0150-build-static-deps.sh
index e954d34..1301bd6 100755
--- a/scripts/0150-build-static-deps.sh
+++ b/scripts/0150-build-static-deps.sh
@@ -9,28 +9,28 @@ echo "Building static zlib..."
tar xf /downloads/zlib-$ZLIB_VERSION.tar.gz
cd zlib-$ZLIB_VERSION
./configure --prefix=$STATIC_DEPS_PREFIX --static
-make -j$(nproc) && make install
+make -j$(($(nproc) * 2)) && make install
cd ..
echo "Building static ncurses..."
tar xf /downloads/ncurses-$NCURSES_VERSION.tar.gz
cd ncurses-$NCURSES_VERSION
./configure --prefix=$STATIC_DEPS_PREFIX --disable-shared --enable-static --with-termlib
-make -j$(nproc) && make install
+make -j$(($(nproc) * 2)) && make install
cd ..
echo "Building static expat..."
tar xf /downloads/expat-$EXPAT_VERSION.tar.gz
cd expat-$EXPAT_VERSION
./configure --prefix=$STATIC_DEPS_PREFIX --disable-shared --enable-static
-make -j$(nproc) && make install
+make -j$(($(nproc) * 2)) && make install
cd ..
echo "Building static readline..."
tar xf /downloads/readline-$READLINE_VERSION.tar.gz
cd readline-$READLINE_VERSION
./configure --prefix=$STATIC_DEPS_PREFIX --disable-shared --enable-static
-make -j$(nproc) && make install
+make -j$(($(nproc) * 2)) && make install
cd ..
echo "Building static gmp..."
@@ -40,19 +40,19 @@ cd gmp-$GMP_VERSION
sed -i 's/void g(){}/void g(int,t1 const*,t1,t2,t1 const*,int){}/' configure
## PATCH END
./configure --prefix=$STATIC_DEPS_PREFIX --disable-shared --enable-static || cat config.log
-make -j$(nproc) && make install
+make -j$(($(nproc) * 2)) && make install
cd ..
echo "Building static mpfr..."
tar xf /downloads/mpfr-$MPFR_VERSION.tar.xz
cd mpfr-$MPFR_VERSION
./configure --prefix=$STATIC_DEPS_PREFIX --with-gmp=$STATIC_DEPS_PREFIX --disable-shared --enable-static
-make -j$(nproc) && make install
+make -j$(($(nproc) * 2)) && make install
cd ..
echo "Building static mpc..."
tar xf /downloads/mpc-$MPC_VERSION.tar.xz
cd mpc-$MPC_VERSION
./configure --prefix=$STATIC_DEPS_PREFIX --with-gmp=$STATIC_DEPS_PREFIX --with-mpfr=$STATIC_DEPS_PREFIX --disable-shared --enable-static
-make -j$(nproc) && make install
+make -j$(($(nproc) * 2)) && make install
cd ..
diff --git a/scripts/0200-build-target-binutils.sh b/scripts/0200-build-target-binutils.sh
index 78974ec..c778593 100755
--- a/scripts/0200-build-target-binutils.sh
+++ b/scripts/0200-build-target-binutils.sh
@@ -19,6 +19,6 @@ cd .build
CPPFLAGS="-I$STATIC_DEPS_PREFIX/include" \
LDFLAGS="-L$STATIC_DEPS_PREFIX/lib"
-make -j$(nproc)
+make -j$(($(nproc) * 2))
make install-strip
diff --git a/scripts/0300-build-bootstrap-gcc.sh b/scripts/0300-build-bootstrap-gcc.sh
index e5ee70b..b81c74a 100755
--- a/scripts/0300-build-bootstrap-gcc.sh
+++ b/scripts/0300-build-bootstrap-gcc.sh
@@ -31,8 +31,8 @@ PATH=/opt/bootstrap/bin:/opt/toolchain/bin:$PATH
CPPFLAGS="-I$STATIC_DEPS_PREFIX/include" \
LDFLAGS="-L$STATIC_DEPS_PREFIX/lib"
-make -j$(nproc) all-gcc
+make -j$(($(nproc) * 2)) all-gcc
make install-gcc
-make -j$(nproc) all-target-libgcc
+make -j$(($(nproc) * 2)) all-target-libgcc
make install-target-libgcc
diff --git a/scripts/0400-build-target-newlib.sh b/scripts/0400-build-target-newlib.sh
index f785fac..680eb22 100755
--- a/scripts/0400-build-target-newlib.sh
+++ b/scripts/0400-build-target-newlib.sh
@@ -20,5 +20,5 @@ LDFLAGS=-mno-red-zone ../newlib-$NEWLIB_VERSION/configure \
--target=$TARGET \
CFLAGS_FOR_TARGET="-mcmodel=kernel -fno-pie"
-make -j$(nproc)
+make -j$(($(nproc) * 2))
make install
diff --git a/scripts/0500-build-target-gcc.sh b/scripts/0500-build-target-gcc.sh
index 12d2641..1511dc9 100755
--- a/scripts/0500-build-target-gcc.sh
+++ b/scripts/0500-build-target-gcc.sh
@@ -25,11 +25,11 @@ PATH=/opt/bootstrap/bin:/opt/toolchain/bin:$PATH
CPPFLAGS="-I$STATIC_DEPS_PREFIX/include" \
LDFLAGS="-L$STATIC_DEPS_PREFIX/lib"
-make -j$(nproc) all-gcc
+make -j$(($(nproc) * 2)) all-gcc
make install-strip-gcc
for COMPONENT in target-libgcc target-libstdc++-v3; do
- make -j$(nproc) all-$COMPONENT
+ make -j$(($(nproc) * 2)) all-$COMPONENT
make install-$COMPONENT
done
diff --git a/scripts/0600-build-target-gdb.sh b/scripts/0600-build-target-gdb.sh
index 8bd5a68..25e6d85 100755
--- a/scripts/0600-build-target-gdb.sh
+++ b/scripts/0600-build-target-gdb.sh
@@ -23,5 +23,5 @@ cd .build
CPPFLAGS="-I$STATIC_DEPS_PREFIX/include -I$STATIC_DEPS_PREFIX/include/ncursesw" \
LDFLAGS="-L$STATIC_DEPS_PREFIX/lib"
-make -j$(nproc) all-gdb
+make -j$(($(nproc) * 2)) all-gdb
make install-strip-gdb