Skip to content

[nanvix] Makefile.nanvix: enable ac_cv_func_inet_pton=yes#748

Open
esaurez wants to merge 1 commit into
feat/wave5-pr-c-unbundle-group-afrom
split/enable-inet-pton
Open

[nanvix] Makefile.nanvix: enable ac_cv_func_inet_pton=yes#748
esaurez wants to merge 1 commit into
feat/wave5-pr-c-unbundle-group-afrom
split/enable-inet-pton

Conversation

@esaurez

@esaurez esaurez commented Jun 17, 2026

Copy link
Copy Markdown

Flips ac_cv_func_inet_pton from no to yes in Makefile.nanvix. nm against the toolchain libposix.a confirms inet_pton is defined (a T symbol), so the previous =no override was incorrect. With =yes, cpython's configure defines HAVE_INET_PTON in pyconfig.h, which enables the IPv6 fast paths in socketmodule.c and registers the socket.inet_pton / inet_ntop builtins. The symbol resolves at dlopen time from python.elf's .dynsym (libposix.a is whole-archived into the main binary and exported via --export-dynamic). inet_aton stays at =no -- libposix does not provide it.

Dependencies

Merges after nanvix/cpython#739, the base it branches from, but the inet_pton override is otherwise unrelated to the .so migration. Independent of the three sibling cleanups that share the same base -- #745 (drop dead Makefile variables, which also edits Makefile.nanvix but a disjoint region), #746 (drop dead config.py helpers), and #747 (split setup_local sections) -- so the four can merge in any order.

Verified against the toolchain libposix.a via i686-nanvix-nm:

    $ i686-nanvix-nm $(SYSROOT)/lib/libposix.a | grep "^.* T inet_"
    0000000 T inet_addr
    0000000 T inet_ntoa
    0000000 T inet_ntop
    0000000 T inet_pton

The previous ac_cv_func_inet_pton=no override was stale -- it dates
from before libposix gained inet_pton support. Flipping it to yes
lets cpython's configure define HAVE_INET_PTON in pyconfig.h, which
in turn enables the IPv6 fast paths in socketmodule.c (lines
1226-1268) and registers the socket.inet_pton / inet_ntop builtins
(socketmodule.c:6616+). The symbol resolves at dlopen time from
python.elf's .dynsym (libposix.a is whole-archived into the main
binary, exported via --export-dynamic).

inet_aton stays at =no -- libposix does not provide it (absent from
the nm dump above).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant