IRC channel logs
2024-11-10.log
back to list of logs
<oriansj>stikonas: yeah, pity that they trimmed the Q/A session. <aggi>a tiny little progress with linux-2.4/tcc... i've managed to re-produce a working AoT compiled/linked minimal kernel <aggi>this time, outside an ancient slackware11 x86 buildhost <aggi>nitty gritty details, i suspect a cross-compiled tcc had issues itself <aggi>finally, i can re-cover a bunch of test-cases to bisect exactly what caused the mis-compiled linux-2.4 kernel when using tcc <aggi>this includes tccboot loader itself, however this could cover the missing "kernel bootstrapping" pieces <matrix_bridge><cosinusoidally> That makes sense. tcc is a massive tangle of platform specific ifdefs, and the cross compilation build are probably not very well tested. <matrix_bridge><cosinusoidally> The tests included by tcc itself are also just unit tests, rather than building real software packages. <matrix_bridge><cosinusoidally> Incidentally I think live-bootstrap could actually essentially be the largest publically available "integration test suite" for tcc. <matrix_bridge><cosinusoidally> (as it builds a large amount of working real world software in order to bootstrap up to gcc) <aggi>i zipped ~500 ebuilds for support with tcc already, except kernel <matrix_bridge><Andrius Štikonas> perl, binutils and gcc and a few other tools such as coreutils, bash , grep awk <aggi>ideally, i can converge and fully re-integrate most of those ebuilds directly with bootstrappable, plus linux-kernel compiled with tcc <aggi>the final result would slightly differ, that is a bootable i486-tcc-linux-musl.iso without gcc for example, but this can and will bootstrap gcc <aggi>i am not sure about tccboot yet, if this could cover the missing kernel bootstrapping piece <aggi>i think a fully capable tcc distro could significantly simplify the process <aggi>it's just, i was bug hunting linux-2.4/tcc for several month, and finally got a bootable kernel emitted <aggi>currently it would be possible already, to emit a complete distro, but i'll bisect/diff/cleanup further <aggi>for example, i am testing with tcc-0.9.21 (that was the original used for kernel by Bellard himself) <aggi>later tcc-versions behave differently with linking, and a few other issues that crashed kernel <aggi>finally i can gradually cover each test-case, one by one, to see what went wrong <matrix_bridge><cosinusoidally> Andrius Štikonas: and musl, fiwix, etc. But still a far more extensive range of software than is tested by the upstream tcc ci. In the past I've downloaded versions of tcc from mob that miscompile the make command. <matrix_bridge><cosinusoidally> aggi: any harm in shipping 2 versions of tcc? One for the kernel, and one for the userspace? Presumably your default version of tcc can build the version that can build the kernel? <aggi>cosinusoidally, that's the worst case <aggi>i can and will zip and archive what i got bundled for tcc-0.9.21 already, but i think it is feasible to repair tcc-0.9.27-aggi for kernel compilation too <matrix_bridge><cosinusoidally> how heavily patched is tcc-0.9.27-aggi ? Is that a patched version of mob, or the 2017 0.9.27 release? <aggi>cosinusoidally: i will publish this, don't worry <matrix_bridge><cosinusoidally> Thanks, that's good to hear. I'll definitely check it out once it's available. <aggi>it's rather tricky, various tcc and kernel versions, managed to bisect my way up to kernel-2.4.37.11 and tcc-0.9.26..27 <aggi>i am certain, something was broken with tcc internally on mob branch sometime in between 2017..2023 <aggi>at least i got a known-working stable baseline to bisect/diff against <aggi>and i am almost certain, i can stabilize both, AoT compile and tccboot/jit