4 ms·
This is probably what you mean: https://github.com/thepowersgang/mrustc https://github.com/thepowersgang/mrustc It's still a work in progress, with only x86 e
by pedrocr 7y ago
This is probably what you mean:
https://github.com/thepowersgang/mrustc https://github.com/thepowersgang/mrustc
It's still a work in progress, with only x86 even supported. It's not a GCC frontend, it generates C, and is based on an old version of rust (1.19). Right now I think it's only useful to bootstrap rust, but that doesn't help you get a backend for another architecture.
- yjftsjthsd-h 7y agoWhy not? Just bootstrap but on another architecture?
- werecat 7y agoJust because you may have a functional compiler running on a another architecture, doesn't mean the compiler actually outputs code FOR that architecture. The compiler would still only support the architectures it did when you bootstrapped it, which in that case would not include that specific architecture.
- steveklabnik 7y agoThe Rust compiler is a cross-compiler by default, so the usual way that you bootstrap on a new platform is to add it to the existing compiler, and then cross-compile to the new architecture. Which is what I read your parent as suggesting.
- pedrocr 7y agoThe discussion is not about bootstrapping. Bootstrapping using mrustc on riscv64 would get you a working rust 1.19 compiler that runs on riscv64 and knows how to emit x86 code. It wouldn't even allow you to go up to the latest version. That's not very useful, Debian already has a rust compiler that emits x86, it needs a rust compiler that emits riscv64.
- steveklabnik 7y agoRight. They could add the riscv64 backend to the current compiler, and then cross-compile it from x86_64, meaning that the bootstrap chain for riscv64 would start at 1.37.0. No mrustc even needed. That said, I feel like we may be talking past each other... what I'm saying is, to get support for riscv64, you don't need to do a full new bootstrap. Maybe I'm misunderstanding the point of the thread.
- steveklabnik 7y agoThat is the usual case, but some people don't want to download any binary blob that's not a C compiler.