Rebuild bzip2 after building tcc and musl

The tcc-mes build of bzip2 was unable to open files from stdin.
This commit is contained in:
Paul Dersey 2021-02-23 20:28:23 -05:00
parent 62a413d384
commit a3ec56297f
6 changed files with 53 additions and 22 deletions

View File

@ -317,20 +317,25 @@ particularly regarding floats, in the first `musl`.
Now that we have a 'fixed' `musl`, we now recompile `tcc` as `tcc` uses floats Now that we have a 'fixed' `musl`, we now recompile `tcc` as `tcc` uses floats
extensively. extensively.
#### Part 25: m4 1.4.7 #### Part 25: bzip2 1.0.8
`bzip2` is rebuilt unpatched with the new tcc and musl fixing issues with reading
files from stdin that existed in the previous build.
#### Part 26: m4 1.4.7
`m4` is the first piece of software we need in the autotools suite, flex 2.6.4 `m4` is the first piece of software we need in the autotools suite, flex 2.6.4
and bison. It allows macros to be defined and files to be generated from those and bison. It allows macros to be defined and files to be generated from those
macros. macros.
#### Part 26: flex 2.6.14 #### Part 27: flex 2.6.14
We recompile unpatched GNU `flex` using older flex 2.5.11. This is again a two We recompile unpatched GNU `flex` using older flex 2.5.11. This is again a two
stage process, first compiling flex using `scan.c` (from `scan.l`) created by stage process, first compiling flex using `scan.c` (from `scan.l`) created by
old flex, then recompile `scan.c` using the new version of flex to remove any old flex, then recompile `scan.c` using the new version of flex to remove any
buggy artifacts from the old flex. buggy artifacts from the old flex.
#### Part 27: bison 3.4.1 #### Part 28: bison 3.4.1
GNU `bison` is a parser generator. With `m4` and `flex` we can now bootstrap it GNU `bison` is a parser generator. With `m4` and `flex` we can now bootstrap it
following https://gitlab.com/giomasce/bison-bootstrap. It's a 3 stage process: following https://gitlab.com/giomasce/bison-bootstrap. It's a 3 stage process:
@ -341,28 +346,28 @@ following https://gitlab.com/giomasce/bison-bootstrap. It's a 3 stage process:
Finally we have a fully functional `bison` executable. Finally we have a fully functional `bison` executable.
#### Part 28: grep 2.4 #### Part 29: grep 2.4
GNU `grep` is a pattern matching utility. Is is not immediately needed but will GNU `grep` is a pattern matching utility. Is is not immediately needed but will
be useful later for autotools. be useful later for autotools.
#### Part 29: diffutils 2.7 #### Part 30: diffutils 2.7
`diffutils` is useful for comparing two files. It is not immediately needed but `diffutils` is useful for comparing two files. It is not immediately needed but
is required later for autotools. is required later for autotools.
#### Part 30: coreutils 5.0 #### Part 31: coreutils 5.0
`coreutils` is rebuilt against musl. Additional utilities are built including `coreutils` is rebuilt against musl. Additional utilities are built including
`comm`, `expr`, `date`, `dd`, `sort`, `uname` and `uniq`. This fixes a variety `comm`, `expr`, `date`, `dd`, `sort`, `uname` and `uniq`. This fixes a variety
of issues with existing `coreutils`. of issues with existing `coreutils`.
#### Part 31: gawk 3.0.4 #### Part 32: gawk 3.0.4
`gawk` is the GNU implementation of `awk`, yet another pattern matching and data `gawk` is the GNU implementation of `awk`, yet another pattern matching and data
extraction utility. It is also required for autotools. extraction utility. It is also required for autotools.
#### Part 32: perl 5.000 #### Part 33: perl 5.000
Perl is a general purpose programming language that is especially suitable for Perl is a general purpose programming language that is especially suitable for
text processing. It is essential for autotools build system because automake and text processing. It is essential for autotools build system because automake and
@ -377,17 +382,17 @@ custom makefile instead of Perl's pre-generated Configure script.
At this first step we build `miniperl` which is `perl` without support for At this first step we build `miniperl` which is `perl` without support for
loading modules. loading modules.
#### Part 33: perl 5.003 #### Part 34: perl 5.003
We now use `perl` from the previous stage to recreate pre-generated files that We now use `perl` from the previous stage to recreate pre-generated files that
are shipped in perl 5.003. But for now we still need to use handwritten makefile are shipped in perl 5.003. But for now we still need to use handwritten makefile
instead of `./Configure` script. instead of `./Configure` script.
#### Part 34: perl 5.004_05 #### Part 35: perl 5.004_05
Yet another version of perl; the last version buildable with 5.003. Yet another version of perl; the last version buildable with 5.003.
#### Part 35: perl 5.005_03 #### Part 36: perl 5.005_03
More perl! This is the last version buildable with 5.004. It also introduces the More perl! This is the last version buildable with 5.004. It also introduces the
new pregenerated files `regnodes.h` and `byterun.{h,c}`. new pregenerated files `regnodes.h` and `byterun.{h,c}`.

