IRC channel logs

2026-02-15.log

back to list of logs

<aleksih>Ok, I was able to build a working upstream tinycc with mes (branch wip-aarch64). I had to use nyacc dev-3.03, I had to replace all character literal escapes (e.g. '\\') with integer equivalents, and I had to make a few macro expansion-related patches. And I also had to iteratively build tinycc and musl 3 times. But it did work, targeting x86_64. I'm testing other platforms right now.
<aggi>next one: bootstrapping/compiling QEMU.static with i386-tcc atop a linux2 sysv ABI
<aggi>having a glimpse at qemu sources, some 2.x version to begin with
<aggi>there's only few *.cc files, most irelevant extensions
<aggi>but some of them point to SeaBIOS
<aggi>fear for the worst, qemu itself is 100% C sources
<aggi>SeaBIOS too is C, again with one or two .cc files only
<aggi>i think qemu-2 should suffice (it supports optional binding to GTK2 and libsd1.2 still, which is the ones i could support with i386-tcc here)
<aggi>and, it got riscv64 and aarch64 already
<aggi>i think it is worth the effort to give it a try with tinycc
<aggi>with a bootstrapping chain outlined such as live-bootstrap -> tinycc/x86_32 TinyCC/Linux2.4 -> qemu-<aarch32/64|riscv64|...>
<aggi>it will be too interesting to see if SeaBIOS passes with i386-tcc (except 16bit real-mode assembly pieces if any which binutils-as is available for still)
<aggi>another aspect, is absent UEFI support with qemu-2 i think, but i'm not in the mood to pull in some giant edk2-bin-firmware.bin anyway
<Googulator>qemu's UEFI implementation is OVMF, which is open source
<Googulator>probably with lots of complex build dependencies, but certainly not a blob
<deesix>I expect riscv64 and aarch64 support on old qemu to be quite buggy.
<aggi>don't know yet, qemu-2 was maintained until year-2018
<aggi>i'll first have to see at least one version pass with i386-tcc
<aggi>another obvious difference, qemu-2.x that was ~32MiB for it's tar.gz bundle (rather big already), most recent qemu-10.x ships 140MiB
<aggi>other than edk2 for uefi, the qemu ebuilds point to rather many dependencies, in particular firmware.bin
<aggi>qemu-2.x ./configure: ERROR: Your compiler does not support the __thread specifier
<aggi>maybe there's an earlier version which was sane
<aggi>by coincidence i was chatting a little about this on tinycc-devel, yesterday
<aggi>and this is remarkable, because i wasn't hit by __thread anywhere else yet (except bind9 which i could pick an earlier version then)
<aggi>and i think C11/__thread are non-orthogonal language features to C
<aggi>then it's remarkable for another reason, because both QEMU and TinyCC originated from the same developer and mindset involved
<aggi>even when remaining rather conservative with a QEMU version chosen, tinycc cannot compile it
<aggi>so, picked an even older qemu-2.3 ... python seems mandatory... what? list goes on:
<aggi>ERROR: glib-2.12 gthread-2.0 is required to compile QEMU
<aggi>i think that's not worth any more discussion
<aggi>except, there's a qemu-1.x too...
<aggi>i'll NOT upgrade glib to 2.x (having seen it's ebuild, i won't) - hence qemu-1.7 is out too
<aggi>the last relevant seems qemu-0.9.1 it seems, this could work
<aggi>maybe there's another one, qemu-0.15 is out
<aggi>so that's confirmed, any qemu version relevant to bootstrapping concerns (imo), that's >=0.9.1 ..<0.1x?, NONE of them support aarch64|riscv64