Rebuild musl libc after building tcc-musl, and then rebuild tcc-musl

This fixes an issue with printf not printing doubles or floats
correctly, and probably other subtle issues.

tcc-musl also uses floats extensively, so rebuild it as well, to fix
some other potential issues.

Update checksums for all resulting binaries which have now changed.

Co-authored-by: fosslinux <fosslinux@aussies.space>
This commit is contained in:
Paul Dersey 2021-02-19 11:14:54 -05:00 committed by fosslinux
parent 58fb72be92
commit 756ba1702b
21 changed files with 153 additions and 79 deletions

View File

@ -290,7 +290,8 @@ patch `tcc` in the next step to ignore duplicate symbols.
We recompile `tcc` against musl. This is a two stage process. First we build
tcc-0.9.27 that itself links to Mes C library but produces binaries linked to
musl. Then we recompile newly produced tcc with itself. Interestingly,
tcc-0.9.27 linked against musl is self hosting.
tcc-0.9.27 linked against musl is self hosting. Finally, we rebuild musl once more
with the new `tcc`.
#### Part 22: m4 1.4.7

View File

@ -1 +1 @@
6fe2a7c7493480b8ba6d1145d10b5dc97f0d11d10c0da7c96e939a334e4aefad /after/bin/bison
d1d920df7532cd241bd9f0fd37a0c7afd0e913c8febb57bf656e3536906d53e0 /after/bin/bison

View File

@ -1 +1 @@
0d95976908f41c34195d634863144acf9ae0b1d2c04647fdf5cfd3103beec4dd /after/bin/bison
12a0abc771784a7685ad46a0c29d1bcdb5add96096a7818f513b932fa7b8eb04 /after/bin/bison

View File

@ -1 +1 @@
b02a549930ed891d40ef85060e3d0ae1d681830d7962237a9d99c6eeea23f4ef /after/bin/bison
c5579cdeb15e52c3b3662ab894550ff3436968953861702859af72d7b9fb8e98 /after/bin/bison

View File

