Skip to content

Commit 68d396e

Browse files
committed
Setup to remove pregenerated header files from musl 1.1
1 parent c5175b4 commit 68d396e

File tree

12 files changed

+144
-41
lines changed

12 files changed

+144
-41
lines changed

parts.rst

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,9 @@ from building many newer or more complex programs.
399399
``tcc`` has slight problems when building and linking ``musl``, so we
400400
apply a few patches.
401401

402+
We also get rid of a few functions from ``musl``, as they rely on pregenerated
403+
files we are unable to generate at this stage.
404+
402405
We do not use any of ``/usr/lib/mes`` or ``/usr/include/mes`` any longer, rather
403406
using ``/usr/lib`` and ``/usr/include`` like normal.
404407

@@ -422,6 +425,19 @@ tcc 0.9.27 (musl v2)
422425
Now that we have a ‘fixed’ ``musl``, we now recompile ``tcc`` as ``tcc``
423426
uses floats extensively.
424427

428+
grep 2.4
429+
========
430+
431+
GNU ``grep`` is a pattern matching utility. ``grep`` is needed to rebuild some
432+
generated header files in ``musl``.
433+
434+
musl 1.1.24 (v3)
435+
================
436+
437+
We are now able to regenerate those header files that we couldn't regenerate
438+
earlier. We unlock the full range of ``musl`` support, required for a
439+
number of applications (e.g. ``flex``) before the next ``musl`` rebuild.
440+
425441
sed 4.0.9
426442
=========
427443

@@ -485,12 +501,6 @@ a 3 stage process:
485501

486502
Finally we have a fully functional ``bison`` executable.
487503

488-
grep 2.4
489-
========
490-
491-
GNU ``grep`` is a pattern matching utility. Is is not immediately needed
492-
but will be useful later for autotools.
493-
494504
diffutils 2.7
495505
=============
496506

@@ -692,10 +702,10 @@ In particular we can now use full featured ``ar`` instead of ``tcc -ar``,
692702
the GNU linker ``ld``, which allows us building shared libraries,
693703
and the GNU assembler ``as``.
694704

695-
musl 1.1.24 (v3)
705+
musl 1.1.24 (v4)
696706
================
697707

698-
We rebuild musl for the third time. This time we can use GNU as to build assembly source files,
708+
We rebuild musl for the fourth time. This time we can use GNU as to build assembly source files,
699709
so those assembly files that tcc failed to compile no longer have to be patched.
700710

701711
tcc 0.9.27 (musl v3)

steps/SHA256SUMS.pkgs

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,39 @@ d5fcce4baea5e11f983a7e4b7148545ab6720bb4e010898c73387f6711be67f4 autoconf-2.64_
1616
57100612d902537b72ee2fd3dfecc903f2ea3959f1a480af87c6a1ef9a9d7c03 automake-1.16.3_0.tar.bz2
1717
1c7e09ac08f156960420fca1f6e8560c1855bf01b001a0648b56153d6ceb9c28 automake-1.6.3_0.tar.bz2
1818
444131776779d1f27628088a817bfb8c9aa85f4b036b934794a71e484ec9bd70 automake-1.6.3_1.tar.bz2
19-
e8ff13753943e43972a8cf1672819f001718ed38e5497cf7b554c21a507ba22b automake-1.7.8_0.tar.bz2
2019
ef08694bf8e78ffcf56f9c8a63b0f189e301c06f02ab240e15e4c7fe354c2a0d automake-1.7_0.tar.bz2
20+
e8ff13753943e43972a8cf1672819f001718ed38e5497cf7b554c21a507ba22b automake-1.7.8_0.tar.bz2
2121
9922651b64ad2e29b944082f26db223008220155048f25d64df1f6d82071ff1c automake-1.8.5_0.tar.bz2
2222
c5807850a377e4bb9aa4121d9781d145bdd80327626a9419630a75ce2c8d9c71 automake-1.9.6_0.tar.bz2
2323
f8a55bf656f950ee3c5cea48af03f552166f6db9926b78c78843f3cc52a6e22d bash-5.2.15_0.tar.bz2
2424
ebc631ee8e9382650005984ec5f3910492ccb6fb2656b4c0af0f4afc16998906 bc-1.07.1_0.tar.bz2
25-
80328d87ef69df910a3f146009b668744a0363d80fb1f289a02941705d2161d6 binutils-2.30_0.tar.bz2
25+
5d777f774df7fb0153aa73b501c7fe1a57f152a3aa2c86e83a04e68b5df4f696 binutils-2.30_0.tar.bz2
2626
da658346866061324b92a6b734561257acfdb981783ad5794d67a0cd56e14e58 binutils-2.41_0.tar.bz2
2727
026447a32ab08a8a5150bab82a2f150af4a2ed90c47cfde631e1460eaed019aa binutils-2.41_1.tar.bz2
2828
f0bb18831983493b82fde53917e8d16c6a380761ac5e71e14769a82193fee788 bison-2.3_0.tar.bz2
29-
e4a3c9466d95c58bb072159da3473d71b40eb069b756acefba293588c4495a6f bison-3.4.1_0.tar.bz2
30-
fd3a3b855c3cbc42d719a0cbbae773d27e0e12b563641124ba2870b7103da1f8 bison-3.4.1_1.tar.bz2
31-
5232f6f8f3864b5827a015ce0414d484bb8aeb9f34ba66ceb7093da0a79561a8 bison-3.4.1_2.tar.bz2
29+
81554c867db75101422797d227dd76c8a12c87246393126542ff92a0b97db6c1 bison-3.4.1_0.tar.bz2
30+
f7437edc081071cc3ecd3384abf4c63f33183858b8cae6b4ac3105c66f88b3b6 bison-3.4.1_1.tar.bz2
31+
8064a96c8ccfbab1245554ac30e68fcc73da24a3dd02f8450658fdb106c7f405 bison-3.4.1_2.tar.bz2
3232
6d5e4debdec03aee096dbcefcad878fb5c6a069f895ee7ade878d9eeb97fb83e bison-3.4.2_0.tar.bz2
33-
727b0f28369b78f171dce4e227b05cea474dcb638c357387429c125f0d80fbc8 bzip2-1.0.8_0.tar.bz2
33+
e8271c1213b6cc7c9ae2ddb018cd093cbbd5f6e842548c0747ce95b13b6b9447 bzip2-1.0.8_0.tar.bz2
3434
96b6b91e1d3c5f48da471f10dd22415fa05baacaafe964cc86285493d0ca27ce ca-certificates-3.99_0.tar.bz2
35-
da3a3c7e0e6ce94ccb3d39885bc44207eb94c912b324a4c7669b5a752648b02d coreutils-5.0_0.tar.bz2
36-
56b84ab2035847524d595bb417c2b91c290174965550be321cd3d5d1f77aa2e5 coreutils-6.10_0.tar.bz2
35+
982a3496ce3277c562acc896ba796939fe55a37432b2c76ab16b76e051a045a2 coreutils-5.0_0.tar.bz2
36+
27f283c42e2728d0d0682d56ada44b11ff11d07843e595c133a43f4c6aef53d0 coreutils-6.10_0.tar.bz2
3737
9fa31a4aeaa5132205efb796c8f546c94c1cfef6b5c27e64f6ebe06ca0360e67 coreutils-9.4_0.tar.bz2
3838
abd629e5675196c39dae00afbe23e2116bbd277be1d82214e2ec557a3b03994f curl-8.5.0_0.tar.bz2
3939
db8757b5fe77f56073caa034bfe9b3af6076d7299db966c4348e06f01a34415f curl-8.5.0_1.tar.bz2
4040
9534d834b018343b8335d0ef0b5faff3ee18e4ecbecf43a2a80deb972283f5d6 dhcpcd-10.0.1_0.tar.bz2
41-
e6372051f90c40d1f4a5cca2f8930187b363dfc916bcb973c72bca6c0aba3cd5 diffutils-2.7_0.tar.bz2
41+
0462b6a04899a98d60c33f9d16fa00e2e6b7c21cc80ccebc8358fc08105467a2 diffutils-2.7_0.tar.bz2
4242
41e3129b974391fe4ace69914fdef9b0fe72c6f5d87d495750fb89bdd999fa01 diffutils-3.10_0.tar.bz2
4343
283a66575b4d7c835f6ebabb38cfb5d7d62032f832ad949f067a85b8a378c36c dist-3.5-236_0.tar.bz2
4444
26c0835a8b9be115082a2866e906363947528169c7274bd3b82752df77e99f11 e2fsprogs-1.45.7_0.tar.bz2
4545
9c6f7e156f299f1d0948537e28f00d40e727a3debae3cce158e9bce827136214 ed-1.4_0.tar.bz2
4646
0061d240f9bb2bb534db7003ddcc4eae9981954ad72e8f41ff1d76dc449ebd37 file-5.44_0.tar.bz2
4747
eec07e0d710ed3dd8d0ba6a1ec6ca9f1fa3a611bbb225195435679175317bf90 findutils-4.2.33_0.tar.bz2
48-
80798628ccb38521f42e1ca1abe4f0244e4b283e6f662cd354ab70e61a9b4675 flex-2.5.11_0.tar.bz2
49-
62b4ba8e73daf1f4ac4fc1f90e99394e40d7c03dce9fed8539dbc01d024c62e8 flex-2.5.33_0.tar.bz2
50-
e10060b55e2378a065cf8590cae17400c8befc6b3bb0cbbb7093f1b9f46ec4cc flex-2.6.4_0.tar.bz2
51-
5619cf9a893902491a9d8a8f8da4d39efb3606d7d0a72cb4aaa9d1ff798b5495 gawk-3.0.4_0.tar.bz2
48+
6f2194592682f4a448ccb0aa897e707a8a00eeb69d4b1f5f0236eb6d0fef6242 flex-2.5.11_0.tar.bz2
49+
b3a8d59229289ca5a1de6a24c9c828d2847144f6662e0d5b7f41e7ff6e57abaa flex-2.5.33_0.tar.bz2
50+
7bd44ec26cad78e5bb146e5ab709d489b6589da6049e319a4f438603f10eda4b flex-2.6.4_0.tar.bz2
51+
c925739472260498342ba6dc3263da937abf5237e7e9102622bf5657ec98094a gawk-3.0.4_0.tar.bz2
5252
62e90abe883f6ccd679adf42d00c2c18a9809bbab599411c81b6c4ac4d446452 gawk-5.3.0_0.tar.bz2
5353
6de1c1380026ef9948387e665610185b6014f47a80453177a6c81898c95cbbd3 gc-8.0.4_0.tar.bz2
5454
c99d080cf17ac3f75cbae67095cb76220a92d96d877c92c896a7f05c9c94e92d gcc-10.4.0_0.tar.bz2
@@ -64,7 +64,7 @@ c1989fc2855dbb0350c4e5b677028306614a9f4b5cb6c01fd459c5e1abf592b9 grep-2.4_0.tar
6464
7e1909855a4896d42f92b3564302a9018d3443cc84efb114894ad517397b0585 grub-2.06_0.tar.bz2
6565
e2a85aad6d51e52c9a30afeed058f95172fde1215f77243549274672990f6237 guile-3.0.9_0.tar.bz2
6666
6585ae3bc8149ec0e3fba766278fa30e2d7f0e7d1b9a9a4a457e0afa15b109c9 gzip-1.13_0.tar.bz2
67-
29a1603101cfbe2660e2d695f5b9c08dc9eefd8e3389405a6530c479e271821b heirloom-devtools-070527_0.tar.bz2
67+
d0cb00116d742d4216af4a7ed47f20408640229909a497c184aed3d4fcd4f30a heirloom-devtools-070527_0.tar.bz2
6868
8d2015b87337abbf287f7a39ee4cf53514120b5d3e90a93fe7d533dcc43f14fa help2man-1.36.4_0.tar.bz2
6969
ea5639dc6198c5f243362a1a7adfbea0cb779e085975712a1b410e82d7e0cf84 kbd-1.15_0.tar.bz2
7070
50a0f881161c68fe7c9ec6836b11a905b0d54e08e99b2476e8d1f5ac3212769e kexec-linux-1.0.0_0.tar.bz2
@@ -79,41 +79,42 @@ daae709e98d2df2190d1d13b4e86f7f3fe90fa7a975282fe0bb03289b6539f29 libtool-2.2.4_
7979
503007bbcddcf4e49d26514c59b4c9501f8b42f0c994a59dfdc388b1ae6b7900 libunistring-0.9.10_0.tar.bz2
8080
540927c71fb1682175e32a655dfd4a987c494577549bf30e79ef3b1e4f039a4d linux-4.14.341-openela_0.tar.bz2
8181
c97644d0db5b3de127b048683afee6d31453441d97ba5dea71df5838b13542a4 linux-headers-4.14.341-openela_0.tar.bz2
82+
d4dff784cac3d58d0cedfd9a51b52ff100ad8654e10a7c8c41590351f48f57d6 m4-1.4.7_0.tar.bz2
8283
78b0cf6d9312e53c613186cbddd5f747310f375c1f322f33a6ac33682d2f3389 m4-1.4.19_0.tar.bz2
83-
0e3c21b0a1d8ca0c3f74a98ebe268809def62778ff4a486ff20c1d6e8247dc49 m4-1.4.7_0.tar.bz2
8484
e69554b0a77b419ddd5d0a0e418ba4005ecd0f6784c92a6928a0270bd929a098 make-3.82_0.tar.bz2
8585
6d24960d6a987f68a7e0e3abf6edb52d2e0fe4c86f6ba45327e9634dbf7d40b4 make-4.2.1_0.tar.bz2
8686
17cd976bc0f6e897c6fffe43dd7c55d93ce0adadf1b4dc72925b80e2d266519f mpc-1.2.1_0.tar.bz2
8787
98a9f55c01ed375fae21913284e7fa07ff434c0810f34d791f3fbaa1df221302 mpfr-4.1.0_0.tar.bz2
88-
258f247f20dd1544c65f7f978f7399a16e4b655375be7b1d94ad89e24ebaac94 musl-1.1.24_0.tar.bz2
89-
6966b565124ac639eed3dc38b7a8a8948066d6a1e59e097ff10f5e531ff15e53 musl-1.1.24_1.tar.bz2
90-
d58d85c4be26d90f111f273929a4998d05294fe5aa37c4842d5aecaa593e6079 musl-1.1.24_2.tar.bz2
88+
5c590124471cc8c42b45d863c417314d05d9c89b1a3d61db8a36ba9b459ed391 musl-1.1.24_0.tar.bz2
89+
fc60028b78ac34eda780478638818c5f587873337cf68f607082a3a81bae28ea musl-1.1.24_1.tar.bz2
90+
5bf3cd3b9e5e12f88c492ba653006b4325a535ef5581d775f18a1338fc57b457 musl-1.1.24_2.tar.bz2
91+
d58d85c4be26d90f111f273929a4998d05294fe5aa37c4842d5aecaa593e6079 musl-1.1.24_3.tar.bz2
9192
81f79a0faf58e105c5f12d9f538d3ea7578a3b361e633ab8f47324ec23ec9de6 musl-1.2.4_0.tar.bz2
9293
6dc5e763b747b66f72692c6820d7f46b7f4cf2e2fe05229a1d01c03919c1c936 musl-1.2.4_1.tar.bz2
9394
820203286127e7c22cee9f1b3cff664431f10d14c3f22f00b3e771fd849fd449 musl-1.2.4_2.tar.bz2
9495
a18c4b2e5de2bfe5bb3ee9d360484fcfebad3df042f1859d4aa333dd60f55e56 opendoas-6.8.2_0.tar.bz2
9596
67b536b2f2a6c56e4673e462a3dbe2f42e8a4a5cb0b61b6bc1fdc14adea33f63 openssl-3.0.13_0.tar.bz2
9697
71864d042cdc564b65eab21360902c714e9b43f80a19689c5600589529b267e7 patch-2.7.6_0.tar.bz2
97-
287b0a8c0de14a2817e68ab023bfc502a0880d8c34386162351d5ffaf942da70 perl-5.000_0.tar.bz2
98-
9617799cdc9d4be39d31af54b9bcae47941d68416e9cc9c92cbc2ed08785dbc1 perl-5.003_0.tar.bz2
98+
44456a0635dc56351d34bf9701487e562c2c903393db2cc99f5c3a6d2ecf52d4 perl-5.000_0.tar.bz2
99+
0b7ded1733433323c2056b1005828aaabb8aaca9505839333a8e80f12669f203 perl-5.003_0.tar.bz2
100+
012cc360816f8f46541dbb988578bcb13985c3130ee3bcf2fb9d63cc994c7e8a perl5.004-05_0.tar.bz2
101+
a2cbb76d60e5df1ae2439297f9e01fe9903175db600d65efb4a45e3bdaa12eb2 perl5.005-03_0.tar.bz2
99102
74d64a8af080022432fa94dba449090419d25b103d247710dc0b6102a4ad86a6 perl-5.10.1_0.tar.bz2
100-
5321a3a3bae7d689b085b415f4f445ebf19b801514340879a2b4c1bf97f05533 perl-5.32.1_0.tar.bz2
101-
d63d2fda752759778ae2d0dd08e6c023a81afbfc63ce11db860fc6858ae26c7f perl-5.6.2_0.tar.bz2
102-
c39ab70bce0bd09f013109ad7370085e90d77ef2b55abcfdc922d7832524c9cf perl5.004-05_0.tar.bz2
103-
2ac211ad3cf966dd89434c175970e10699c363b66228abc1642766aeafe2766a perl5.005-03_0.tar.bz2
103+
d381e910532061ac97e48ff09906bddbcb0956b37fc47d8c666f56a56b50c589 perl-5.32.1_0.tar.bz2
104+
65374665ede69c1b7944daa4658d90b9be21923f395ab0aac8f0fd2162d57705 perl-5.6.2_0.tar.bz2
104105
1b9d4260edf7b2241d10e4c4ad17d0f90047bd4bf42f2487a7133902529e9dfe pkg-config-0.29.2_0.tar.bz2
105106
2f7198009e4d021d52ee4ce86241b4936fb88349c20cc8b6c286261368878c3c python-2.0.1_0.tar.bz2
106107
b5d86ddc98cfbc684b03f1c84c786caaad810d5e4c7be38089f324eb3c276ad9 python-2.0.1_1.tar.bz2
107108
396577cdd0cc61d76420a1771c64156e49e8f9d00430c82feb88ad933b341632 python-2.3.7_0.tar.bz2
108109
2499cb7f10f292c3506fbf1b6a876195179ec98edfe7b8c357140137a1449492 python-2.3.7_1.tar.bz2
109110
80d8fcaf68c82238ddffb120b62fbc20d58bd9e2416cba080547a9f442e9e229 python-2.5.6_0.tar.bz2
111+
abadb0d4d55d42ce722b4da96a075fa46b9b133112d619a9eda32a95c5a14945 python-3.11.1_0.tar.bz2
110112
3508248f299b73c50e3607c4c294d40face05170476a5026b0821aed69025863 python-3.1.5_0.tar.bz2
111113
12b1ffc7ec98ba8f807160b93ba69a694d5395567c3bcac1e49e8f8d1d50de43 python-3.1.5_1.tar.bz2
112-
abadb0d4d55d42ce722b4da96a075fa46b9b133112d619a9eda32a95c5a14945 python-3.11.1_0.tar.bz2
113114
60b93253a2078f849f81e7e1ed6233e30702f03b1893640eee95671d814f5514 python-3.3.7_0.tar.bz2
114115
da7c8ec579dd225c0d8bee63d95aeeb27ac2d5a60d4eefe298508cbf86bf506c python-3.4.10_0.tar.bz2
115116
af7a8334045fed8bd610b19194c0b46aa670070fc4738c34449ba5e93e49db8a python-3.8.16_0.tar.bz2
116-
c313520567176dd9bf61a271ee56e06a62e944e862f9dc4564d94b7fc884c8f9 sed-4.0.9_0.tar.bz2
117+
18d517fa1195aa82e3e0eb7f261eb3addb9a43492040b16be04571639781577e sed-4.0.9_0.tar.bz2
117118
e8daec00b2c2de7b18efbec057dc9290eed06668806c6f5a48914d4a5cd95eb4 sed-4.8_0.tar.bz2
118119
ef2f2c791c1ae74f19c98ebcd7edae6ae28bc1d9367cc3a2cdb1ac302a156cb7 shadow-4.14.3_0.tar.bz2
119120
912d8f344104f1322255d6210c7c7e1371413ab530b2c6796e6aa565c74bf647 tar-1.34_0.tar.bz2

