build(frr): drop libatomic on aarch64 and musl where FRR doesn't need it

Aperta
#2,023 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
nixos, rust
Ambito
build-system

Direzione di ricerca

Read nix/overlays/frr.nix and the postInstall guard from #2017. For each listed platform, inspect undefined symbols against libatomic’s exports with nm -D --undefined-only, checking 16-byte atomics on aarch64; also confirm the stated musl CI/build impact. Done when drop-libatomic covers only platforms where no FRR object needs libatomic and the guard runs for each newly covered platform.

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

Descrizione

Follow-up from #2017 (review by @mvachhar).

#2017 stopped linking FRR against libatomic on x86_64 glibc, where no FRR object needs it, which also removed FRR's dependency on fancy.libatomic (a file copied out of a full libgccjit build, i.e. gcc from source). aarch64 (BF-3) glibc and musl still link it. FRR should link the same way on every platform.

To do, per platform (aarch64 glibc, x86_64 musl, aarch64 musl):

  • Check whether any FRR object needs libatomic: undefined symbols against libatomic's exports (nm -D --undefined-only, as #2017's postInstall guard does). On aarch64, 16-byte atomics are the case to look for; the __aarch64_* outline-atomic helpers come from libgcc, not libatomic.
  • If none do, widen drop-libatomic in nix/overlays/frr.nix to that platform; the guard then runs there too.

Expected payoff:

  • BF-3 glibc uses fancy.libatomic like x86 did, so dropping it there saves the gcc build for BF-3 glibc FRR builds outside CI.
  • musl gets libatomic from the cross-musl gcc's lib output, which the musl toolchain already builds, so little or no CI speedup is expected. Confirm that.
  • The CI cross matrix builds FRR only for bluefield3/musl (frr.dataplane with gnu is excluded).
Lingua principale
Rust
Stelle
21
Fork
9
Merge medio
2g 8h
PR unite (30g)
99

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 githedgehog/dataplane

Tutte le issue di githedgehog/dataplane

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.