# PORT-ABI requirements ::::{req} No EmbCC-specific extension in the public API :id: PORT-ABI-001 :status: Accepted :evidence: not evaluated :design_source: requirements/PORT.md The public kernel API shall not require an EmbCC-specific language extension. **Rationale:** GCC and Clang builds are first-class (ADR-023). **Status:** Accepted 2026-10-07 **Verification:** Build matrix: public headers compile with `-std=c11 -pedantic` on GCC and Clang. **Trace:** SPEC-011 §15; SPEC-001 §10; v0.1 §21.5 [Normative source](../../requirements/PORT.md). :::: ::::{req} Portability layer for attributes and builtins :id: PORT-ABI-002 :status: Accepted :evidence: not evaluated :design_source: requirements/PORT.md Compiler-specific attributes and builtins shall be isolated behind portability interfaces. **Rationale:** No compiler conditionals scattered through generic code (v0.1 §21.2). **Status:** Accepted 2026-10-07 **Verification:** Analysis: CI grep rejects `__attribute__` and `__builtin_` outside `include/emb/compiler/` and `arch/`. **Trace:** SPEC-011 §15; SPEC-001 §10 [Normative source](../../requirements/PORT.md). :::: ::::{req} Documented and tested compiler matrix :id: PORT-ABI-003 :status: Accepted :evidence: not evaluated :design_source: requirements/PORT.md Supported compiler and version combinations shall be documented and continuously tested where infrastructure permits. **Rationale:** Support is stated per architecture and version, not claimed globally (v0.1 §21.3). **Status:** Accepted 2026-10-07 **Verification:** Analysis: the matrix of 09 §11 is generated from CI results each release. **Trace:** 09 §11; 05 §2 [Normative source](../../requirements/PORT.md). :::: ::::{req} Early detection of incompatible combinations :id: PORT-ABI-004 :status: Accepted :evidence: not evaluated :design_source: requirements/PORT.md The build shall detect incompatible architecture, ABI, and configuration combinations as early as practical. **Rationale:** A refused configuration beats a wrong image. **Status:** Accepted 2026-10-07 **Verification:** Build tests: hard-float and soft-float mix, a kernel feature the port manifest lacks, a profile the port cannot support, each fails at configuration. **Trace:** SPEC-011 §2; BLD-007 [Normative source](../../requirements/PORT.md). :::: ::::{req} Optimizations never change semantics :id: PORT-ABI-005 :status: Accepted :evidence: not evaluated :design_source: requirements/PORT.md Toolchain-specific optimizations may improve performance but shall not change documented kernel semantics. **Rationale:** One conformance suite across compilers and optimization levels. **Status:** Accepted 2026-10-07 **Verification:** The conformance suite runs at `-O0`, `-Os`, and `-O2` on every compiler of the matrix. **Trace:** 05 §4; 09 §7 [Normative source](../../requirements/PORT.md). ::::