Move tcc 0.9.27 after bzip2.

This also allows to merge two builds of tcc 0.9.27.
Drop tcc 0.9.27 git submodule.
This commit is contained in:
Andrius Štikonas 2021-04-15 01:45:06 +01:00
parent f030a3a74e
commit 419cd74d92
29 changed files with 98 additions and 166 deletions

View file

@ -56,12 +56,6 @@ cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# tcc 0.9.27
pkg="tcc-0.9.27"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# gzip
pkg="gzip-1.2.4"
cd ${pkg}
@ -95,16 +89,6 @@ cd ..
# Check all up to this part as sha256sum
sha256sum -c pre-sha.sha256sums
# mes-libc-patched
cd tcc-0.9.27
kaem --file mes-libc-patched.kaem
cd ..
# tcc-patched
cd tcc-0.9.27
kaem --file tcc-patched.kaem
cd ..
# make
pkg="make-3.80"
cd ${pkg}
@ -117,6 +101,17 @@ cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# mes-libc-patched
cd tcc-0.9.27
kaem --file mes-libc-patched.kaem
cd ..
# tcc 0.9.27
pkg="tcc-0.9.27"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# coreutils
pkg="coreutils-5.0"
cd ${pkg}

View file

@ -1,2 +1,2 @@
74cb8b1278d648d3f63b71cc5b055a83e83e12a044c7e533c1b348ee8cf34314 /after/bin/bzip2
74cb8b1278d648d3f63b71cc5b055a83e83e12a044c7e533c1b348ee8cf34314 /after/bin/bunzip2
6b7d8a7a65da9beb4c6deb0391be5f1f0da18e77d3f292ae433ffc43b89a3a5f /after/bin/bzip2
6b7d8a7a65da9beb4c6deb0391be5f1f0da18e77d3f292ae433ffc43b89a3a5f /after/bin/bunzip2

View file

@ -1,3 +1,3 @@
47018 /after/bin/gzip
47018 /after/bin/gunzip
47018 /after/bin/zcat
20706 /after/bin/gzip
20706 /after/bin/gunzip
20706 /after/bin/zcat

View file

@ -1 +1 @@
7745ab1036a83ed63416af84bd166bfe768554ac393fbc53818acd4ccc18ce7f /after/bin/make
06699b2728829d9c989f28a28af3d9ea00391a8678140af77a5ba4892244c4e8 /after/bin/make

View file

@ -1 +1 @@
10790 /after/bin/patch
62187 /after/bin/patch

View file

@ -7,19 +7,19 @@ d4708bc79bee1f4d23789866380a98b5ed0e165ac8ca917b8b928c2d323ddc10 /after/bin/boo
773eae17b7f347526f8033afc9d1f06af116dfbcd0a26cbde7e29ab47e77850d /after/bin/chmod
764881d80efac5509aa85fd4683a20beffa831442f57815d43ee030fb8f9f486 /after/bin/cp
e1481ecf337fb657f3949af0b45bb620c1886cd1a1b003fe27338832c250f41d /after/bin/fletcher16
fc2d3f6a7227836526d278d4e4b642a72c1a83c03c3363f3376100798e0eb145 /after/bin/gunzip
fc2d3f6a7227836526d278d4e4b642a72c1a83c03c3363f3376100798e0eb145 /after/bin/gzip
c8c923c0bea92a642e1b3e5dde162bb7c35ea14a75e0f8fbb811d7ea92edffe6 /after/bin/gunzip
c8c923c0bea92a642e1b3e5dde162bb7c35ea14a75e0f8fbb811d7ea92edffe6 /after/bin/gzip
e835fdb1cd8c7852e8c879f1efdea6f7392bdd04938f5a01a6199ab2730fac4b /after/bin/mes
b91c81e543b878ead4cc975df75e3d211f7bd2dcdd4c90e42df99d44311ce71e /after/bin/mescc.scm
e94a2468c045582cfd13df51acd0932afdc834fa60139f7bfb7a2d65afa39a65 /after/bin/mes-tcc
3cf426251744300a099a40f3609ccbd32ec3b9f3334601defa5736e7fd6c6f1d /after/bin/patch
d453932b7d83fc3e183afeca65c1afb2a620b985c378ee072710e0cc593d9811 /after/bin/sed
bc9ddf9854bd954c71bb1cf5b0af77fd65b8fa7f290b42c75020fb8893deb53c /after/bin/sha256sum
032c0a3bb32b542f7d3eb0305bd89898ab2fc4b9fd0502085337e3422db1f393 /after/bin/patch
61d9850bf8348a5571f59231e392a06021c9be78f32797943d98bc493ea5b03f /after/bin/sed
c09ac8658c8853f5316c8abbf5b8379dba03a42dfc3eb9c07982a4da85480b6f /after/bin/sha256sum
74e0a13cb6e92d70c43f71ec704afbc44b7a38c703fe40700f7af7c640a22158 /after/bin/untar
957229511dc5ac62a949dbd76e965e3a476ce214b8e6fc7f120bf17d195b924b /after/bin/tar
690c2a941c444ba761076f6b8ef1ba2b634ebe2e63ea44c8f3789f6e3df6d2a9 /after/bin/tcc
cacc2cda3ce6c2cc0cb761b8aa2115a003e166c94d1039974fc0221263897c52 /after/bin/tcc-0.9.26
fc2d3f6a7227836526d278d4e4b642a72c1a83c03c3363f3376100798e0eb145 /after/bin/zcat
ade67862293d3193aaa569931d520dab26b26fcfebd538346a2a83195a59d7e7 /after/bin/tar
819ebd10859c34f1f34b5ab341fdce4541ccade97ec96b7eac5876875f91e8a7 /after/bin/tcc
819ebd10859c34f1f34b5ab341fdce4541ccade97ec96b7eac5876875f91e8a7 /after/bin/tcc-0.9.26
c8c923c0bea92a642e1b3e5dde162bb7c35ea14a75e0f8fbb811d7ea92edffe6 /after/bin/zcat
44b5f15e1f015685fe4c3d66eda5ba52aac77b94f2edd98b764cec05ca350d49 /after/lib/crt1.o
90811dafd33ad56b8e4b0adcc04263f9329b9047b7cc337abe8151a75017172c /after/lib/x86-mes/crt1.s
09d4f9821a2566f7e56381a19259c41bd97f3c5ed83f490705acbfd1139a7736 /after/lib/crti.o

