IRC channel logs

2020-04-21.log

back to list of logs

***ChanServ sets mode: +o rekado_
***rekado_ is now known as rekado
<webczat>Hi. I actually wanted to do c compiler bootstrapping, although my goals are a bit different because I don't care about the trust argument, and my starting point is likely linux kernel + busybox. is it possible to actually start from there? especially without things like guile
<webczat>so I should have editor, internet access and basic awk/sed/whatever, just not coreutils.
<`Lion>i think so
<`Lion>printf lets you convert ascii hexadecimal to binary
<webczat>well I have to strip comments. but that should be doable with these tools. I mean things like nyacc
<`Lion>combined with the other busybox applets (mostly for convenience i guess) and shell built-ins like read, that should be enough to start off
<webczat>because that I could likely assemble things like hex0 I know, not sure how but I know I would have enough tools to do it...
<webczat>also I need some http stuff to be able to download things from git :D
<`Lion>it has a wget too
<webczat>I know
<`Lion>no idea about nyacc
<webczat>my problem is the mes compilation requiring nyacc that... requires guile?
<`Lion>yeah i'm not familiar with all the stage0/mes stuff
<`Lion>but if you stick around for a bit i'm sure someone else here will answer
<webczat>sure
<dddddd>Until M2-Planet no guile is involved.
<webczat>yeah
<webczat>but later it seems to be
<dddddd>That's one path, but not the only one. fossy is exploring only-C path to gcc.
<webczat>I am mostly asking about things I could try doing now. although not quite sure when I'd try that for real
<rain1>hello
<dddddd>A recent conversation, from the 14th, might be of interest (check logs)
<dddddd>hi, rain1
<rain1>o/
<dddddd>webczat, nice; no problem. Whatever inspire you. Let's wait to fossy and OriansJ, maybe they have more concrete advice.
<webczat>hmm the conversation from 14'th likely suggests I indeed need guile
<webczat>also you probably figured that out but I've tested. tcc cannot build any (at least latest) libc known to me.
<webczat>to be honest if it could I could also go with just tcc binary added in addition to busybox, not a problem. that doesn't break my requirements even though it is a little bit less fun
<webczat>uclibc, glibc, musl
<webczat>often the reason is no .macro support in assembler.
<webczat>although I do ot quite remember which tcc I tested
<webczat>as for compiling anything with a single cmdline... well... first: there is linux command line length limit. (glibc?) second: most libcs don't just compile, they generate syscall related things from linux kernel headers.
<rain1>yeah building libc is a problem
<rain1>i feel like tcc was close to building musl libc at some point
<rain1>but i don't remember if anyone managed to get it working
<dddddd>janneke, mentioned a «mes c lib» variant for tcc
<webczat>as said my goals/reasons to play with bootstrapping are explicitly not the same as goals of the project so I can relax some requirements including that I can start from tcc
<webczat>if I could be able to build libc (any) from zero, just having busybox and tcc (that means 0 for me), ... it would be enough
<dddddd>*(sorry, no "," there)
<webczat>although if I'd have to do all the hex0 etc it would be a bit funnier.
<dddddd>well, you can see this as "one" project, but I don't see it exactly like that. Just several people filling gaps here and there, with similar but not exactly the same "goal". So your reasons are welcomed too. (note that I only speak for myself)
<bauen1>can't M2-Planet compile a version of tinycc ?
<webczat>who knows...
<bauen1>which can bootstrap an old version of gcc which then compiles a "modern" gcc
<rain1>that may be possible but we need to build libc as well as compilers
<webczat>yes
<bauen1>right
<rain1>and gcc is composed of many parts
<rain1>some of them are not resolved yet
<webczat>I'd also need things like gawk...
<dddddd>IIRC not tcc as is, M2-Planet lacks some features I think. I kind of remember some patched tcc, but maybe not for M2-Planet.
<webczat>considering I intent to have busybox initially...
<bauen1>i think if someone added a few additional assembly instructions to tinycc's assembler you could compile musl now (assuming you handwrite the __syscall wrappers in assembly and don't care about complex numbers)
<dddddd>Let me dig some logs, I recall floats being one thing...
<webczat>how do you download all these stuff from github? lol
<bauen1>webczat: if you don't have git, you either make a archive of the repo yourself or you use githubs download zip functionality
<dddddd>"""macro expansion is required for tcc, as is a bunch of ugly types like union arrays and bit-splices, enums and switch statements (not to mention long, float and double support)"""
<dddddd>hmm...
<webczat>why nyacc cannot be made to run on mes interpreter? disclaimer: I have never done any kind of lisp
<dddddd>"""<gio> I also have news about tcc: I just managed to patch it so that it does not use floating point numbers to be compiled! https://gitlab.com/giomasce/tinycc/tree/softfloat"""
<fossy>wait, what
<fossy>no floating numbers????
<fossy>Omg
<fossy>when was this, dddddd?
<dddddd>Hi, fossy. You mean the gio quote?
<fossy>yep
<fossy>and no, tinycc cannot currently be compiled by M2-Planet
<dddddd>Dec 16, 2018
<fossy>hm
<fossy>I must have missed that