View File

@ -33,4 +33,4 @@ bzip2 --help
cd ../.. cd ../..
# Checksums # Checksums
sha256sum -c checksums sha256sum -c checksums/bzip2-pass1

21
sysa/bzip2-1.0.8/bzip2-1.0.8.sh Executable file
View File

@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_unpack() {
src_dir="${base_dir}/src"
tar -xf "${src_dir}/${pkg}.tar"
}
src_prepare() {
:
}
src_compile() {
make CC=tcc AR="tcc -ar" bzip2
}
src_install() {
install bzip2 ${PREFIX}/bin
install bzip2 ${PREFIX}/bin/bunzip2
}

View File

@ -0,0 +1,2 @@
d32467575bfbd6d74cd426205ba102194c0956688e6bc91399930313c68ee0dc /after/bin/bzip2
d32467575bfbd6d74cd426205ba102194c0956688e6bc91399930313c68ee0dc /after/bin/bunzip2

View File

@ -28,38 +28,41 @@ build musl-1.1.24 musl-1.1.24.sh checksums/pass2
build tcc-0.9.27 tcc-musl-pass2.sh checksums/tcc-musl-pass2 build tcc-0.9.27 tcc-musl-pass2.sh checksums/tcc-musl-pass2
# Part 25 # Part 25
build m4-1.4.7 build bzip2-1.0.8 bzip2-1.0.8.sh checksums/bzip2-pass2
# Part 26 # Part 26
build flex-2.6.4 build m4-1.4.7
# Part 27 # Part 27
build flex-2.6.4
# Part 28
build bison-3.4.1 stage1.sh checksums/stage1 build bison-3.4.1 stage1.sh checksums/stage1
build bison-3.4.1 stage2.sh checksums/stage2 build bison-3.4.1 stage2.sh checksums/stage2
build bison-3.4.1 stage3.sh checksums/stage3 build bison-3.4.1 stage3.sh checksums/stage3
# Part 28 # Part 29
build grep-2.4 build grep-2.4
# Part 29 # Part 30
build diffutils-2.7 build diffutils-2.7
# Part 30 # Part 31
build coreutils-5.0 coreutils-5.0.sh checksums/pass2 build coreutils-5.0 coreutils-5.0.sh checksums/pass2
# Part 31 # Part 32
build gawk-3.0.4 build gawk-3.0.4
# Part 32 # Part 33
build perl-5.000 build perl-5.000
# Part 33 # Part 34
build perl-5.003 build perl-5.003
# Part 34 # Part 35
build perl5.004_05 build perl5.004_05
# Part 35 # Part 36
build perl5.005_03 build perl5.005_03
echo "Bootstrapping completed." echo "Bootstrapping completed."