6 ms·
I would be shocked if the rust documentation didn't explain very clearly how to bootstrap rustc starting from gcc
by MBlume 2y ago
I would be shocked if the rust documentation didn't explain very clearly how to bootstrap rustc starting from gcc
- wolfgang42 2y agoPrepare yourself for a shock then; bootstrapping rustc starts from an already-built version of rustc[1]: > the only way to build a modern version of rustc is a slightly less modern version. (There is, at least theoretically, a non-circular bootstrap chain starting with a very old rustc written in OCaml, but the more practical alternative is probably to use mrustc[2] instead.) [1] https://rustc-dev-guide.rust-lang.org/building/bootstrapping/intro.html https://rustc-dev-guide.rust-lang.org/building/bootstrapping... [2] https://guix.gnu.org/en/blog/2018/bootstrapping-rust/ https://guix.gnu.org/en/blog/2018/bootstrapping-rust/
- fweimer 2y agoOcaml has a bytecode blob in the sources (even checked into Git). It uses that to resolve its own bootstrap problem. If you aim for a source-only starting point, your journey won't stop at Ocaml.
- heavensteeth 2y agoThen you need to build GCC without GCC.
- pabs3 2y agoThat is possible too: https://guix.gnu.org/en/blog/2023/the-full-source-bootstrap-building-from-source-all-the-way-down/ https://guix.gnu.org/en/blog/2023/the-full-source-bootstrap-... https://bootstrappable.org/ https://bootstrappable.org/ https://lwn.net/Articles/983340/ https://lwn.net/Articles/983340/
- fweimer 2y agoThe GCC project wants it to be possible to build GCC with a C++11 compiler that is not GCC.