|
|
Log in / Subscribe / Register

Compiling Rust with GCC: an update

Compiling Rust with GCC: an update

Posted Sep 9, 2022 17:37 UTC (Fri) by mfuzzey (subscriber, #57966)
In reply to: Compiling Rust with GCC: an update by developer122
Parent article: Compiling Rust with GCC: an update

The list of kernel supported architectures not supported by LLVM seems to be

* alpha
* arc
* m68k
* microblaze
* nios2
* openrisc
* parisc
* s390
* sh
* um
* xtensa

alpha and nios2 used to be supported but LLVM but have since been dropped.

As for "widely used" I guess that depends on your perspective


to post comments

Compiling Rust with GCC: an update

Posted Sep 9, 2022 20:16 UTC (Fri) by developer122 (guest, #152928) [Link]

There is in fact a port of rust to m68k, but only on linux.

Compiling Rust with GCC: an update

Posted Sep 10, 2022 0:14 UTC (Sat) by ndesaulniers (subscriber, #110768) [Link] (3 responses)

S390 and UM (usermide x86) are supported.

Compiling Rust with GCC: an update

Posted Sep 10, 2022 0:17 UTC (Sat) by ndesaulniers (subscriber, #110768) [Link]

In fact we test many different builds of Linux kernel for s390 and um with clang, and boot test them in CI.

s390x vs s390

Posted Sep 10, 2022 0:54 UTC (Sat) by tialaramex (subscriber, #21167) [Link] (1 responses)

I guess Rust only cares about s390x ("modern" 64-bit IBM) whereas I believe the Linux kernel technically builds on (32-bit) s390 despite there presumably not being many (any?) actual 20th century System/390 machines running it in practical use ?

If it ever came down to "Should we support decades old System/390 mainframes or Rust?" that seems like a no brainer but for now at least the ambition isn't anywhere close to that.

s390x vs s390

Posted Sep 10, 2022 12:16 UTC (Sat) by willy (subscriber, #9762) [Link]

Compiling Rust with GCC: an update

Posted Sep 10, 2022 11:18 UTC (Sat) by glaubitz (subscriber, #96452) [Link]

m68k is actually supported by LLVM as an experimental target thanks to efforts of the community ;-).

Compiling Rust with GCC: an update

Posted Sep 10, 2022 18:09 UTC (Sat) by linusw (subscriber, #40300) [Link] (2 responses)

There are some further "holes" in that list.

The ARM ISA is not universally supported, specifically not ARMv4 (not even in LLVM in general last time I checked) and I am even uncertain about ARMv5 for rust, both have substantial deployment and isn't going away from the kernel anytime soon.

Compiling Rust with GCC: an update

Posted Sep 11, 2022 10:39 UTC (Sun) by tialaramex (subscriber, #21167) [Link] (1 responses)

Rust's tier support list says armv4t-none-eabi has tier 3. That platform is described as ARMv4 with Thumb and exists particularly to make the Nintendo Gameboy Advance work.

Tier 3 means Rust's CI checks this compiles, but they don't check it works, and it is only supplied with the core library.

Obviously the kernel is comfortable in that world, you can't just TcpStream::connect() from inside the kernel either, although it won't fit on a GBA as I understand it, presumably if you've got a big enough ARMv4 system to run Linux, Rust isn't a difficult problem.

Compiling Rust with GCC: an update

Posted Sep 11, 2022 12:18 UTC (Sun) by josh (subscriber, #17465) [Link]

> Tier 3 means Rust's CI checks this compiles, but they don't check it works, and it is only supplied with the core library.

That's tier 2 (compiles, but isn't tested). Tier 3 is "this exists in the codebase, and might work, but you'll need to build it yourself".

https://doc.rust-lang.org/nightly/rustc/platform-support....


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