[nanvix] Makefile.nanvix: enable ac_cv_func_inet_pton=yes#26
Open
esaurez wants to merge 1 commit into
Open
Conversation
Verified against the toolchain libposix.a via i686-nanvix-nm:
$ i686-nanvix-nm $(SYSROOT)/lib/libposix.a | grep "^.* T inet_"
00000000 T inet_addr
00000000 T inet_ntoa
00000000 T inet_ntop
00000000 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>
This was referenced Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flips
ac_cv_func_inet_ptonfromnotoyesinMakefile.nanvix.nmagainst the toolchainlibposix.aconfirmsinet_ptonis defined (aTsymbol), so the previous=nooverride was incorrect. With=yes, cpython's configure definesHAVE_INET_PTONinpyconfig.h, which enables the IPv6 fast paths insocketmodule.cand registers thesocket.inet_pton/inet_ntopbuiltins. The symbol resolves at dlopen time frompython.elf's.dynsym(libposix.a is whole-archived into the main binary and exported via--export-dynamic).inet_atonstays at=no-- libposix does not provide it.Dependencies
Merges after #20 (the base it branches from), but the
inet_ptonoverride is otherwise unrelated to the.somigration. Independent of the other cleanups split alongside it (#23, #24, #25) -- #23 also editsMakefile.nanvixbut a disjoint region -- so the four can merge in any order.