steps/manifest

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ build: musl-1.1.24
6464
build: tcc-0.9.27
6565
build: musl-1.1.24
6666
build: tcc-0.9.27
67+
build: grep-2.4
68+
build: musl-1.1.24
6769
build: sed-4.0.9
6870
build: bzip2-1.0.8
6971
build: m4-1.4.7
@@ -74,7 +76,6 @@ uninstall: heirloom-devtools-070527
7476
build: bison-3.4.1
7577
build: bison-3.4.1
7678
build: bison-3.4.1
77-
build: grep-2.4
7879
build: diffutils-2.7
7980
build: coreutils-5.0
8081
build: coreutils-6.10
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
SPDX-FileCopyrightText: 2024 fosslinux <[email protected]>
2+
3+
SPDX-License-Identifier: MIT
4+
5+
diff --color -ru include/wchar.h include/wchar.h
6+
--- musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85/include/wchar.h 2024-12-21 11:29:46.207537390 +1100
7+
+++ musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85/include/wchar.h 2024-12-21 12:03:00.494377416 +1100
8+
@@ -175,10 +175,7 @@
9+
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
10+
int wcwidth (wchar_t);
11+
int wcswidth (const wchar_t *, size_t);
12+
-int iswalnum(wint_t);
13+
-int iswalpha(wint_t);
14+
int iswblank(wint_t);
15+
-int iswcntrl(wint_t);
16+
int iswdigit(wint_t);
17+
int iswgraph(wint_t);
18+
int iswlower(wint_t);
19+
@@ -187,9 +184,6 @@
20+
int iswspace(wint_t);
21+
int iswupper(wint_t);
22+
int iswxdigit(wint_t);
23+
-int iswctype(wint_t, wctype_t);
24+
-wint_t towlower(wint_t);
25+
-wint_t towupper(wint_t);
26+
wctype_t wctype(const char *);
27+
28+
#ifndef __cplusplus
29+
diff --color -ru include/wctype.h include/wctype.h
30+
--- musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85/include/wctype.h 2024-12-21 11:29:46.207537390 +1100
31+
+++ musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85/include/wctype.h 2024-12-21 12:07:48.030354351 +1100
32+
@@ -24,10 +24,7 @@
33+
34+
#undef iswdigit
35+
36+
-int iswalnum(wint_t);
37+
-int iswalpha(wint_t);
38+
int iswblank(wint_t);
39+
-int iswcntrl(wint_t);
40+
int iswdigit(wint_t);
41+
int iswgraph(wint_t);
42+
int iswlower(wint_t);
43+
@@ -36,10 +33,6 @@
44+
int iswspace(wint_t);
45+
int iswupper(wint_t);
46+
int iswxdigit(wint_t);
47+
-int iswctype(wint_t, wctype_t);
48+
-wint_t towctrans(wint_t, wctrans_t);
49+
-wint_t towlower(wint_t);
50+
-wint_t towupper(wint_t);
51+
wctrans_t wctrans(const char *);
52+
wctype_t wctype(const char *);
53+

