logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>
commit: 634cae7b68e149a6713caef7b4c186d7564e9e01
parent 0572ff41ef460d49b891e9d0a6452a6cb9719b96
Author: Andrius Štikonas <andrius@stikonas.eu>
Date:   Sun, 21 Mar 2021 16:10:53 +0000

Build bash 5.1 only after GCC.

Diffstat:

Mparts.rst23+++++++++--------------
Mrootfs.sh6+++---
Asysa/bash-5.1/bash-5.1.sh27+++++++++++++++++++++++++++
Asysa/bash-5.1/checksums1+
Dsysa/bash-5.1/checksums/pass11-
Dsysa/bash-5.1/checksums/pass21-
Dsysa/bash-5.1/pass1.sh26--------------------------
Dsysa/bash-5.1/pass2.sh25-------------------------
Msysa/gcc-4.0.4/pass1.sh4+++-
Msysa/run.sh13+++++++++++--
Msysa/run2.sh12+-----------
11 files changed, 55 insertions(+), 84 deletions(-)

diff --git 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 @@ -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/bash-5.1.sh b/sysa/bash-5.1/bash-5.1.sh @@ -0,0 +1,27 @@ +# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> +# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +# +# 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 + + sed -i 's/sleep 3/sleep 3; sync/' builtins/psize.sh +} + +src_configure() { + ./configure --prefix="${PREFIX}" \ + --without-bash-malloc \ + --disable-nls \ + --build=i386-unknown-linux-gnu \ + --enable-static-link +} + +src_install() { + install bash "${PREFIX}/bin" +} diff --git a/sysa/bash-5.1/checksums 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 @@ -1 +0,0 @@ -63487b421c2e2386c526623e4b18605c0f83a419f19e75dec1bb5af109903755 /after/bin/bash diff --git a/sysa/bash-5.1/checksums/pass2 b/sysa/bash-5.1/checksums/pass2 @@ -1 +0,0 @@ -62dd23127c9ccef9706f5a89baab25e4c5f74cb96ed9373843bc97252fbd4f4e /after/bin/bash diff --git a/sysa/bash-5.1/pass1.sh b/sysa/bash-5.1/pass1.sh @@ -1,26 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -# -# 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() { - CC=tcc CPPFLAGS="-D HAVE_ALLOCA_H" \ - ./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/bash-5.1/pass2.sh b/sysa/bash-5.1/pass2.sh @@ -1,25 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com> -# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -# -# 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 @@ -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 @@ -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 @@ -7,18 +7,8 @@ # 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 +. helpers.sh echo "Bootstrapping completed."