@ -1,54 +1,54 @@
e72c5b0ebff9c8f72cd40355eb6baed175bbfc3addaa16ec6085e6a0e850a028 /after/bin/install
ad6bf7547d6b38b3ccd2ae389ae4fd8a31a57138507b289305ad40d2d1b640ba /after/bin/basename
182ed1dd7bada465e34ef89af126119a4f02b4a9a1ab77ddb3d59fe366115d71 /after/bin/cat
9d5e12cd79d3e5fac23205d09ee2d26dc6070c2fab06e86e03c048b4b810fc35 /after/bin/chmod
4baa1a727b4cb9739e8095fa205d21ec14543a5ca2660c4c5e187848c8b6285e /after/bin/cksum
57c4bc1e89be122e7269d5306f90317082346d5cf9f1b7ce8210664911a1d2c0 /after/bin/csplit
8b8f0c8ab7538f6d972f6e13c1d3b51b3a2b09185f649471d018c77813b0f208 /after/bin/cut
21eecaacde1c44ae6bb944743d7bc61806bcb3fe24f792a1da1fced1f6a2d5a1 /after/bin/echo
c6c56ca458452782a7014c194b4001e13b89a1cdae42f699f42e527c535e6b30 /after/bin/expand
b5bb5ba4d52da5e86d8fc80c831a229cc4c057644e886c367711eab571cf8aec /after/bin/factor
25ab087dad2bdec3d8a0c51b93f1aec42516085905232b908dd19ac620727932 /after/bin/false
1fabff3d2bc61990fd94f9ed5055032cad1b3982a6effaaaed9d76d553708e17 /after/bin/fmt
ca21a324c2628d66994c19f444739d112246ade4eaaac71ab76f41751b5c6f9f /after/bin/fold
6b7b368cec7d0402c0cd17f1d59066dbf46c81345435cf994046e1f535853808 /after/bin/head
9afae9c301cbcfd25bc50efe47f92a90be8801772f83f6455197048df0161f42 /after/bin/id
dc62c58ca836141a6476135c9a20b01aa75f4403ffff0dc08675d285f2c31730 /after/bin/join
e8eaf3838c0ebd70f3ef5b475fcbe32771e1fd16db57a780212ff01af829b8be /after/bin/kill
9160804d2a84af504ce9ccb793b511b114b33e67b71e282101a7c85a5d1eb827 /after/bin/link
a9696d75821b2964b29c0a2f896964ac5bd723509ba940903f5d3e5a4ae28cc7 /after/bin/ln
66cc6ec8440ac2635c3e8c8a93618448a3b0ac32a2828d2c58ea4b04c43a0624 /after/bin/logname
0c006ee959d0bb585449e8cc03c7a4e8bef654d548f8e65adcf5d7c116828320 /after/bin/mkfifo
e8ce9b04108e6faeaf4e506e98ccb42d501af0c5c7b999ada0ac589eeef8e076 /after/bin/mkdir
696a2c4448890691317e9d2fd6097b635d9825e80eb4dde0430a617d68b7e2bf /after/bin/mknod
779f4108063fbbf2026f2948f6caf52dc834b4a22f74e43b3ebfce15ef111061 /after/bin/nl
a0b6658f0f27fbf753cd4617d33f1f9e82bb973d342e83e229ce48c09d5e8d86 /after/bin/od
fe7afbb1ac9144cfd13bf8955f0474740a192de00f37dc4f549032b74013422f /after/bin/paste
bbc99502af4745aeb45989adc055dc3d24d86b4f43ba63178b6e39912ee19750 /after/bin/pathchk
5860714658263857e0b8061d7d483b1a83e25935e45e47b8430465e1f751b908 /after/bin/printf
b43ab09f2edd05645e59a5b9be05ae0bf30d7b38585c59bc25ec46ef3c82f327 /after/bin/ptx
d3d0223c690358d5c392619396cec73dad97a84efbfcf959c7507efd0aef5708 /after/bin/pwd
53c504ac4df5e12bbc345a6ee78d3eb8f916263ae464d694d9e0f8334ff976f6 /after/bin/readlink
b58288bcad22f69ad34e1a91e1a5dc67544589f62b38bbff95a057f5600cefe2 /after/bin/rmdir
7871b2d181bf1c4460b0f78b91fc0ae6ccc9528bc7ae941367b066cb7b72cd0e /after/bin/seq
b1d8b246b3306cfc2491c81cf00969396e1ec5cfd3fa73012aa8fed0ce1446b0 /after/bin/sleep
8bf47b44f6a506ffed5d0f69791adc8463968b5562413186dd8a71ee595d26ee /after/bin/split
ae10f35493f3d275af4ffe70281ecbc72b047ed7d48620a9109e60c159a3c36b /after/bin/sum
10083826d7cb1a42e7061811f20548e4d24432b3e646f6d0ab537c0db6dabd48 /after/bin/tail
48558bc37919c524a1cbe674142484cc1027bf0010d3f68fb93403fc148de9d3 /after/bin/tee
0455bd0c814663287a2807bf78859d5f43aa7a2490c4da0c07d29a32df772dca /after/bin/touch
f31fd1fc30d2e0b16a37b277f4fe608f6a756cc4d09312d84f6a9ff86054eb38 /after/bin/tr
edc3b88d1de07f5ba7f59cf1e131476907ce59739ab2181bfd31d1ace2ee8a25 /after/bin/tsort
b68e707c10d51d4c7fce328e7619011d8baf6605df1058d9dd513e8671447fe7 /after/bin/unexpand
67900322d337e18a6782c5e81643a099c8775b1a4200eeb6808409db6e62eabf /after/bin/unlink
6201303021c9d6dffa796c50fec6e8f199efd5d00328373248531b6ec5ae27c7 /after/bin/wc
5de85a50c357e6450d616970479fa24c9965c5ce0c7f05da337d96510653811e /after/bin/whoami
4ed60b9f4dd8b7909fb69f07f5120e62b22eed0a746bb28139fab560538f2544 /after/bin/test
8165613f96eddbb107cf0a263789fa135a7a26c016bbcd2d69891294025a7fba /after/bin/true
82938399bdc017d8b60de8e22894c6b8cb7e377d4c72372b9126feaa7c9d1759 /after/bin/yes
c66b7e80bcfc8169d661a3b8529f179637c4df3441355a19cc900ba5e7c62cfb /after/bin/ls
e72c5b0ebff9c8f72cd40355eb6baed175bbfc3addaa16ec6085e6a0e850a028 /after/bin/install
ad7403999d4d48d30bb49f7433998a31e852ecb34242ebac9f7d09d4e8dfa25c /after/bin/md5sum
b7b46fd6f6a1c4871f76a35565ae94706a1f60ee645d5754d8c326ae9ca97117 /after/bin/mv
1bc536cd595734a9f85524eaed18f5d1127bde3e74337bdf348108225552975a /after/bin/rm
d84999007c0f75f8ed1aef1273b251bac868f4f2f5f6486a9ee1a0c04d95b1be /after/bin/sha1sum
6c2c4baa6e75c00896b01ceb4e2f0ef62b59a7f27184ac1c5bf85f6da2983ae5 /after/bin/install
fafa676fe85f662f753bb5257ba6575086c6d4d7b8b27a952624db08e136b1ac /after/bin/basename
8b4e2b1ea346298b6534894e85cfa3ac4ee9bd1900da1d044a45c366d143dbf0 /after/bin/cat
24b11f735c4dcbd28e0defcef6208f419ebb3a7f33a5f7addb41d7df9e021bc1 /after/bin/chmod
8dd096b3a2973c4e3652e6bfffc30d2d85e8cb9b7f6cbbb2079cdb00a465589f /after/bin/cksum
220ee0e1e19ad52403794872fd879619c25e2bf6b22d9616799250f76f8b9960 /after/bin/csplit
15eea66971190c390da91bd8537c01b689e1cf24cc96cd256607ef437f07f41d /after/bin/cut
0884b23703671535b882cffe99720d18f0f915b9323184dc20c0b7ef1af9ec4b /after/bin/echo
76932efb69bc33a101a0a72424fc9dd50036b5f3fa09101d2d776a2e8aad7f3d /after/bin/expand
6e082caf5494d14d8e8eb0c8284942389198ac0fff8646c08b3136039a8a1579 /after/bin/factor
94132ca47c73ec70cc5f817a7d4c3de8ec37f7664564028c6daf27a1f2a75f37 /after/bin/false
ee5f43940b667026f2152ccde76f8d09cb99eb8adbea29be782876d236ce3797 /after/bin/fmt
5b4b347107c9eea9e984652ab9ebb8ed95a349a717fedc3e523195b69d7383ae /after/bin/fold
1b49cc4b6f706c6da74831223c57251298c494b09ebf0e513df9b6536cfa84ab /after/bin/head
c2af52d735a708ad30b7d493c19e2ef8a059bfc617af26a1e877077c7a25bf58 /after/bin/id
3e9b0e09d1da2ce9f6a2d0f212f6211e9ff53767a60f5fac040488da97da43b7 /after/bin/join
3aa7096a22e4056c7ae5329e71965a6e1f5eeb10c471cffd4b86f9de91684588 /after/bin/kill
f6d99b9010578b4e3112c70131083c27bfcf731862b021df2995fd5738c52b99 /after/bin/link
ae6e4cdad0a792a72674c487f3874f356a49a25d0d11ea0f9b2abdb466494a50 /after/bin/ln
576ddcdde28a5d21b953976134f4b89dc0380e5ccfd8c9c489faf44db6d0506f /after/bin/logname
cc82a9771ebfc62a744b3b5f8b05d7fe86944ff0e02d1a20ac959421238e19e4 /after/bin/mkfifo
20d933c6787e1edfe47c30601e713fd9e6199852c55bb7af608722516aaaf699 /after/bin/mkdir
e173f74b72fcfc6b17ae0653a5a88fc36f6ce42bf99e70de4245701bf2a45a50 /after/bin/mknod
f98ea6c094c9fda45204d228a58bc52ceba02a8bf6e778e855d434387a43e1cb /after/bin/nl
e49bba1ea6a61fb90f754e8de4692ed0810e7c68429f0b22fbf37670607a7807 /after/bin/od
9ed0744237c4025a83ee4cc1d4fdf1135e6435899284c6e070b1ceb9b74e0203 /after/bin/paste
8b03fcd11aba79282d571d1f8ac3ce8839051e3c059e1895cb05cf660901102b /after/bin/pathchk
73d93c19d18e44cf724dd8c22e7b2b562758275a42260ad43caa897471976d45 /after/bin/printf
293e7a730d7f746731deb9614b3afab805a097f9acf917d53e44acc3acd9cb4b /after/bin/ptx
fa7ff4f943ca592c623e41a303e697114a420c0a3e5d91c779dfd57ab39b7053 /after/bin/pwd
3550aefb0eee8a35b4aa46ac31322687e478cb0f03c833e6924e462963e2b0f5 /after/bin/readlink
1543d06fdbe7fe2a28d6f2aa0a4d8ef69d4c06f6fe8ba605933fed51eda8c7fa /after/bin/rmdir
291f7fdd7d43fc55da4a50d7c7ba9945568b31602e74fbb3ab94a8b25a039595 /after/bin/seq
4b7609bd5da6de314b418be80f1be1a525bb4756efb1e9925f0ae7814c6eedef /after/bin/sleep
5087a0f86f238062a85f2f6ca3e6b33ba6b3c8dd9700e314c1ae3b2af3331409 /after/bin/split
35f681f7cc31a895f5c5e0db8b6a3c203b2ed9ce1771503f198614302e42c600 /after/bin/sum
7272d4fb3313ad3e19c79393d8785d4b343a915e605332eebbc8f5ac5338e071 /after/bin/tail
c2c6fae2cad8e29a75ff3f793ca7d059cc50ea4ee7d55f659e8f2d371f7763d6 /after/bin/tee
572c000df8155d4153f68b7e1b1a0e2c10c233c092da3ba1665b5b21aa3093e2 /after/bin/touch
643d2912f2055e70284ab036d6d154e4667120726486c3a3329fdb5115b452f2 /after/bin/tr
75d4e74c03ad027b1b7738e6049ec5c01cfdd7a665ec82e0ecdf921d440e71a0 /after/bin/tsort
0a51c8f6dc3ea15fd439e11a14d7c13d7094457e17129e7f5de51d886ed8f54e /after/bin/unexpand
abda7abe33205cda90734216bd3f2cc1dcf859db166d2d6297665a4d178e6bac /after/bin/unlink
f033207cf5de1eac8f4726b1926a33759b294050090932a6f7de6a6d98a8f9e8 /after/bin/wc
46f35124f00bcee7ec557406228da3abd04239be7b0ef0c10403139f1e0f0dd7 /after/bin/whoami
b8942c4ecd012efd53b74a8c5fec424020a7099356c4db017115499016237876 /after/bin/test
8bc7be81630efacca243feb8ecdaa97bc1d0b5a4060e0decf96af49875a06b00 /after/bin/true
84109c279ed6445c896fe04a397bf66e1f73f74200f8e58477e828aad7e43c92 /after/bin/yes
0f5fe59d628457041d4cb66ba6dfa27dd25c959aa65298db914c2524c9927d52 /after/bin/ls
6c2c4baa6e75c00896b01ceb4e2f0ef62b59a7f27184ac1c5bf85f6da2983ae5 /after/bin/install
3f43cf65e4ea8b713096607ce7b28c835dacaa0d18bb27fd664156b43b02639a /after/bin/md5sum
7fbafb8ac8aded995076404ea8c35392c3287a4ae92f7683baf445e321ba1a0c /after/bin/mv
5bb0d9ac5acc086b1bbcbd9c2f77f124efcc93e5802194a6aabce05c368b86c4 /after/bin/rm
c086a3b03be0da5fb7ffc5d3d666b9b8a340bc74c9d7c208123c55887c371147 /after/bin/sha1sum

