Re:GCC Rust Approved by GCC Steering Committee
by tcmart14 on Monday July 11, 2022 @12:35PM
(#32058397)
I didn't see this mentioned in any replies, but I think another reason why this is wanted is for Rust in the linux kernel development. If Rust can compile using GCC tooling, it should be easier to integrate into the build process for the Linux kernel. As it stands now, if Linux kernel development allowed Rust in areas of the kernel outside of modules and drivers, you need the GCC tool chain to build the kernel and the llvm toolchain. So it also meets a requirement, or at least greases the wheels, for the possibility of getting Rust into the Linux kernel.
[ Parent
| on HN ]
Re:GCC Rust Approved by GCC Steering Committee
by wongarsu on Monday July 11, 2022 @12:54PM
(#32058625)
And while you can link a gcc-compiled kernel with llvm-compiled rust, apparently you lose some link-time optimization, and with that control-flow integrity [1]. That's a potential security concern for the kernel, in addition to the usability issues of using two toolchains.
Re:GCC Rust Approved by GCC Steering Committee
by JoshTriplett on Monday July 11, 2022 @02:01PM
(#32059481)
rustc_codegen_gcc will solve the same problem. I would expect it to be possible to do LTO and CFI across rustc_codegen_gcc and gcc-compiled C or C++ code.