From 2418c35edd3f61c5b2506a48e40bdc6ca58d765c Mon Sep 17 00:00:00 2001 From: Mark Street Date: Wed, 15 Nov 2023 21:47:13 +0000 Subject: [PATCH] Use $(nproc) to limit parallel jobs to CPU count --- gcc-2.5.7-psx.Dockerfile | 3 ++- gcc-2.5.7.Dockerfile | 2 +- gcc-2.6.0.Dockerfile | 2 +- gcc-2.6.3-psx.Dockerfile | 3 ++- gcc-2.6.3.Dockerfile | 2 +- gcc-2.7.0.Dockerfile | 2 +- gcc-2.7.1.Dockerfile | 2 +- gcc-2.7.2.1.Dockerfile | 2 +- gcc-2.7.2.2.Dockerfile | 2 +- gcc-2.7.2.3.Dockerfile | 2 +- gcc-2.7.2.Dockerfile | 2 +- gcc-2.8.0.Dockerfile | 2 +- gcc-2.8.1.Dockerfile | 4 +++- gcc-2.91.66.Dockerfile | 2 +- gcc-2.95.2.Dockerfile | 2 +- 15 files changed, 19 insertions(+), 15 deletions(-) diff --git a/gcc-2.5.7-psx.Dockerfile b/gcc-2.5.7-psx.Dockerfile index 75c1702..b22b5e0 100644 --- a/gcc-2.5.7-psx.Dockerfile +++ b/gcc-2.5.7-psx.Dockerfile @@ -20,6 +20,7 @@ RUN patch -u -p1 gcc.c -i ../patches/gcc-2.5.7.c.patch RUN patch -u -p1 g++.c -i ../patches/g++-2.5.7.c.patch RUN patch -u -p1 config/mips/mips.h -i ../patches/mips-2.5.7.h.patch RUN patch -su -p1 < ../patches/psx-2.5.7.patch +RUN touch insn-config.h RUN ./configure \ --target=mips-sony-psx \ @@ -29,7 +30,7 @@ RUN ./configure \ --host=i386-pc-linux \ --build=i386-pc-linux -RUN make -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static -Dbsd4_4 -Dmips -march=i686 -DHAVE_STRERROR" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static -Dbsd4_4 -Dmips -march=i686 -DHAVE_STRERROR" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.5.7.Dockerfile b/gcc-2.5.7.Dockerfile index d0cf3c9..b0db26f 100644 --- a/gcc-2.5.7.Dockerfile +++ b/gcc-2.5.7.Dockerfile @@ -28,7 +28,7 @@ RUN ./configure \ --host=i386-pc-linux \ --build=i386-pc-linux -RUN make cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static -Dbsd4_4 -Dmips -DHAVE_STRERROR" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static -Dbsd4_4 -Dmips -DHAVE_STRERROR" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.6.0.Dockerfile b/gcc-2.6.0.Dockerfile index 6f55893..85e3abc 100644 --- a/gcc-2.6.0.Dockerfile +++ b/gcc-2.6.0.Dockerfile @@ -27,7 +27,7 @@ RUN ./configure \ --host=i386-pc-linux \ --build=i386-pc-linux -RUN make cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static -Dbsd4_4 -Dmips -DHAVE_STRERROR" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static -Dbsd4_4 -Dmips -DHAVE_STRERROR" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.6.3-psx.Dockerfile b/gcc-2.6.3-psx.Dockerfile index 761fd2b..5dd8d40 100644 --- a/gcc-2.6.3-psx.Dockerfile +++ b/gcc-2.6.3-psx.Dockerfile @@ -17,6 +17,7 @@ RUN patch -u -p1 cp/g++.c -i ../patches/g++-2.6.3.c.patch RUN patch -su -p1 < ../patches/psx.patch RUN touch -c cp/parse.y cp/parse.h cp/parse.c +RUN touch insn-config.h RUN ./configure \ --target=mips-sony-psx \ @@ -26,7 +27,7 @@ RUN ./configure \ --host=i386-pc-linux \ --build=i386-pc-linux -RUN make -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static -Dbsd4_4 -Dmips -march=i686 -DHAVE_STRERROR" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static -Dbsd4_4 -Dmips -march=i686 -DHAVE_STRERROR" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.6.3.Dockerfile b/gcc-2.6.3.Dockerfile index 3c856a0..3324acb 100644 --- a/gcc-2.6.3.Dockerfile +++ b/gcc-2.6.3.Dockerfile @@ -27,7 +27,7 @@ RUN ./configure \ --build=i386-pc-linux -RUN make -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static -Dbsd4_4 -Dmips -DHAVE_STRERROR" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static -Dbsd4_4 -Dmips -DHAVE_STRERROR" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.7.0.Dockerfile b/gcc-2.7.0.Dockerfile index fd40aa4..5d61475 100644 --- a/gcc-2.7.0.Dockerfile +++ b/gcc-2.7.0.Dockerfile @@ -27,7 +27,7 @@ RUN ./configure \ --host=i386-pc-linux \ --build=i386-pc-linux -RUN make -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.7.1.Dockerfile b/gcc-2.7.1.Dockerfile index 6ae8865..443e69f 100644 --- a/gcc-2.7.1.Dockerfile +++ b/gcc-2.7.1.Dockerfile @@ -27,7 +27,7 @@ RUN ./configure \ --host=i386-pc-linux \ --build=i386-pc-linux -RUN make -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.7.2.1.Dockerfile b/gcc-2.7.2.1.Dockerfile index b24a382..cab4c6e 100644 --- a/gcc-2.7.2.1.Dockerfile +++ b/gcc-2.7.2.1.Dockerfile @@ -30,7 +30,7 @@ RUN patch -u -p1 configure -i ../patches/configure.patch RUN patch -u -p1 config.sub -i ../patches/config.sub.patch RUN patch -u -p1 config/mips/mips.h -i ../patches/mipsel-2.7.patch -RUN make -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.7.2.2.Dockerfile b/gcc-2.7.2.2.Dockerfile index bc10825..d1166ae 100644 --- a/gcc-2.7.2.2.Dockerfile +++ b/gcc-2.7.2.2.Dockerfile @@ -30,7 +30,7 @@ RUN patch -u -p1 configure -i ../patches/configure.patch RUN patch -u -p1 config.sub -i ../patches/config.sub.patch RUN patch -u -p1 config/mips/mips.h -i ../patches/mipsel-2.7.patch -RUN make -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.7.2.3.Dockerfile b/gcc-2.7.2.3.Dockerfile index 62f893e..db99002 100644 --- a/gcc-2.7.2.3.Dockerfile +++ b/gcc-2.7.2.3.Dockerfile @@ -28,7 +28,7 @@ RUN sed -i -- 's/include /include /g' *.c RUN patch -u -p1 obstack.h -i ../patches/obstack-2.7.2.h.patch RUN patch -u -p1 config/mips/mips.h -i ../patches/mipsel-2.7.patch -RUN make -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.7.2.Dockerfile b/gcc-2.7.2.Dockerfile index ea30887..5e45f44 100644 --- a/gcc-2.7.2.Dockerfile +++ b/gcc-2.7.2.Dockerfile @@ -30,7 +30,7 @@ RUN patch -u -p1 configure -i ../patches/configure.patch RUN patch -u -p1 config.sub -i ../patches/config.sub.patch RUN patch -u -p1 config/mips/mips.h -i ../patches/mipsel-2.7.patch -RUN make -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.8.0.Dockerfile b/gcc-2.8.0.Dockerfile index 2494b28..0be9606 100644 --- a/gcc-2.8.0.Dockerfile +++ b/gcc-2.8.0.Dockerfile @@ -28,7 +28,7 @@ RUN patch -u -p1 obstack.h -i ../patches/obstack-2.8.0.h.patch RUN patch -u -p1 config/mips/mips.h -i ../patches/mipsel-2.8.patch -RUN make cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.8.1.Dockerfile b/gcc-2.8.1.Dockerfile index 71db517..8934bb0 100644 --- a/gcc-2.8.1.Dockerfile +++ b/gcc-2.8.1.Dockerfile @@ -28,7 +28,9 @@ RUN patch -u -p1 obstack.h -i ../patches/obstack-2.8.1.h.patch RUN patch -u -p1 config/mips/mips.h -i ../patches/mipsel-2.8.patch -RUN make -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" +RUN touch insn-config.h + +RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.91.66.Dockerfile b/gcc-2.91.66.Dockerfile index 50d94cc..28a58e0 100644 --- a/gcc-2.91.66.Dockerfile +++ b/gcc-2.91.66.Dockerfile @@ -33,7 +33,7 @@ RUN patch -u -p1 gcc/obstack.h -i ../patches/obstack-${VERSION}.h.patch RUN patch -u -p1 gcc/config/mips/mips.h -i ../patches/mipsel-2.8.patch RUN make -C libiberty/ CFLAGS="-std=gnu89 -m32 -static" -RUN make -C gcc/ -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" +RUN make -C gcc/ --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" COPY tests /work/tests RUN ./gcc/cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s diff --git a/gcc-2.95.2.Dockerfile b/gcc-2.95.2.Dockerfile index 466084d..f1c8b37 100644 --- a/gcc-2.95.2.Dockerfile +++ b/gcc-2.95.2.Dockerfile @@ -33,7 +33,7 @@ RUN patch -u -p1 include/obstack.h -i ../patches/obstack-${VERSION}.h.patch RUN patch -u -p1 gcc/config/mips/mips.h -i ../patches/mipsel-2.8.patch RUN make -C libiberty/ CFLAGS="-std=gnu89 -m32 -static" -RUN make -C gcc/ -j cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" +RUN make -C gcc/ --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static" COPY tests /work/tests RUN ./gcc/cc1 -mel -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s