View File

@ -1,2 +1,2 @@
4e02244d35aec2a439e67805574ff945aec2fbb5c20fc6d7aabe46e9c1ba09e9 /after/bin/cmp
b5c4cf04c70c93a26d61589671ea7e1dcb3bc3f1a565720a328d6d80e314538d /after/bin/diff
c3d87abbcc66ac9db7c7c52c808632cefb1ed5b2c7a779f1f1413247e5e2677c /after/bin/cmp
3ebd884138bdec61da56ab063ec1ef8f1913fe8a7d2ef3a12c79fb25064a983c /after/bin/diff

View File

@ -1 +1 @@
cf92dbc55dd58f4212443e998635bab855422391ad40e97ec67fb266f07d849d /after/bin/flex
3507fe902492ff1ffab5b5b74efecda17cac3b66d45b49e1d05ba9cfe5f7f65b /after/bin/flex

View File

@ -1 +1 @@
c0c1ec4e274d7dbcdbef3eac580d064f6a1ad5a0aef25ca1c329a72965f98865 /after/bin/gawk
ae63d80491e417d3b9d0daa2de789db398354913066f7cb0c681b23e80d57cd6 /after/bin/gawk

View File

@ -1 +1 @@
1acd145236315018b46591a3a9bb5f86f995ad318cca6d34ee8e25db81478d92 /after/bin/grep
107f1df091f5d1d7ad19def977135361836755eaab2120548afab7b23c582370 /after/bin/grep