View file

@ -96,7 +96,7 @@ build musl-1.1.24 binutils-rebuild.sh checksums/pass3 patches-pass3
populate_device_nodes
# Rebuild tcc-musl using new musl
build tcc-0.9.27 tcc-musl-pass3.sh checksums/tcc-musl-pass3
build tcc-0.9.27 tcc-musl-pass3.sh checksums/tcc-musl-pass3 patches-musl-pass3
build autoconf-2.53 stage1.sh
build autoconf-2.53 stage2.sh

View file

@ -1 +1 @@
10514 /after/bin/sed
32529 /after/bin/sed

View file

@ -1 +1 @@
53384 /after/bin/sha256sum
11460 /after/bin/sha256sum

View file

@ -1 +1 @@
3497 /after/bin/tar
56696 /after/bin/tar

View file

@ -1,8 +1,6 @@
35075 /after/bin/tcc
47832 /after/lib/libc.a
47832 /after/lib/libc+gnu.a
54049 /after/lib/libgetopt.a
23061 /after/lib/crt1.o
16980 /after/lib/crti.o
47705 /after/lib/crtn.o
54138 /after/lib/tcc/libtcc1.a
0bd8c89f8eee4b8e185b404308a79b3cd315a2143f864d7c250a8f088ae1149d /after/bin/tcc
a1313f0a2aef2e63a3d03b2c8de98e6c022f0999e4d7e039bd140c250be4a4da /after/lib/libc.a
12c07ae103e7e3b390150a79e5c600d88de14e9bb73a066f6342582729ef5a3f /after/lib/libgetopt.a
d1168ee9b528e39f0b40e8d51fb7fa3619c4a5ee928137f7faf6d0879b0916b0 /after/lib/crt1.o
09d4f9821a2566f7e56381a19259c41bd97f3c5ed83f490705acbfd1139a7736 /after/lib/crti.o
461ca1494737fab86fe1c1d3addeaf9d0ece413e353abcdea8674db3f700cda3 /after/lib/crtn.o

View file

@ -1,2 +1 @@
c65633cb875609df7aab2225a24334b5853a0b3e097bdb3ba8a0ae80c1bf5bf0 /after/bin/tcc-musl
a650b13efc65073fb851e9db89728089d8845c401f85faaa09801874ab058089 /after/lib/tcc/libtcc1.a

View file

@ -1,2 +1 @@
068384be93b6654d6ad555881eaf24d221cc3edf229465f050fec30c30648047 /after/bin/tcc-musl
a650b13efc65073fb851e9db89728089d8845c401f85faaa09801874ab058089 /after/lib/tcc/libtcc1.a

View file

@ -1 +0,0 @@
0bd8c89f8eee4b8e185b404308a79b3cd315a2143f864d7c250a8f088ae1149d /after/bin/tcc

View file

