diff --git a/parts.rst b/parts.rst index 3444369..19c5cbd 100644 --- a/parts.rst +++ b/parts.rst @@ -502,15 +502,6 @@ autoconf 2.61 Yet another version of ``autoconf``. -bash 5.1 -======== - -Up to this point, our build of ``bash`` could run scripts but could not be used -interactively. This new version of ``bash`` compiles without any patches, -provides new features, and is built with GNU readline support so it can be used -as an interactive shell. ``autoconf-2.61`` is used to regenerate the configure -script and ``bison`` is used to recreate some included generated files. - automake 1.9.6 ============== @@ -526,11 +517,6 @@ compiler for most projects related to GNU and the Linux kernel. Only the C frontend is built at this stage. -bash 5.1 (gcc) -============== - -Rebuild bash with GCC. - musl 1.2.2 ========== @@ -542,3 +528,12 @@ gcc 4.0.4 ========= Rebuild GCC with GCC and also against the latest musl. + +bash 5.1 +======== + +Up to this point, our build of ``bash`` could run scripts but could not be used +interactively. This new version of ``bash`` compiles without any patches, +provides new features, and is built with GNU readline support so it can be used +as an interactive shell. ``autoconf-2.61`` is used to regenerate the configure +script and ``bison`` is used to recreate some included generated files. diff --git a/rootfs.sh b/rootfs.sh index ba1dfed..ec2aba8 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -255,9 +255,6 @@ get_file https://ftp.gnu.org/gnu/help2man/help2man-1.36.4.tar.gz # autoconf 2.61 get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.bz2 -# bash 5.1 -get_file https://ftp.gnu.org/gnu/bash/bash-5.1.tar.gz - # automake 1.9.6 get_file https://ftp.gnu.org/gnu/automake/automake-1.9.6.tar.bz2 @@ -267,6 +264,9 @@ get_file https://ftp.gnu.org/gnu/gcc/gcc-4.0.4/gcc-core-4.0.4.tar.bz2 0 gcc-4.0. # musl 1.2.2 get_file https://musl.libc.org/releases/musl-1.2.2.tar.gz +# bash 5.1 +get_file https://ftp.gnu.org/gnu/bash/bash-5.1.tar.gz + # General cleanup find tmp -name .git -exec rm -rf \; diff --git a/sysa/bash-5.1/pass1.sh b/sysa/bash-5.1/bash-5.1.sh similarity index 79% rename from sysa/bash-5.1/pass1.sh rename to sysa/bash-5.1/bash-5.1.sh index 5baee03..dc064b0 100755 --- a/sysa/bash-5.1/pass1.sh +++ b/sysa/bash-5.1/bash-5.1.sh @@ -10,11 +10,12 @@ src_prepare() { # Rebuild configure script rm configure autoconf-2.61 + + sed -i 's/sleep 3/sleep 3; sync/' builtins/psize.sh } src_configure() { - CC=tcc CPPFLAGS="-D HAVE_ALLOCA_H" \ - ./configure --prefix="${PREFIX}" \ + ./configure --prefix="${PREFIX}" \ --without-bash-malloc \ --disable-nls \ --build=i386-unknown-linux-gnu \ @@ -22,5 +23,5 @@ src_configure() { } src_install() { - install bash ${bindir} + install bash "${PREFIX}/bin" } diff --git a/sysa/bash-5.1/checksums b/sysa/bash-5.1/checksums new file mode 100644 index 0000000..89e966c --- /dev/null +++ b/sysa/bash-5.1/checksums @@ -0,0 +1 @@ +bf782a82ac8ce393d2a028cec337a4f9428f8ab93d2ae11b026dcc8a027b80a7 /after/bin/bash diff --git a/sysa/bash-5.1/checksums/pass1 b/sysa/bash-5.1/checksums/pass1 deleted file mode 100644 index 984a5f1..0000000 --- a/sysa/bash-5.1/checksums/pass1 +++ /dev/null @@ -1 +0,0 @@ -63487b421c2e2386c526623e4b18605c0f83a419f19e75dec1bb5af109903755 /after/bin/bash diff --git a/sysa/bash-5.1/checksums/pass2 b/sysa/bash-5.1/checksums/pass2 deleted file mode 100644 index 17e41b8..0000000 --- a/sysa/bash-5.1/checksums/pass2 +++ /dev/null @@ -1 +0,0 @@ -62dd23127c9ccef9706f5a89baab25e4c5f74cb96ed9373843bc97252fbd4f4e /after/bin/bash diff --git a/sysa/bash-5.1/pass2.sh b/sysa/bash-5.1/pass2.sh deleted file mode 100755 index aabfc0b..0000000 --- a/sysa/bash-5.1/pass2.sh +++ /dev/null @@ -1,25 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Paul Dersey -# SPDX-FileCopyrightText: 2021 Andrius Štikonas -# -# SPDX-License-Identifier: GPL-3.0-or-later - -src_prepare() { - # Remove bison generated files - rm y.tab.c y.tab.h - - # Rebuild configure script - rm configure - autoconf-2.61 -} - -src_configure() { - ./configure --prefix="${PREFIX}" \ - --without-bash-malloc \ - --disable-nls \ - --build=i386-unknown-linux-gnu \ - --enable-static-link -} - -src_install() { - install bash ${bindir} -} diff --git a/sysa/gcc-4.0.4/pass1.sh b/sysa/gcc-4.0.4/pass1.sh index d666437..b18b04e 100755 --- a/sysa/gcc-4.0.4/pass1.sh +++ b/sysa/gcc-4.0.4/pass1.sh @@ -9,7 +9,9 @@ src_unpack() { src_prepare() { default_src_prepare + # This is needed for building with TCC sed -i 's/ix86_attribute_table\[\]/ix86_attribute_table\[10\]/' gcc/config/i386/i386.c + # Needed for musl sed -i 's/struct siginfo/siginfo_t/' gcc/config/i386/linux-unwind.h rm configure @@ -45,7 +47,7 @@ src_prepare() { # Workaround for bison being too new sed -i 's/YYLEX/yylex()/' gcc/c-parse.y rm gcc/c-parse.c - rm gcc/gengtype-yacc.{c,h} + rm gcc/gengtype-yacc.c gcc/gengtype-yacc.h rm intl/plural.c # Rebuild flex generated files diff --git a/sysa/run.sh b/sysa/run.sh index c2fb2df..2633aa4 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -126,6 +126,15 @@ build help2man-1.36.4 build autoconf-2.61 stage1.sh build autoconf-2.61 stage2.sh -build bash-5.1 pass1.sh checksums/pass1 +build automake-1.9.6 stage1.sh +build automake-1.9.6 stage2.sh -exec bash run2.sh +build gcc-4.0.4 pass1.sh checksums/pass1 + +build musl-1.2.2 + +build gcc-4.0.4 pass2.sh checksums/pass2 + +build bash-5.1 + +exec env -i PATH=/after/bin PREFIX=/after bash run2.sh diff --git a/sysa/run2.sh b/sysa/run2.sh index 8515aee..b63c38a 100755 --- a/sysa/run2.sh +++ b/sysa/run2.sh @@ -7,19 +7,9 @@ # SPDX-License-Identifier: GPL-3.0-or-later set -e + . helpers.sh -build automake-1.9.6 stage1.sh -build automake-1.9.6 stage2.sh - -build gcc-4.0.4 pass1.sh checksums/pass1 - -build bash-5.1 pass2.sh checksums/pass2 - -build musl-1.2.2 - -build gcc-4.0.4 pass2.sh checksums/pass2 - echo "Bootstrapping completed." exec env - PATH=/after/bin PS1="\w # " bash -i