12 ms·
I would love to see the commit log on this.
by Philpax 8mo ago
I would love to see the commit log on this.
- dmitrygr 8mo agodid this before i knew how to git, back in college. target was ARMv5
- Philpax 8mo agoGreat. Did your compiler support three different architectures (four, if you include x86 in addition to x86-64) and compile and pass the test suite for all of this software? > Projects that compile and pass their test suites include PostgreSQL (all 237 regression tests), SQLite, QuickJS, zlib, Lua, libsodium, libpng, jq, libjpeg-turbo, mbedTLS, libuv, Redis, libffi, musl, TCC, and DOOM — all using the fully standalone assembler and linker with no external toolchain. Over 150 additional projects have also been built successfully, including FFmpeg (all 7331 FATE checkasm tests on x86-64 and AArch64), GNU coreutils, Busybox, CPython, QEMU, and LuaJIT. Writing a C compiler is not that difficult, I agree. Writing a C compiler that can compile a significant amount of real software across multiple architectures? That's significantly more non-trivial.
- AshamedCaptain 8mo agoFrankly, I think you are exaggerating. My university had a course that required students to build a C compiler that could run the C subset of SPECint (which includes frigging Perl) and this was the usual 3 month class that was not expected to fill in 24h of your time, so I'd say 1 week sounds perfectly reasonable for someone already familiar. Good enough C for a shitton of projects is barely more complicated than writing an assembler, in fact, that is one of C's strong points (which is also the source of most of its weaknesses).
- Philpax 8mo agoI really, really don't think so, but you're welcome to try :-)
- deleted 8mo ago[deleted]
- rustystump 8mo agoImplementing just enough to conform to a language is not as difficult as it seems. Making it fast is hard.