Hi, On 2026-07-08 11:06, Liam Wilson wrote: > When I was constructing my chain of tcc versions I landed on: > > 0.9.2 -> 0.9.3 -> 0.9.10 -> 0.9.23 -> 0.9.24 -> 0.9.26 -> 0.9.27 Thanks @Liam to clarify upon this issue further (which reminds me a little of the mentioned rust-lang/rustc pecularities and i rather not see tinycc arriving at the same dead-end).
With tinycc this situation can be simplified a little, with the following fully confirmed system-bootstrap options (there is several): 1) live-bootstrap (that's the most tested reference, imo): https://github.com/fosslinux/live-bootstrap M0/M1/M2 -> mes-cc -> tcc-0.9.26/jannecke-fork -> tcc-0.9.27 2) laurenth/pnut-cc (pnut-cc got a few advantages over mes-cc, imo): https://github.com/laurenthuberdeau/live-bootstrap-pnut M0/M1/M2 -> pnut-cc -> tcc-0.9.26/jannecke-fork -> tcc-0.9.27 3) the tiny-bootstrap fork https://codeberg.org/aggi/tiny-bootstrap M0/M1/M2 -> pnut-cc -> tcc-0.9.26/jannecke-fork -> tcc-HEAD So far this (3) seems the _shortest_ route to arrive at a fully bootstrapped tinycc mob/HEAD, and this too got confirmed a working nightly-build CI setup already together with a future prospect to move another ~500 ebuilds into it's build-system since those too are confirmed to pass compile-time/run-time with tcc mob/HEAD (as a reminder some month ago this type of testing disclosed a few tinycc issues with kernel, cdrtools etc. but it's preferrable tinycc-devel got a common baseline for this, hence the tiny-bootstrap fork that fully dropped gcc/binutils dependency for a complete tinycc/OS system-integration) In any case, there is a good chance if the patches from tcc-0.9.26/jannecke-fork were rebased onto tcc mob/HEAD then tinycc could be compiled with pnut-cc/mes-cc directly. I would not consider this urgent, because i got a complete system-bootstrap to arrive at tcc-HEAD/linux-tcc kernel etc. regardless; I merely would recommend to keep the problem with tcc-0.9.26/jannecke in mind in particular. On 2026-07-08 14:20, [email protected] wrote: > Hello, > > > That would increase the number of compilers that can build tcc. > > You mean obsolete compilers (C89 and below) that are producing bad quality > code anyway by today standards ? > > Is that really top priority in improving TCC codebase ? Depends, since the reasoning around bootstrapping can provide a guideline for desirable language features _and_ keeping tinycc "bootstrappable". David, you may underestimate the relevance of tinycc in this context. And so far, from what i could grasp, there is a good chance to re-establish an even shorter full system bootstrapping chain (including kernel, libc etc. even; i've got up and running a 100% tinycc driven system here, linux-tcc kernel plus musl-libc backport onto linux-2 syscall abi, but the whole chaos of hundreds of patches and hacks must be re-integrated, hence tiny-bootstrap): M0/M1/M2 -> mes-cc OR pnut-cc -> tcc-HEAD If some patches were rebased from tcc-0.9.26/jannecke-fork onto mob/HEAD which i must admit is beyond my abilities hence i merely succeeded to shorten the system-integration path with pnut-cc -> tcc-0.9.26 -> HEAD only, so i could keep rolling the Tinycc/OS compilation with HEAD (it's just a little slower paced because i've had to fork kernel and patch 500 ebuilds for this and tbh i'm not in the mood for other reasons mentioned before). Side note: the option to spawn tinycc from macro-assembly M0/M1/M2 -> tinycc directly was considered unrealistic among #bootstrappable. And the situation becomes a little more complicated, once you've had a look at the many re-compilation passes of tcc/musl-libc, but that's out of context of this thread. > Regards. > > > ----- Mail d'origine ----- > De: [email protected] > À: [email protected] > Envoyé: Wed, 08 Jul 2026 14:04:33 +0200 (CEST) > Objet: Re: [Tinycc-devel] bootstrapping - Re: Changing std to C99? > > Hello Liam, > > On Wed, Jul 08, 2026 at 11:06:59AM +0100, Liam Wilson wrote: > > Going back to the original thread subject. I did try compiling tcc > > with gcc in ansi mode. This fails because of the single line // > > comments and (iirc) a couple of other gnuisms in the codebase. I think > > the reality is the current codebase is implemented in a subset gnu89. > > This corresponds to my experience of building tcc with TenDRA > (c89-compiler). The largest needed changes were to the comments. > > The patch to tinycc-20a1ebf is there, e.g. at > https://codeberg.org/keciav/vsobfs/raw/branch/main/pub/PATCHES/patch.tinycc_tendrify > > > Having said that I found that I could not get gcc-2.95 to build mob. > > Would it maybe be worth tightening up the codebase to be valid ANSI C > > code, or at least the subset of ANSI C that is also valid C99, C11, > > Would the developers be willing to abstain from the //-comments inside > tinycc code? > > I can think of refreshing the patch so that it will apply to the > latest mob. Any voices for or against? > > > That would increase the number of compilers that can build tcc. > > Yes. In this context, mes-cc and pnut-cc too can provide a reference for a reasonable trade-off between C-standard and language features relied upon internally, related to keeping tinycc HEAD bootstrapped with such compilers derived from a macro-assembly root (this seems something myself and tccm disagree with each other how important that was; admitted it's a matter or priorities). > > Cheers > /tccm > @tccm keeping a Minix system integration with tinycc is a precious option (to my understanding this is what you've got), no doubt, even when that departs from some principle reasoning surrounding live-bootstrap -- Michael Ackermann
signature.asc
Description: Digital signature
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
