← Back to Pull requests

Add Picolibc support #1886

Closed
unknown closed this pull request without merging on Aug 24, 2026 06:59 UTC
View on GitHub
unknown unknown commented on Jul 29, 2026 16:01 UTC
Author

Add Picolibc as an additional
bare-metal C library alongside newlib. Picolibc support is upstream in GCC
since GCC 16, so no toolchain patches are needed.

This supersedes #1119, which required an out-of-tree GCC patch and stalled
waiting for upstream GCC. With that support now in GCC 16, this is a clean
reimplementation that needs no patches.

Built on top of #1885: the --enable-picolibc selection and the multilib/LLVM
guards reuse the default-libc-selection infrastructure added there.

Commits

1. Add Picolibc submodule
Tracked like the other C library submodules, cloned over https, shallow.

2. Add Picolibc build support
--enable-picolibc makes it the default make target; it can also always be
built with make picolibc.
- Built with Meson and Ninja. The Meson cross file is small and fully
derived from the target tuple, so it is generated inline in the build rule
rather than tracked or emitted by a separate script.
- The code model and other target flags are inherited from
CFLAGS_FOR_TARGET (--with-cmodel and friends), so picolibc matches the
rest of the toolchain instead of hardcoding its own.
- Picolibc shares the riscv*-unknown-elf tuple with newlib, so its binutils
and GDB are reused rather than rebuilt.
- Single arch/ABI variant for now (no multilib); --enable-multilib and
--enable-llvm are rejected for picolibc via the prep guards.
- Meson is added to the dependency lists.

3. CI: build Picolibc toolchains
Add picolibc to the default build matrix (elf-picolibc artifact name),
with the LLVM compiler excluded (no Clang/picolibc integration yet).

Diff: 218 lines (+163 / -55) across 2 files Reviewer: cmuellner Review duration: 36897m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 218 lines diff across 2 files
0.37
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.322
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1886"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 36.7% (MEDIUM) · Higher = larger blast radius
36.7%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.5% · Safe to merge
14.5%