View File

@ -1 +1 @@
58b1e4d808fd498aad2a19eabe06527f588508d45f0d10925295c73259ef4062 /after/bin/m4
f5f6c78bf8aa179ded5eba5601132761968eda627463c418e8e1daa2e84defba /after/bin/m4

View File

@ -0,0 +1,14 @@
457fff81b3188b82621f3ae49847ebc60128017fcbdba012245169af76cf122a /after/lib/musl/crt1.o
e3560c563125643467b29842db7984ccd1ecd3a6010358f9096674e199e36e05 /after/lib/musl/crti.o
b3a8cf971e9870bc3b2aa8fb8fc082b6a222cc0540a70f122a76ac6ced9151d0 /after/lib/musl/crtn.o
7827b2b47c4f73c4e9d569aa0fa28768646f25f75157b680e6ef12407f0c53a3 /after/lib/musl/libc.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libcrypt.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libdl.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libm.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libpthread.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libresolv.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/librt.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libutil.a
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 /after/lib/musl/libxnet.a
b60b59a94f10f039977cea2cea6f15b55b402b25df2e1b2a4e83fa84ccf2fd43 /after/lib/musl/rcrt1.o
a50500329680bed4dcc5ec3891fd50f65af9cae7de0b8e8fe925c37f1c6bb16b /after/lib/musl/Scrt1.o

