docs: embedded platform support design (#276)#277
Open
Sunrisepeak wants to merge 1 commit into
Open
Conversation
Design/proposal doc for entering the embedded Linux ecosystem, restructured as decisions-first (with rationale) then supporting detail. Positioning: mcpp brings its own matched-libc cross compiler (latest GCC) and consumes an external device sysroot — it is NOT a distro builder and never adapts per-vendor SDK. The single core change is opening the sysroot seam (L2); the CLibMode::Sysroot mechanism and the hermetic allow-list already accept tc.sysroot, so it's a minimal insertion. pkg-config and qemu cross test-run are xlings provisioning + thin wiring. Locks the maintainer decision register (16 decisions + rationale), incl.: - C++ source-only; binary interop C-ABI only + wrapper; vendor C++-only libs via a user-built C-bridge .so (built in vendor ABI, pure-C boundary) - glibc baseline pinned low when building payloads (GCC version x glibc decoupled); payloads use the latest GCC (16), GCC 15 is only the import-std capability floor - dropped: L4 backend mode, sysroot pinning/mgmt, .pc synthesis, and the "compiler doesn't support C++23" diagnostic (config II makes that case architecturally impossible) Beachhead: Raspberry Pi aarch64. Net work: P0 sysroot seam + matched-libc low-glibc GCC 16 payloads (+ one glibc-floor validation); P1 pkg-config + qemu test-run. Supersedes the earlier issue-276 analysis note (renamed to a proper design doc).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
嵌入式平台支持方案文档(回应 #276 的本地设计调研,非 issue 评论),从「issue 分析」重构为正式方案文档,结构改为决策点+理由前置,详情后置。
核心结论
CLibMode::Sysroot已能发--sysroot、hermetic 白名单已含tc.sysroot→ 最小改动。锁定的决策(16 条,含理由)
含:C++ 只源码 / 二进制只 C-ABI+封装;厂商 C++-only 库走用户建的 C 桥
.so;glibc 基线造 payload 时 pin 低(GCC 版本×glibc 解耦,payload 用最新 GCC 16,GCC 15 只是能力 floor);去掉 L4 后端、sysroot pinning、造.pc、以及「编译器不支持 C++23」诊断(架构上该场景不存在)。净工作
详见文档正文(决策表 + 现状核实/可行性/风险 + 关键文件索引 + Rust 对照)。