relibc: full eventfd() implementation + no-stubs policy in AGENTS.md
Replaced P3-sys-eventfd-create.patch (constants-only stub) with: - P3-eventfd-impl.patch: full eventfd() opening /scheme/event/eventfd - P3-bits-eventfd.patch: eventfd_t type - P3-eventfd-cbindgen.patch: generates sys/eventfd.h C header - P3-bits-eventfd-mod.patch: wires bits_eventfd into header/mod.rs libwayland: removed eventfd stub from redox.patch — relibc provides it now. Only meson.build fix + wl_proxy null guards + MSG_NOSIGNAL guard remain. Documented zero-tolerance stub policy at top of local/AGENTS.md.
This commit is contained in:
@@ -3,6 +3,35 @@
|
||||
This directory contains ALL custom work on top of mainline Redox. When mainline Redox
|
||||
updates (`git pull` on the build system repo), this directory is untouched.
|
||||
|
||||
## STUB AND WORKAROUND POLICY — ZERO TOLERANCE
|
||||
|
||||
**Red Bear OS has zero tolerance for stubs, workarounds, `#ifdef`-guarded no-ops, fake headers,
|
||||
shell-script patches, sed/awk hacks, `LD_PRELOAD` tricks, rename-to-.disabled wrappers, or any
|
||||
other "make it compile" shortcut.**
|
||||
|
||||
If something doesn't build because of a missing implementation, the ONLY acceptable response is
|
||||
to implement the missing functionality in the correct component:
|
||||
|
||||
| Problem | Correct Fix |
|
||||
|---------|-------------|
|
||||
| `eventfd()` not found | Implement `eventfd()` in relibc, generate `sys/eventfd.h` via cbindgen |
|
||||
| `signalfd()` not found | Implement `signalfd()` in relibc, generate `sys/signalfd.h` via cbindgen |
|
||||
| Missing POSIX type | Add it to the relibc header it belongs to, with proper `stdint.h` include chain |
|
||||
| Compiler can't find header | Fix the include path in the recipe's sysroot/cookbook, NOT by adding `-I` hacks |
|
||||
| CMake can't find dependency | Implement the dependency or fix pkg-config, NOT with `-DFEATURE_x=OFF` |
|
||||
| Qt needs `open_memstream` | Implement it in relibc — never add a static stub in Qt or libwayland source |
|
||||
|
||||
**Any stub found in the tree is a bug to be fixed, not a precedent to follow.**
|
||||
|
||||
When relibc gains a function or type that obsoletes a previously-needed local stub, the stub
|
||||
MUST be removed and the dependency switched to relibc's implementation. Coexistence of stubs
|
||||
with real implementations causes header conflicts, linker errors, and silent ABI mismatches.
|
||||
|
||||
This applies to: relibc functions, kernel syscalls, C headers, CMake modules, pkg-config `.pc`
|
||||
files, Wayland protocol stubs, D-Bus service stubs, and any other layer of the stack.
|
||||
|
||||
**No exceptions. No "temporary." No "until we fix it properly."**
|
||||
|
||||
## DESIGN PRINCIPLE
|
||||
|
||||
Red Bear OS is a **full fork** based on frozen Redox OS snapshots:
|
||||
|
||||
Reference in New Issue
Block a user