Post #2027336
2026-04-20 18:45 UTC
@thephd how to build gcc from scratch so that the (final) result does not depend on host libc, host ld.so? Is that kernel headers with host compiler, libc with host compiler, binutils with host compiler, gcc, and then with the new compiler, repeat the process?
The goal is to bootstrap minimal C compiler without having to worry about host ABI / files in the end
Sorry to steal your thread, this just prompted me that this is something I find confusing and you seem to know this bit well.
Replies (1)
-
@thephd@pony.social 2026-04-21 14:00
@zygoon Not a clue. I don't know if that's possible but you could try reading the cross compile and ./configure help -- maybe it'll tell you how to build with a statically-bundled libc and libstdc++. I was under the impression a static build was the default.