Skip to content

[nanvix] .nanvix/setup_local: split POSIX-wrapper modules into their own section#747

Open
esaurez wants to merge 4 commits into
feat/wave5-pr-a-stdlib-sofrom
split/cleanup-setup-local-sections
Open

[nanvix] .nanvix/setup_local: split POSIX-wrapper modules into their own section#747
esaurez wants to merge 4 commits into
feat/wave5-pr-a-stdlib-sofrom
split/cleanup-setup-local-sections

Conversation

@esaurez

@esaurez esaurez commented Jun 17, 2026

Copy link
Copy Markdown

Moves _asyncio, _datetime, select, _socket, _posixsubprocess, fcntl, and termios out of the "Modules with bundled-in-cpython C deps" section in .nanvix/setup_local.py and into a dedicated "POSIX syscall wrappers + concurrency primitives" section. The old grouping was misleading: none of these bundle a vendored .a; they are thin POSIX/syscall wrappers (plus _asyncio / _datetime) whose libc / libm symbols resolve against python.elf's .dynsym at dlopen time via --export-dynamic. The new section mirrors upstream Modules/Setup.stdlib.in's "Modules with some UNIX dependencies" grouping.

Purely cosmetic: no change to the generated Setup.local except entry order within the *shared* block (which makesetup does not depend on; each module name still appears at most once).

Validated with ./z lint.

Dependencies

Must merge after nanvix/cpython#739, the base it branches from: it reorders the setup_local.py entries that #739 populates, so it has to sit on top of #739's version of the file. Independent of the three sibling cleanups that share the same base -- #745 (drop dead Makefile variables), #746 (drop dead config.py helpers), and #748 (enable inet_pton) -- which touch different files, so the four can merge in any order.

Enrique Saurez added 2 commits July 15, 2026 16:28
Use the SDK-supported static-PIE and dynamic loader contract instead of the retired GCC wrapper and manual Newlib runtime composition. Shared extensions bind to the SDK libc.so/libm.so through /lib and the install flow stages those runtime libraries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 23312a7e-62f5-477a-a83f-65fd99522fe3
Generate one Setup.local for native and Docker builds, link migrated extensions against the exported Nanvix SDK PIE without duplicating libc state, and retain static C-API anchors required by the current loader. Strip installed modules and exercise real nested-import and dlopen paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 23312a7e-62f5-477a-a83f-65fd99522fe3
@ppenna
ppenna force-pushed the split/cleanup-setup-local-sections branch from c3c69f7 to a819f7d Compare July 16, 2026 01:22
@ppenna
ppenna changed the base branch from feat/wave5-pr-c-unbundle-group-a to feat/wave5-pr-a-stdlib-so July 16, 2026 01:23
@ppenna

ppenna commented Jul 16, 2026

Copy link
Copy Markdown

Reworked and retargeted onto the SDK-compatible #732 branch at a819f7d5008. The generated Setup.local now separates bundled CPython dependencies from POSIX wrapper/concurrency extensions without changing linkage behavior.

Local validation: ./z build, ./z test (all 160 configured modules and smoke tests), and ./z lint all pass.

ppenna and others added 2 commits July 15, 2026 18:42
Emit the gb2312 fixture through Unicode escapes so Windows runners using CP1252 can write test_hello.py without changing the guest assertion.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 23312a7e-62f5-477a-a83f-65fd99522fe3
Keep bundled CPython dependencies and POSIX wrapper/concurrency extensions in distinct generated Setup.local groups on the SDK-era shared-module branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 23312a7e-62f5-477a-a83f-65fd99522fe3
@ppenna
ppenna force-pushed the split/cleanup-setup-local-sections branch from a819f7d to 51d4208 Compare July 16, 2026 01:42
@ppenna

ppenna commented Jul 16, 2026

Copy link
Copy Markdown

Rebased onto corrected #732 at 51d42087951. The full manually dispatched Linux/Windows Nanvix CI run passed: https://github.com/nanvix/cpython/actions/runs/29464810865

@ppenna
ppenna force-pushed the feat/wave5-pr-a-stdlib-so branch from 9def47b to 96fc2a7 Compare July 17, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants