<stikonas>at least for our usecase continuing after failure is usually confusing <oriansj>in funny news, turns out musl has a minor flaw in its wait.h definitions <oriansj>WIFSTOPPED can be defined in terms of WTERMSIG and WCOREDUMP without any multiplication <oriansj>((0x7F == WTERMSIG(s)) && (0 == WCOREDUMP(s))) in case anyone is curious <oriansj>so 2 xors, 2 subtractions and a logical and <oriansj>correction 2 bitwise ands, 2 subtractions and a logical and <oriansj>and the updated kaem is now up with a much better ability to explain what happened to the process. Some of the functionality isn't used yet but it is there for anyone who might need it. <stikonas[m]>multiplication by constant can always be converted to bit operations, so optimising compiler might do it anyway <oriansj>now that M2-Mesoplanet is working, we probably should start trimming down macro functionality in M2-Planet <stikonas>oriansj: you might be able to trim it more if we start using M2-Mesoplanet earlier <stikonas>we discussed that it needs kaem for PATH but actually we can use it in preprocessor mode -E much earlier <stikonas>in principle as soon as M2 is built but I think we should build at least C versions of M1 and hex2 <stikonas>(else bootsrap will take much longer on qemu) <stikonas>oriansj: also we'll probably need some kind of -I functionality <stikonas>otherwise it's hard to use it to build even mes-m2 <stikonas>(unodified mes is of course even harder) <stikonas>even with -I support, we would need additional patches to mes-m2 to build it <stikonas>most likely there will be some includes that we don't want and need to #ifdef them <oriansj>stikonas: well adding -I support will be quite simple to add. However meslibc might be a more complex of a problem. but something like --disable-includes would allow M2-Mesoplanet to revert to M2-Planet style behavior regarding includes <stikonas>oriansj: yes, we might need --disable-includes if it get's too messy <stikonas>I was hoping that #ifdef __M2__ might hide some includes but that's just a guess <oriansj>well that would require us to make #include functionality smarter <oriansj>in fact we probably could move the the entire conditional include logic into cc_reader.c <oriansj>so that preprocess would become considerably simpler <oriansj>but this would be a big change; as we would be doing macro evaluation on every token as we read it <oriansj>we we could probably do a half-support version using just #ifdef and #ifndef and #endif <oriansj>I can later grow it out to support #if #elif #else too <oriansj>as #if and #elif can get kinda complicated <oriansj>#else might be simple enough to include in the initial version but I'll need a solid block of time to kick out that functionality <stikonas[m]>And longer term expanding m2libc might make more sense anyway <oriansj>well yes, it would just turn off functionality at a single spot <oriansj>basic -I support has been added to M2-Mesoplanet and patches are up <oriansj>well I did always want to provide a common shared library for M2-planet and MesCC <oriansj>(It would finally give me an excuse to harmonize M2-Planet M1 DEFINEs with MesCC) <stikonas>when Mesoplanet subprocesses fail, it should also exit with non-zero exit status <stikonas>actually, something stranger is going on <stikonas>M2-Planet --file /tmp/M2-Mesoplanet-000011 --output /tmp/M2-Planet-000011 --architecture amd64 --debug <stikonas>Subprocess: /home/andrius/repositories/bootstrap/stage0-posix/AMD64/bin/M2-Planet exited with error code <stikonas>but when I manually run that M2-Planet command, exit code is 0 <oriansj>so the only error value would be 0x80 which would be a core dump but it should include other error bits too <oriansj>actually, I might as well leverage the new smarter status logic I made for kaem <stikonas>generate kaem file and spawn kaem instead? <stikonas>oh, commit e4ca1f3518b56e8fa4c64cedf518d8c84472e01d works fine <stikonas>let's bisect, there is just one more commit in the middle <stikonas>oriansj: yes, it's 5a706e647837a876bdbbc271524fd775adb255a4 that is broken for me <oriansj>stikonas: I just pushed a new commit, see if it fixes that for you <stikonas>if it works, I can push mescc-tools-extra build script conversion to Mesoplanet <oriansj>and --debug-mode 8 will show you the exit codes of the subprocesses if you wish <oriansj>(technically any value over 2 will do that) <stikonas>yeah, maybe for kaem debug modes would also be good <oriansj>stikonas: already included that in the new kaem --verbose <stikonas>ok, amd64 and x86 have built successfully. But it is much slower :( <stikonas>argh, Mesoplanet doesn't know riscv32... ***iridium.libera.chat sets mode: +o ChanServ
***ChanServ sets mode: +o janneke
***attila_lendvai_ is now known as attila_lendvai
<stikonas>hmm, having some issues on at least aarch64 and riscv32...