View File

@ -1 +1 @@
03a11370e2e37f8edfe9d73e6f52e7d8778425f75bd140a8ff01f61a1ecf5a22 /after/bin/perl
58a0fb48b79d5776dde4a8849a974de7dcac71b2052eb3f463b91d8b4581c9e2 /after/bin/perl

View File

@ -1 +1 @@
fc9285ff53bc43b5b0e21880c72323f3bd14fb613151295bfa5afc13addc4765 /after/bin/perl
bcc7f667b0943049c3e75a08f1054c1797a53b4189cd2441700d150a758631a8 /after/bin/perl

View File

@ -1 +1 @@
6e019830d36d928e8eeee45d768f29b85d006a6c487852788c02639d15ee660a /after/bin/perl
8bd1654c3cfd12a34a6ae3ce69ebce1a6bcb37ec810f5574fad226d33ac66b9a /after/bin/perl

View File

@ -2,6 +2,7 @@
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@ -15,41 +16,47 @@ export PREFIX=/after
build flex-2.5.11
# Part 21
build musl-1.1.24
build musl-1.1.24 musl-1.1.24.sh checksums/pass1
# Part 22
build tcc-0.9.27 tcc-musl.sh checksums/tcc-musl
build tcc-0.9.27 tcc-musl-pass1.sh checksums/tcc-musl-pass1
# Part 23
build m4-1.4.7
build musl-1.1.24 musl-1.1.24.sh checksums/pass2
# Part 24
build flex-2.6.4
build tcc-0.9.27 tcc-musl-pass2.sh checksums/tcc-musl-pass2
# Part 25
build m4-1.4.7
# Part 26
build flex-2.6.4
# Part 27
build bison-3.4.1 stage1.sh checksums/stage1
build bison-3.4.1 stage2.sh checksums/stage2
build bison-3.4.1 stage3.sh checksums/stage3
# Part 26
# Part 28
build grep-2.4
# Part 27
# Part 29
build diffutils-2.7
# Part 28
# Part 30
build coreutils-5.0 coreutils-5.0.sh checksums/pass2
# Part 29
# Part 31
build gawk-3.0.4
# Part 30
# Part 32
build perl-5.000
# Part 31
# Part 33
build perl-5.003
# Part 32
# Part 34
build perl5.004_05
echo "Bootstrapping completed."

