Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

DEC Alpha support

Aperta
#742 43 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust

Direzione di ricerca

Inizia con un elemento lato compilatore non selezionato, ad esempio la Alpha ABI in compiler/rustc_target/src/callconv o la gestione di Alpha in compiler/rustc_target/src/spec/mod.rs. Esamina il lavoro collegato di object e cc-rs, quindi verifica il file del target e il comportamento correlato del compilatore. Il lavoro è completato quando il supporto Alpha selezionato consente di procedere verso la compilazione cross di codice Rust senza dipendere dai workaround elencati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

This is an issue tracking the work on cross-compiling the Rust compiler to DEC Alpha.

Here is a list of things that need to be done to facilitate compiling any Rust code for DEC Alpha:

  • Add bare-bones support for DEC Alpha in the object crate. This crate is used by Rust to embed metadata in executables.
  • Done, PR waiting for merge Add support for the alpha architecture in cc-rs
  • Create an Alpha target file - I have created a target file myself, but I would prefer to double-check if that target is correct.
  • Fix the libgccjit !gdisp!0 error. For now, I workaround this issue by removing this erronious label from all assembled files. We should figure out why this is even generated.
  • Fix the instruction jsr $23,($27),__%E3%j5 getting emited in compiler_builtins. From asking about, it seems like % can't be present in symbol names: it is a format specifier(like in printf). So, it seems like it just does not get expanded properly? This function should normally expand to a call to a division subroutine(DEC alpha lacks hardware division support).

Here is a list of compiler-side changes we will need to make to compile any code to Alpha. Those changes should be merged upstream.

  • Add handling of the Alpha ABI to the Rust compiler, here.
  • Add Alpha to the code inserting metadata into object files, here.
  • Add Alpha as a recognized architecture to be used in #[cfg(target_arch = "alpha")]. This is not strictly needed for our work, but it is a required step before getting anything else upstream.

From some talks with the Rust folk, it seems like we can do those steps without the need for an official target. So, we will be able to just use our own target files, and add a tier 3 target once we have better support.

After those changes, we will be able to build code not depending on std.

  • (Optional) We should also add the config for the x86_64 -> Alpha cross compiler to our configs. This will just make cross-compilation slightly easier for other people(creating those config files is not hard, but having prepared configs would not hurt).

Next, I will list the changes needed to build on std, and code depending on the standard library for Alpha.

  • Add Alpha support to libc(a Rust library desciribing C types on the target). Doing so would require some work(tracking down the size / layout of all the libc types on Alpha). That work should get merged upstream. We may need to cordinate with the libc crate refactor project, to ensure our work does not collide.

  • (Optional) Add Alpha unwinding support to std.

At this point, we should be able to build std, and at least a chunk of crates depending on it. There might be some issues with crates which build C dependencies, but we should be nontheless able to at least try cross-compling some Rust packages to Alpha. We would not be able to run the Rust compiler on Alpha yet, but we would be able to run a chunk of Rust code there.

I belive we should then cross-compile the Rust core, std and alloc test suite to Alpha, to check if everything is working correctly.

I don't yet know what would be required to get the Rust compiler to run on Alpha - will update this once I figure this out.

@glaubitz I think this issue might be of interest to you.

Lingua principale
Rust
Stelle
1.2k
Fork
106
Merge medio
6h 30m
PR unite (30g)
22

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rust-lang/rustc_codegen_gcc

Tutte le issue di rust-lang/rustc_codegen_gcc

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.