Re:Using TinyCC to compile Linux (2.4) kernels
by MuffinFlavored on Monday June 13, 2022 @09:35AM
(#31725343)
Can TinyCC still compile the 5.x kernel without issues?
[ Parent
| on HN ]
Re:Using TinyCC to compile Linux (2.4) kernels
by rurban on Monday June 13, 2022 @11:27AM
(#31726928)
No, this is being worked in. The goal should be a -Oboring optimizer without any broken optimizations and aggressive UB assumptions. Something neither gcc nor clang can provide.
Re:Using TinyCC to compile Linux (2.4) kernels
by sylware on Tuesday June 14, 2022 @06:29AM
(#31736916)
you cannot, as linux code is using a lot of gcc/clang extensions stuff, namely this is some sort of C dialect, not really C.
Almost at every new release of linux, "somebody" did manage to commit into its code the usage of new gcc/clang extensions.
The right(TM) way would be to port linux to simple and lean C (like some simple C89 with benign bits of c99/c11): the price is some loss of performance which could be partially mitigated with an assembly port of critical fast-paths (I guess that would show on really loaded servers only).
In the end, if RISC-V is a success, namely a world with a pertinent ISA without toxic IP tied to it (like x86/arm), then a full assembly port of linux would be more than interesting in order to rid it from compiler tantrums.
Re:Using TinyCC to compile Linux (2.4) kernels
by MuffinFlavored on Thursday June 16, 2022 @01:32PM
(#31768732)
> you cannot, as linux code is using a lot of gcc/clang extensions stuff
Linux 5.x kernel that is, but not Linux 4.x kernel because that was tcc-compilable?
Re:Using TinyCC to compile Linux (2.4) kernels
by wrycoder on Monday June 13, 2022 @02:19PM
(#31729302)
See bootstrapping.org
Re:Using TinyCC to compile Linux (2.4) kernels
by chexum on Monday June 13, 2022 @02:42PM
(#31729719)
http://bootstrappable.org perhaps?
Re:Using TinyCC to compile Linux (2.4) kernels
by wrycoder on Monday June 13, 2022 @08:38PM
(#31733466)