View File

@ -1 +0,0 @@
9819c29a2c8259883b4a97d6b57f2fdac87b9807ba9594f7c063601a7fe84af9 /after/bin/tcc-musl

View File

@ -0,0 +1,2 @@
9819c29a2c8259883b4a97d6b57f2fdac87b9807ba9594f7c063601a7fe84af9 /after/bin/tcc-musl
dd2f569a10a5bce7a8d264a9a04a86be9c3c1293df64c907370a8d5088c21e65 /after/lib/musl/tcc/libtcc1.a

View File

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

View File

@ -0,0 +1,49 @@
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_unpack() {
# Our cp does not support recursive copying
tar -c -C ../src/ -f tcc-0.9.27.tar tcc-0.9.27/
tar -xf tcc-0.9.27.tar
}
src_prepare() {
patch -Np0 -i ../../patches/ignore-duplicate-symbols.patch
}
src_compile() {
export prefix=/after
export libdir=${prefix}/lib/musl
export incdir=${prefix}/include/musl
export bindir=${prefix}/bin
mkdir -p ${libdir}/tcc
tcc-musl \
-v \
-static \
-o tcc-musl \
-D TCC_TARGET_I386=1 \
-D CONFIG_TCCDIR=\"${libdir}/tcc\" \
-D CONFIG_TCC_CRTPREFIX=\"${libdir}\" \
-D CONFIG_TCC_ELFINTERP=\"/musl/loader\" \
-D CONFIG_TCC_LIBPATHS=\"${libdir}:${libdir}/tcc\" \
-D CONFIG_TCC_SYSINCLUDEPATHS=\"${incdir}\" \
-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
# libtcc1.a
${TCC} -c -D HAVE_CONFIG_H=1 lib/libtcc1.c
${TCC} -ar cr libtcc1.a libtcc1.o
}
src_install() {
install tcc-musl ${bindir}
install -m 644 libtcc1.a ${libdir}
}