From 8a766d209305e4f57559512a0775902f501ccf8f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Jun 2026 14:34:10 +0000 Subject: [PATCH 1/5] [ci] E: Pin nanvix to v0.16.12 --- .nanvix/nanvix.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nanvix/nanvix.toml b/.nanvix/nanvix.toml index 93de1a1a9..49ab605bd 100644 --- a/.nanvix/nanvix.toml +++ b/.nanvix/nanvix.toml @@ -1,7 +1,7 @@ [package] name = "lxml" version = "5.3.0" -nanvix-version = "0.16.8" +nanvix-version = "0.16.12" [builds] [builds.matrix] From 54d6a2f129d0e528bd798ce56630635b9f670593 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 6 Jun 2026 13:17:41 +0000 Subject: [PATCH 2/5] [ci] E: Pin nanvix to v0.16.16 --- .nanvix/nanvix.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nanvix/nanvix.toml b/.nanvix/nanvix.toml index 49ab605bd..12a948876 100644 --- a/.nanvix/nanvix.toml +++ b/.nanvix/nanvix.toml @@ -1,7 +1,7 @@ [package] name = "lxml" version = "5.3.0" -nanvix-version = "0.16.12" +nanvix-version = "0.16.16" [builds] [builds.matrix] From dbee82362c7964c6532b81893877b8164e1e639c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 7 Jun 2026 13:28:01 +0000 Subject: [PATCH 3/5] [ci] E: Pin nanvix to v0.16.17 --- .nanvix/nanvix.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nanvix/nanvix.toml b/.nanvix/nanvix.toml index 12a948876..9a981c6f5 100644 --- a/.nanvix/nanvix.toml +++ b/.nanvix/nanvix.toml @@ -1,7 +1,7 @@ [package] name = "lxml" version = "5.3.0" -nanvix-version = "0.16.16" +nanvix-version = "0.16.17" [builds] [builds.matrix] From b99321f1826677a119041711db7fd50f65377035 Mon Sep 17 00:00:00 2001 From: esaurez Date: Mon, 8 Jun 2026 11:23:26 -0700 Subject: [PATCH 4/5] [build] E: Link libnvx_crt0.a into test ELF for PR-11b compatibility PR-11b (nanvix/nanvix#2453) moves the `_start` entry point out of `libposix.a` into a new `libnvx_crt0.a`. Consumers that link only libposix + libc fall back to newlib's weak default `_start` and hang at startup with no diagnostic output. Add `libnvx_crt0.a` to the test ELF link line, placed inside the existing `--start-group` ahead of `libposix.a` so the linker resolves the entry point from libnvx_crt0's strong `_start` (T symbol) over newlib's weak fallback. The path is wrapped in `$(wildcard ...)` so the same Makefile works on both pre-PR-11b and post-PR-11b sysroots: - Pre-PR-11b: libnvx_crt0.a does not exist; wildcard expands to empty; `_start` continues to come from libposix.a as before. - Post-PR-11b: libnvx_crt0.a is present; wildcard expands; the linker pulls `_start` and the rest of the crt0 trampoline. `-Wl,--allow-multiple-definition` is required because libnvx_crt0 and libposix both bundle the `sys` Rust crate, and Rust monomorphizes its `#[no_mangle] extern "C" __kcall_*` FFI symbols into BOTH static archives as strong `T` definitions. The two copies are byte-identical (same Rust source, same `--release` profile, same compiler), so it is safe to let the linker silently take whichever it sees first. The duplicate-symbol issue is a libnvx_crt0 crate bug; once that is fixed (`libnvx_crt0` should not re-export sys-crate FFI symbols), the `--allow-multiple-definition` flag can be removed. Validated by building the test ELF and booting it through `nanvixd` against a locally-built nanvix-dev sysroot that contains PR-11b. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .nanvix/Makefile.nanvix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.nanvix/Makefile.nanvix b/.nanvix/Makefile.nanvix index cd21dd3fc..6c581891a 100644 --- a/.nanvix/Makefile.nanvix +++ b/.nanvix/Makefile.nanvix @@ -106,7 +106,9 @@ $(TEST_ELF): $(TEST_SRC) -L$(BUILDROOT_PATH)/lib -L$(SYSROOT_PATH)/lib \ -T$(SYSROOT_PATH)/lib/user.ld -static -Wl,-z,noexecstack \ -lxslt -lxml2 -lz \ + -Wl,--allow-multiple-definition \ -Wl,--start-group \ + $(wildcard $(SYSROOT_PATH)/lib/libnvx_crt0.a) \ $(SYSROOT_PATH)/lib/libposix.a \ $(NANVIX_TOOLCHAIN)/i686-nanvix/lib/libc.a \ $(NANVIX_TOOLCHAIN)/i686-nanvix/lib/libm.a \ From 98a3555cbec3f7e202f05507a18801fed5acf8b1 Mon Sep 17 00:00:00 2001 From: esaurez Date: Mon, 8 Jun 2026 13:38:27 -0700 Subject: [PATCH 5/5] [build] F: Drop -Wl,--allow-multiple-definition (no longer needed) The `-Wl,--allow-multiple-definition` flag was added in the previous commit to silently coalesce 37 duplicate strong symbols that appeared in BOTH `libnvx_crt0.a` and `libposix.a`: * 34 `__kcall_*` FFI wrappers (`__kcall_lock_mutex`, `__kcall_signal_cond`, `__kcall_send`, ...) * `_do_exit_thread` (thread-exit handler) * `_do_start_thread` (asm thread-bootstrap stub) * `_do_start` (process-entry stub) These have now been resolved structurally upstream: * 36 of 37 by the `sys-ffi` crate split that moves the `#[no_mangle]` FFI exports out of `sys` into a dedicated crate that only `libposix.a` links. See nanvix/nanvix#TBD (esaurez/nanvix#30). * The remaining `_do_start` by declaring newlib's stub `.weak` so libnvx_crt0's strong SSE-aligned override wins cleanly. See nanvix/newlib#TBD (esaurez/newlib#5). With those upstream and a toolchain image republished from nanvix/toolchain-gcc#TBD (esaurez/toolchain-gcc#1) that bundles the new newlib commit, the link line no longer needs the flag. Validated end-to-end with the patched toolchain (`local-nanvix/toolchain-gcc:do_start-weak`): * posix-tests: 18 binaries built, 12 integration suites pass * libxml2 functional test: PASS * `_do_start` at the entry point is libnvx_crt0's SSE-aligned variant (`and $0xfffffff0, %esp ; sub $0x8, %esp ; push ; push ; call _start`), not newlib's 9-byte unaligned stub. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .nanvix/Makefile.nanvix | 1 - 1 file changed, 1 deletion(-) diff --git a/.nanvix/Makefile.nanvix b/.nanvix/Makefile.nanvix index 6c581891a..37bf8a319 100644 --- a/.nanvix/Makefile.nanvix +++ b/.nanvix/Makefile.nanvix @@ -106,7 +106,6 @@ $(TEST_ELF): $(TEST_SRC) -L$(BUILDROOT_PATH)/lib -L$(SYSROOT_PATH)/lib \ -T$(SYSROOT_PATH)/lib/user.ld -static -Wl,-z,noexecstack \ -lxslt -lxml2 -lz \ - -Wl,--allow-multiple-definition \ -Wl,--start-group \ $(wildcard $(SYSROOT_PATH)/lib/libnvx_crt0.a) \ $(SYSROOT_PATH)/lib/libposix.a \