Hi David, Hi Robin,

On 2025-08-11 09:22, [email protected] wrote:
> Hello Michael,
> 
> > There's a few limitations with regards to "bootstrapping"
> 
> Like https://github.com/fosslinux/live-bootstrap/ ?

Plus another repository which keeps a tinycc fork, and a few more things.
I tried to summarize a few related aspects here:
http://tinyfront.mooo.com/docs.html#Bootstrapping

> > a guy named seyko2 already had established a linux-2.4 fork
> 
> I know that one :
> 
> https://github.com/seyko2/tccboot

The one from seyko2 _was_ broken last time i tried, and did not contain some
required patches for musl-libc compat and a few other things which are available
now:

https://codeberg.org/aggi/linux-tcc

> But again, what is expected nowadays is "C11/linux5" support.

And that's fine, for this llvm/clang and gcc/binutils exist.

Yet TinyCC follows a different philosophy.
And what I expected, was a fully supported kernel with USB, SATA, Ethernet, SMP,
which we've got, and I rather not see this broken, again.
musl-libc and userspace had to be patched for linux2 ABI compat, and hundreds of
patches to userspace and buildsystems all over the place to make it work with
tinycc.

Here's the thing: supposedly absent language-features were NOT the major issue
with tinycc, to make things work for a complete distribution.

> There is no point in staying at linux-2.4 just because TCC can't do much more.
> 
> TCC should be capable of compiling (not yet optimizing) current code, not 
> just 25+ year old code base.

The mentioned package set supported with tinycc does contain most bleeding edge
software versions synced last Feb/2025 already:
http://tinyfront.mooo.com/downloads/x86-embedded/666666/tinyfront-packages.list
Here's the build log output of ~500 packages that passed with a recent devdrop
distribution build:
http://tinyfront.mooo.com/downloads/x86-embedded/666666/elogs-x86-666666.tar.gz

Anyway, other than TinyCC support an alternative Kernel got a huge selling point
still, if it's dozens of millions of lines of code LESS than what linux4/5/6
ship with nowadays.

Although linux2 ABI compat introduced a few limitations, it was important to
confirm support for some kernel first. And there's no point in improving
anything if this broke a known-good working baseline. Furthermore, i did keep
the portage tree portable towards _both_ linux2 and linux5 ABI, but I don't see
any benefit yet to move to the latter with TinyCC.

@Robin

With regards to linux kernel in particular, since linux-2.5 Kbuild changed
and requires GCC specifics:
- linker script support
- gcc -S generated assembly output
- for X86 16bit real-mode boot this opens another can of worms
  http://tinyfront.mooo.com/docs.html#Assembler

Chances are entire Kbuild might need an overhaul to avoid gcc/binutils/
llvm/clang. And meantioned features alone could imply a complete re-design
of TinyCC, which isn't related to C11 features.

Since linux-5.9 generic macros showed up, which can be removed with this patch:
http://tinyfront.mooo.com/downloads/linux-5.9.16-gcc47.patch
So at least you could continue using a compiler/toolchain which wasn't written
in C++. This is the type of "improvement" why i've rolled-back to and forked
linux-2.4.

And you might try to contact susematz, too a contributor to tinycc, who last
tested TinyCC with linux-4.6 and published a github repo with his fork:
https://github.com/susematz/linux/commits/tcc46/
He couldn't avoid gcc -S i think, and that's the criteria which distinguishes
linux-2.4 Kbuild.

Other than that, fiwix kernel too was tested with tinycc by bootstrappable,
which is a far more conservative approach even than the linux-2.4 fork that i
maintain since when this was abandoned and escaped regression testing with
TinyCC for several years:
http://tinyfront.mooo.com/docs.html#Kernel

> Regards.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to