build: relibc circular include fix (stddef→cbindgen) + config ignores
relibc (3 commits integrated from upstream, pushed to gitea:redbear-v2): -826a984f: stddef.h moved from hand-written C to cbindgen (3be84f4b) Creates bits_wchar-t, bits_size-t, bits_null sub-headers. Fixes missing wchar_t in inttypes.h that broke xkbcommon. -4eabdf20: wchar.h upstream include ordering + stdbool.h POSIX fix wint_t before stddef.h; dropped redundant wchar_t redefinition. #define bool _Bool replaces non-standard typedef. Build config (ignores gate): - libxkbcommon, xkeyboard-config = ignore (X11-only, not needed) - gcc-native, gcc13 = ignore (native compilers, not needed for ISO) gettext recipe: autoreconf path fix + disable C++/C#/Java parts. AGENTS.md: updated relibc Header Circular Includes section with new commits826a984f+4eabdf20and stddef→cbindgen architecture.
This commit is contained in:
@@ -705,9 +705,20 @@ wchar.h → stdio.h → stdint.h → gnulib inttypes.h → inttypes.h → wchar.
|
||||
**Root cause**: `wchar.h` included `<stdio.h>` before defining `wint_t`/`mbstate_t`, and
|
||||
`inttypes.h` included `<wchar.h>` instead of `<stdint.h>`+`<stddef.h>` per POSIX spec.
|
||||
|
||||
**Fix** (commits `d28963d`, `a2e4cd2` in `local/sources/relibc/`):
|
||||
**Fix** (commits `d28963d`, `a2e4cd2`, `826a984f`, `4eabdf20` in `local/sources/relibc/`):
|
||||
1. `wchar/cbindgen.toml`: Types defined in `after_includes` before `#include <stdio.h>`
|
||||
2. `inttypes/cbindgen.toml`: `sys_includes = ["stdint.h", "stddef.h"]` (POSIX compliant)
|
||||
3. **stddef → cbindgen** (`826a984f`, integrates upstream `3be84f4b`):
|
||||
- Eliminated hand-written `include/stddef.h` (was missing `wchar_t`)
|
||||
- `stddef.h` now generated by cbindgen from `src/header/stddef/cbindgen.toml`
|
||||
- Split into modular `bits_*` sub-headers (each can be included independently):
|
||||
- `bits/wchar-t.h` — `wchar_t` with `_WCHAR_T` guard + `__WCHAR_TYPE__`
|
||||
- `bits/size-t.h` — `size_t` from Rust `usize` via cbindgen `[export]`
|
||||
- `bits/null.h` — `NULL`: `nullptr` (C++11), `0L` (C++), `(void *)0` (C)
|
||||
4. **wchar.h include ordering** (`4eabdf20`):
|
||||
- `wint_t` defined BEFORE `#include <stddef.h>` (avoid GCC `__need_wint_t` conflict)
|
||||
- Removed redundant `wchar_t` redefinition (now provided by `bits/wchar-t.h`)
|
||||
5. **stdbool.h POSIX fix** (`4eabdf20`): `#define bool _Bool` replaces non-standard `typedef _Bool bool`
|
||||
|
||||
See `local/docs/PACKAGE-BUILD-QUIRKS.md` § relibc Quirk 3 for details.
|
||||
|
||||
|
||||
@@ -50,6 +50,8 @@ libdrm = {}
|
||||
|
||||
# X11 protocol headers (needed by libxau, libxkbcommon, etc.)
|
||||
x11proto = {}
|
||||
libxkbcommon = "ignore"
|
||||
xkeyboard-config = "ignore"
|
||||
|
||||
libwayland = {}
|
||||
wayland-protocols = {}
|
||||
@@ -149,7 +151,7 @@ redbear-power = {}
|
||||
|
||||
# Native build toolchain (Phase 3: GCC + binutils running on redox)
|
||||
# Produces gcc/g++/as/ld that execute inside Red Bear OS
|
||||
gcc-native = {}
|
||||
gcc-native = "ignore"
|
||||
binutils-native = {}
|
||||
# llvm-native = {} # suppressed: Redox C++/pthread header gaps; not needed for greeter proof
|
||||
# rust-native = {} # suppressed: depends on llvm-native; not needed for greeter proof
|
||||
|
||||
@@ -68,7 +68,7 @@ freefont = {}
|
||||
freepats = {}
|
||||
freetype2 = {}
|
||||
fribidi = {}
|
||||
gcc13 = {}
|
||||
gcc13 = "ignore"
|
||||
gdbserver = {}
|
||||
gdk-pixbuf = {}
|
||||
gears = {}
|
||||
|
||||
+1
-1
Submodule local/sources/relibc updated: 2f320c1ea0...4eabdf2016
@@ -37,7 +37,11 @@ COOKBOOK_CONFIGURE_FLAGS=(
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-included-gettext
|
||||
--disable-libasprintf
|
||||
--disable-csharp
|
||||
--disable-java
|
||||
)
|
||||
export CXX=false
|
||||
export CFLAGS+=" -fPIC"
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
ac_cv_have_decl_program_invocation_name=no
|
||||
|
||||
Reference in New Issue
Block a user