IRC channel logs

2025-04-12.log

back to list of logs

<stikonas>gtker: Hi. So Add strdup for <string.h> and Add atoi for <stdlib.h> commits somehow upset M2-Mesoplanet's includes...
<stikonas>so they are blocking stage0-posix submodule updates
<stikonas>longer term I guess we should fix M2-Mesoplanet, though I might not have time to look at it any time soon...
<matrix_bridge><gtker> stikonas: Sorry, didn't see your message. I've been sick the past few days so I haven't had any free time. I'll take a look and see if I can figure it out when I get better
<stikonas_>gtker: no rush
<stikonas_>get well first
<stikonas>gtker: generally I'm not sure whether our current approach is the best though...\
<stikonas>might be best to compile libc in advance like mescc or other compilers do...
<matrix_bridge><gtker> Can we do that with how M2-Planet currently works?
<stikonas>anyway, no rush at all here, I'll be somewhat busy till mid May, so won't even have much time for reviews
<stikonas>well, M1 and hex2 don't prevent that
<stikonas>mescc kind of does that
<stikonas>and it still uses M1 and hex2
<stikonas>so I guess we can...
<matrix_bridge><gtker> Interesting, so it precompile to M1/hex2 or all the way to an ELF binary?
<stikonas>not to elf though
<stikonas>so weith mescc we can do
<stikonas>compile each C file from libc into it's own .o file (which is in fact just hex2 output)
<stikonas>and then we can concatenate it into libc.o
<stikonas>I think for thits to work we also need to make libc.c
<stikonas>(one can also concatenate all libc files first, build that, same result)
<stikonas>(well, mescc calls it libc.a, not libc.o)
<stikonas>but anyway, all these are not elfs
<matrix_bridge><gtker> Interesting. I've been considering if there was a way to make M2-Mesoplanet play nice with Cmake which requires compiling individual files into ".o" files and then building the final exe from those files
<matrix_bridge><gtker> But how is that different from what M2-Mesoplanet does where it just concats all the C files and then compiles those together?
<stikonas>I guess the tricky thing is to get the include order right
<stikonas>hmm, maybe it's not worth changing then
<stikonas>so mescc entry point is here https://git.savannah.gnu.org/cgit/mes.git/tree/module/mescc.scm?h=wip
<matrix_bridge><gtker> hex2 doesn't need a correct include order, right?
<stikonas>it does support -S and -c options
<stikonas>indeed
<stikonas>hex2 does it in two passes...
<stikonas>anyway, we can think later :)
<stikonas>first get well soon
<matrix_bridge><gtker> Thanks 🙂
<matrix_bridge><mihi42> precompiled libc would only give some speed advantage if many programs were to be compiled against it - M2-(Meso)Planet and M1 would only need to process it once. Regarding binary contents (or size) it would not give any improvement, unless "real" linkers which only link needed parts.