IRC channel logs

2022-01-24.log

back to list of logs

<oriansj>stikonas: ok, what sort of issues.
<stikonas>oriansj: well, one is that M2LIBC_PATH is ignored
<stikonas>or I can't get it to work
<stikonas>and the others are probably crashes
<stikonas>if I run this command "M2LIBC_PATH=../M2libc PATH=../AMD64/bin ../AMD64/bin/M2-Mesoplanet -f sha256sum.c -o ../AMD64/bin/sha256sum"
<stikonas>using the versions from https://github.com/stikonas/stage0-posix
<stikonas>then I get reading file: <string.h>
<stikonas>unable to read file: <string.h>
<oriansj>stikonas: ok M2LIBC_PATH right now is stupid, it only supports one target not multiple
<oriansj>and it looks like I am an idiot who also hard-coded the path in cc_reader.c
<oriansj>and the only M2libc file that needs to be treated special is #include "M2libc/bootstrappable.h"
<oriansj>ok, the needed fix is up
<oriansj>both -I (prior to a -f) and the M2LIBC_PATH environment variable are respected
<oriansj>so if one wanted to get tricky they could do -I ../foo1 -f a.c -I ../foo2 -f b.c ... -I ../fooN -f zN.c and each would be using a different libc; which would make things quite messy, so you'd probably want to avoid that
<oriansj>and "M2libc/bootstrappable.h" is special cased simply because <bootstrappable.h> isn't valid for any other libc
<oriansj>although it would be a rather minimal libbootstrappable.a to distribute
<oriansj>or do you think a better idea is to do #ifdef __M2__ #include <bootstrappable.h> #else #include "M2libc/bootstrappable.h" #endif instead
<stikonas>hmm, not sure yet, I'll try to get mescc-tools-extra working first, haven't looked at it yet today
<stikonas>maybe just leave it as it is
<stikonas>I think that part is working now that I've pulled in your latest commit