|
|
Subscribe / Log in / New account

Building Rust-for-Linux on stable Rust

Building Rust-for-Linux on stable Rust

Posted Sep 24, 2024 23:50 UTC (Tue) by Heretic_Blacksheep (guest, #169992)
In reply to: Building Rust-for-Linux on stable Rust by sam_c
Parent article: Committing to Rust in the kernel

Kernel docs says minimum version is GCC v. 5.1, but it varies depending on architecture. Obviously recently ported hardware would require a newer GCC so take that with a grain of salt. If a (micro)arch was only integrated into GCC last year, that's your likely minimal version. The rest of the build tools versions vary similarly.


to post comments

Building Rust-for-Linux on stable Rust

Posted Sep 27, 2024 12:26 UTC (Fri) by andy_shev (subscriber, #75870) [Link] (1 responses)

“Obviously recently ported hardware would require a newer GCC so take that with a grain of salt.” Obviously? Not at all to me! Can you elaborate on how you came to this conclusion? (Also it looks like you missed word “driver” along the lines)

Building Rust-for-Linux on stable Rust

Posted Sep 27, 2024 16:55 UTC (Fri) by knewt (subscriber, #32124) [Link]

>> “Obviously recently ported hardware would require a newer GCC so take that with a grain of salt.” Obviously? Not at all to me! Can you elaborate on how you came to this conclusion? (Also it looks like you missed word “driver” along the lines)

I imagine the thought here is that newer processor architectures will have only gotten GCC support more recently, and as such only in newer versions of GCC, which feels reasonable.

Building Rust-for-Linux on stable Rust

Posted Sep 27, 2024 16:59 UTC (Fri) by knewt (subscriber, #32124) [Link]

>> Kernel docs says minimum version is GCC v. 5.1, but it varies depending on architecture.

In coincidental timing, seems that's getting bumped up as of 6.13! This patch is in the pipeline as of recently:

========
From: Ard Biesheuvel <ardb@kernel.org>

Bump the minimum GCC version to 8.1 to gain unconditional support for
referring to the per-task stack cookie using a symbol rather than
relying on the fixed offset of 40 bytes from %GS, which requires
elaborate hacks to support.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
========


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds