From 304692a11ff9d2e59ce7d267b439817e098abc7a Mon Sep 17 00:00:00 2001 From: vasilito Date: Mon, 29 Jun 2026 01:43:25 +0300 Subject: [PATCH] =?UTF-8?q?build:=20relibc=20circular=20include=20fix=20(s?= =?UTF-8?q?tddef=E2=86=92cbindgen)=20+=20config=20ignores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 commits 826a984f + 4eabdf20 and stddef→cbindgen architecture. --- AGENTS.md | 13 ++++++++++++- config/redbear-full.toml | 4 +++- config/x86_64/ci.toml | 2 +- local/sources/relibc | 2 +- recipes/tools/gettext/recipe.toml | 4 ++++ 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ee90485d3b..f032dc5536 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -705,9 +705,20 @@ wchar.h → stdio.h → stdint.h → gnulib inttypes.h → inttypes.h → wchar. **Root cause**: `wchar.h` included `` before defining `wint_t`/`mbstate_t`, and `inttypes.h` included `` instead of ``+`` 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 ` 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 ` (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. diff --git a/config/redbear-full.toml b/config/redbear-full.toml index 07d0b1b947..1261f7b09a 100644 --- a/config/redbear-full.toml +++ b/config/redbear-full.toml @@ -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 diff --git a/config/x86_64/ci.toml b/config/x86_64/ci.toml index 23ce90a6fc..5ec964a046 100644 --- a/config/x86_64/ci.toml +++ b/config/x86_64/ci.toml @@ -68,7 +68,7 @@ freefont = {} freepats = {} freetype2 = {} fribidi = {} -gcc13 = {} +gcc13 = "ignore" gdbserver = {} gdk-pixbuf = {} gears = {} diff --git a/local/sources/relibc b/local/sources/relibc index 2f320c1ea0..4eabdf2016 160000 --- a/local/sources/relibc +++ b/local/sources/relibc @@ -1 +1 @@ -Subproject commit 2f320c1ea0c75be157cef770e2dfe8011f264122 +Subproject commit 4eabdf20165cf41795052f91979092fcefd163c4 diff --git a/recipes/tools/gettext/recipe.toml b/recipes/tools/gettext/recipe.toml index b8a0720bf3..bf6f141fcf 100644 --- a/recipes/tools/gettext/recipe.toml +++ b/recipes/tools/gettext/recipe.toml @@ -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