steps/musl-1.1.24/pass1.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
src_prepare() {
66
default
77

8+
# meslibc is insufficient to regenerate src/ctype or src/iconv
9+
# disable everything using a generated header
10+
patch -Np1 -i ../../files/disable_ctype_headers.patch
11+
rm src/ctype/iswalpha.c src/ctype/iswalnum.c src/ctype/iswctype.c \
12+
src/ctype/towctrans.c
13+
rm include/iconv.h src/locale/iconv.c src/locale/iconv_close.c
14+
815
# tcc does not support complex types
916
rm -rf src/complex
1017

steps/musl-1.1.24/pass3.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ src_prepare() {
77

88
# tcc does not support complex types
99
rm -rf src/complex
10+
11+
# Configure fails without this
12+
mkdir -p /dev
1013
}
1114

1215
src_configure() {
@@ -15,7 +18,7 @@ src_configure() {
1518
--disable-shared \
1619
--prefix="${PREFIX}" \
1720
--libdir="${LIBDIR}" \
18-
--includedir="${PREFIX}/include"
21+
--includedir="${PREFIX}/include/"
1922

2023
# configure script creates this file
2124
if test -f /dev/null; then
@@ -24,9 +27,5 @@ src_configure() {
2427
}
2528

2629
src_compile() {
27-
make "${MAKEJOBS}" PREFIX="${PREFIX}" CROSS_COMPILE= CFLAGS="-DSYSCALL_NO_TLS" AS_CMD='as -o $@ $<'
28-
}
29-
30-
src_install() {
31-
make PREFIX="${PREFIX}" DESTDIR="${DESTDIR}" install
30+
make "${MAKEJOBS}" CROSS_COMPILE= AR="tcc -ar" RANLIB=true CFLAGS="-DSYSCALL_NO_TLS"
3231
}

steps/musl-1.1.24/pass4.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <[email protected]>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
src_prepare() {
6+
default
7+
8+
# tcc does not support complex types
9+
rm -rf src/complex
10+
}
11+
12+
src_configure() {
13+
CC=tcc ./configure \
14+
--host=i386 \
15+
--disable-shared \
16+
--prefix="${PREFIX}" \
17+
--libdir="${LIBDIR}" \
18+
--includedir="${PREFIX}/include"
19+
20+
# configure script creates this file
21+
if test -f /dev/null; then
22+
rm /dev/null
23+
fi
24+
}
25+
26+
src_compile() {
27+
make "${MAKEJOBS}" PREFIX="${PREFIX}" CROSS_COMPILE= CFLAGS="-DSYSCALL_NO_TLS" AS_CMD='as -o $@ $<'
28+
}
29+
30+
src_install() {
31+
make PREFIX="${PREFIX}" DESTDIR="${DESTDIR}" install
32+
}

0 commit comments

Comments
 (0)