IRC channel logs

2025-09-18.log

back to list of logs

<LaurentH>ekaitz: Hi! I'm the author of pnut. I just saw your message from a few days ago
<LaurentH>cosinusoidally explained my project pretty well. I'm curious to know why you'd want to skip over TCC, since my impression is that very few compilers can handle GCC and so finding an alternative is probably more work than adapting TCC to the target you need (RISC-V?)
<LaurentH>An alternative could be to use one of the other small C compilers that claim to be able to compile GCC, like cproc. I haven't tested cproc, and don't know if pnut can compile it, the QBE library it requires and a compatible assembler.
<nikolar>doesn't tcc already support riscv
<matrix_bridge><Andrius Štikonas> nikolar: it does
<matrix_bridge><Andrius Štikonas> it's only in mob but good enough to build GCC
<matrix_bridge><Andrius Štikonas> and actually it was ekaitz that ported RISC-V support to older (janneke's) fork of tcc
<matrix_bridge><Andrius Štikonas> and as you can guess working with tcc codebase might put people off it...
<matrix_bridge><Andrius Štikonas> (it is hard to follow, lots of 2 letter variables, few comments, etc...)
<nikolar>at least the code generation side is simple
<nikolar>no convoluted optimization algorithms
<stikonas>but it does emit binary directly
<stikonas>which also makes it a bit harder to read
<stikonas>it does not spit out assembly that then gets converted into a binary by a separate tool
<stikonas>e.g. https://github.com/TinyCC/tinycc/blob/mob/i386-gen.c#L276 but at least this part is commented with what instruction it should be...
<nimaje>(well, if you use good abstractions, then it doesn't matter if you output asm or machine code directly)
<Googulator>vasi: updated the instructions and the 3.0-bootstrap branch; we no longer depend on the upstream repo for dependency resolution!