@ -6,10 +6,6 @@
set -ex
# libtcc1.a
tcc -c -D HAVE_CONFIG_H=1 lib/libtcc1.c
tcc -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o
cd ../mes-libc
# crt{1,n,i}.o
tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crt1.o lib/linux/x86-mes-gcc/crt1.c
tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o ${libdir}/crtn.o lib/linux/x86-mes-gcc/crtn.c

View file

@ -10,11 +10,10 @@ set -ex
cd src/mes-libc
# Patch
patch -Np0 -i ../../patches/mes-libc-qsort.patch
patch -Np0 -i ../../patches/mes-libc-crt1.patch
patch -Np0 -i ../../patches-mes-libc/qsort.patch
patch -Np0 -i ../../patches-mes-libc/crt1.patch
# Recompile libc
cd ../tcc-0.9.27
kaem --file ../../compile-libc.kaem
cd ../..

View file

@ -0,0 +1 @@
../patches/ignore-static-inside-array.patch

View file

@ -0,0 +1 @@
../patches/static-link.patch

@ -1 +0,0 @@
Subproject commit d348a9a51d32cece842b7885d27a411436d7887b

View file

@ -1,21 +1,31 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -ex
cd src/tcc-0.9.27
cd build
# Extract
bunzip2 ../src/${pkg}.tar.bz2
tar xf ../src/${pkg}.tar
cd ${pkg}
# Create config.h
catm config.h
# Compile the binary
tcc \
# Patch
patch -Np0 -i ../../patches/static-link.patch
patch -Np0 -i ../../patches/ignore-static-inside-array.patch
# Compile
tcc-0.9.26 \
-v \
-static \
-o tcc \
-o ${bindir}/tcc \
-D TCC_TARGET_I386=1 \
-D CONFIG_TCCDIR=\"${libdir}/tcc\" \
-D CONFIG_TCC_CRTPREFIX=\"${libdir}\" \
@ -29,17 +39,14 @@ tcc \
-D ONE_SOURCE=1 \
tcc.c
# Install the binary
cp tcc ${bindir}/tcc
chmod 755 ${bindir}/tcc
# Test
tcc -version
# Recompile libc
cd ../../src/mes-libc/
kaem --file ../../compile-libc.kaem
cd ../..
# Checksums
fletcher16 checksums/tcc-0.9.27
sha256sum -c checksums/tcc-0.9.27

View file

@ -2,14 +2,10 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_unpack() {
cp -r ../src/tcc-0.9.27 .
}
src_prepare() {
# Note that tcc includes static-link and ignore-static-inside-array patches
# since we do not build from clean checkout.
patch -Np0 -i ../../patches/ignore-duplicate-symbols.patch
default_src_prepare
touch config.h
}
src_compile() {

View file

@ -3,15 +3,10 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_unpack() {
cp -r ../src/tcc-0.9.27 .
}
src_prepare() {
# Note that tcc includes static-link and ignore-static-inside-array patches
# since we do not build from clean checkout.
default_src_prepare
patch -Np0 -i ../../patches/ignore-duplicate-symbols.patch
touch config.h
}
src_compile() {

View file

@ -3,15 +3,10 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_unpack() {
cp -r ../src/tcc-0.9.27 .
}
src_prepare() {
# Note that tcc includes static-link and ignore-static-inside-array patches
# since we do not build from clean checkout.
default_src_prepare
:
touch config.h
}
src_compile() {

View file

@ -1,41 +0,0 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -ex
cd src/tcc-0.9.27
# Patch
patch -Np0 -i ../../patches/static-link.patch
patch -Np0 -i ../../patches/ignore-static-inside-array.patch
# Compile
## We have to use 0.9.26 to recompile 0.9.27, 0.9.27 is not self-hosting for
## whatever reason.
tcc-0.9.26 \
-v \
-static \
-o ${bindir}/tcc \
-D TCC_TARGET_I386=1 \
-D CONFIG_TCCDIR=\"${libdir}/tcc\" \
-D CONFIG_TCC_CRTPREFIX=\"${libdir}\" \
-D CONFIG_TCC_ELFINTERP=\"/mes/loader\" \
-D CONFIG_TCC_LIBPATHS=\"${libdir}:${libdir}/tcc\" \
-D CONFIG_TCC_SYSINCLUDEPATHS=\"${prefix}/include\" \
-D TCC_LIBGCC=\"${libdir}/libc.a\" \
-D CONFIG_TCC_STATIC=1 \
-D CONFIG_USE_LIBGCC=1 \
-D TCC_VERSION=\"0.9.27\" \
-D ONE_SOURCE=1 \
tcc.c
# Test
tcc -version
cd ../..
# Checksums
sha256sum -c checksums/tcc-patched