IRC channel logs
2024-02-28.log
back to list of logs
<webczat>ekaitz: tcc: error: invalid option -- '-MMD,scripts/basic/.fixdep.d' when trying to install the linux headers. is that option added in newer tcc? <ekaitz>it's just some command execution <webczat>which fails and doesn't allow me to header_install <webczat>okay so i want to build tcc-mob. what I need is tcc-mob from orig repo with your patch? or something more? <ekaitz>you can use the one from my mob-riscv-bootstrap branch if you want <ekaitz>it has other commits we use for our stuff, but the ones that affect your build are just the ones you need <ekaitz>i just fixed some stuff on riscv and the realpath thing <ekaitz>if you don't use riscv you won't notice most of the commits <webczat>and I can use that tcc to compile what? real libc like musl? <ekaitz>only that one i linked to you (btw i push --forced) <ekaitz>webczat: you can try! I only built make, patch and gzip with it <ekaitz>but surely i'll try to build more things in the next days <webczat>i am actually going to use uclibc for this stage, not musl <webczat>i am going to make a static gcc toolchain with uclibc and from this stage switch to glibc for the final work <webczat>well actually static gcc toolchain for x86, then static crosscompiler for x64, then native x64. <webczat>ekaitz: finally x64 but i use x86 now <webczat>because i want freedom to compile very old packages if needed. <ekaitz>but you have the current commencement.scm file in guix with the process described! and live-bootstrap is working too! <webczat>ekaitz: that's part of the journey to use as little scripts as possible. also scheme language is not that clear to me when I read it <webczat>i mean as little scripts not from the to be compiled package. I'm partially intending to discover part of the path. and doing things like using uclibc instead of musl because why not <webczat>i went to that stage without mostly using or reading guix scripts and with quite minimal instructions from here tbh. <ekaitz>if you need some help just ask me <webczat>okay so my next step is to build tcc-mob. will grab your commit. when I will be hardblocked I'll probably ask <ekaitz>i mostly rewrote most of the first staged myself in guix <webczat>stage0 was the only thing i did with help of scripts, although I self discovered steps until m2-planet without a problem. too order specific to lose time to guess <webczat>also my initial env is kernel+busybox and i don't avoid pregenerated non binaries <webczat>or pregenerated binaries in source tree if any <webczat>ekaitz: i was forced to build kaem because of mes bootstrap. but i was not using it myself <webczat>also btw, why do you patch realpath out instead of adding realpath to mes libc? is that function problematic? <ekaitz>well, it was easier to patch it out <ekaitz>we could add it, but we are busy :( <webczat>i mean destroying/throwing out is usually easier, but realpath seems not that difficult in principle. dl* seem far more involved <webczat>ekaitz: if I ever start adding these missing things for the poor make, I might. why not <ekaitz>stikonas has a draft for it, but i think it had some issuese <ekaitz>nothing is that easy at this stage <webczat>ekaitz: most of the missing functions for make kinda are. comparing with them <webczat>have to go to sleep so want to do some steps before. or at least discover next problems <webczat>i got the commit you linked me to directly <webczat>this still needs some changes in code I think even if you removed realpath <webczat>stikonas: trying to compile make failed because of no putenv symbol in mes 0.26 <webczat>so i literally turned it into setenv <stikonas>it does not block anything in the bootstrpa chain <stikonas>and eventually we switch to better libc and better make <webczat>everyone found their own workaround it seems :P <stikonas>webczat: still catching up with IRC backlog but musl is quite easy to build <stikonas>at least on x86 I was able to build it with just a few patches <stikonas>mostly disabling assembly that tcc does not support <webczat>stikonas: so we'll see how it goes with uclibc. likely similar <stikonas>for non-pregen file bootstrap musl is much better <stikonas>it has a very simple build system with a short hand-written (not autotools) configure <webczat>stikonas: uclibc uses kbuild. i think it's also not pregen <stikonas>also musl is better supported by modern software <stikonas>I think it's #2 in terms of what distros use... <webczat>stikonas: i only need uclibc or more specifically uclibc-ng to build working gcc. my actual target is glibc <webczat>that's why I don't care about software support, assuming gcc works with it <webczat>I do, but i want a static toolchain first and I don't need glibc for that. <stikonas>generally on my systems I use glibc too, so musl is just a stepping stone <webczat>was wondering about klibc. probably klibc is not enough to build gcc, but curious if it can replace mes libc in some stages. <webczat>not going to test rn probably, but interesting <webczat>this is some minimal libc intended to power initramfs... not like it's being used too much, but still <webczat>or maybe it is, i just don't know. to my surprise it's probably not dead <stikonas>well, meslibc is good enough to build really ancient gcc <webczat>stikonas: is it? that's good to know. <stikonas>but if you want to go from tcc to gcc 4.x directly, right now you need musl <webczat>stikonas: it's probably more about whether gcc can be compiled by tcc at all? <stikonas>yeah, but musl binaries generally work better than meslibc <webczat>stikonas: i am more worried about asm/linker support, not about libc <stikonas>but when we wrote live-bootstrap we were hitting some issues with meslibc binaries <stikonas>occasionally nonsense result, especially around floats <webczat>stikonas: does gcc use binutils even when using tcc to compile it? <stikonas>well, we even had some bugs such as seq on meslibc printing something else <stikonas>in fact binutils will be picked by default <stikonas>generally pre-binutils you need to do tricks like AR="tcc -ar" LD="tcc" <stikonas>but once you have binutils, you only need CC=tcc <stikonas>anyway, tcc is known to be able to compile gcc 4 <stikonas>anything else is unknown, might work but more likely you'll hit problems <stikonas>webczat: and there is no point of building tcc without binutils <stikonas>as gcc is just a compiler, it will only produce assembly then <stikonas>hence tcc -> [other non-toolchain tools] -> binutils -> gcc <stikonas>so basically the only free variable is which binutils/gcc version you are targeting <stikonas>and that imposes some requirements on libc <stikonas>also binutils is basically capped to 2.30 with tcc 0.9.27 <stikonas>anything newer starts using more and more advanced C stuff that doesn't work with tcc 0.9.27 <webczat>can't find startfiles even though they exist <stikonas>check if paths match to where the files are installed <webczat>too late because i've replaced the bootstrap one and now need to rebuild it <stikonas>also you can always run it with -nostdlib <stikonas>and pass those crt files (and libc) manually <webczat>but i think they require some specific ordering? <webczat>so if I don't compile manually it would be a problem <webczat>thanks for help, bye. will do some more stuff and go to sleep. goodnight <ekaitz>i'm pretty suprised for the amount of people that watched the talk <ekaitz>ACTION now can sleep better today <stikonas>but maybe not always best at advertising it <ekaitz>in fact, i'm pretty comfortable talking in public in 3 different languages <ekaitz>ACTION is working on the 4th but that will take long <oriansj>ekaitz: well it is very unlikely we will get "famous" unless someone uses our work to catch a *BIG* Trusting Trust attack in the wild. <oriansj>but it is good that they recognized your hard work