Tracking: POSIX feature gaps opted out in configure.host for *-nanvix*
Summary
While shipping the .so-enablement work (esaurez#3, #4), we explicitly opted out of four POSIX feature families that newlib's libc/posix/ ships, plus enabled HAVE_OPENDIR to defer dirent-API responsibility to libposix. Each opt-out is a deliberate "Nanvix does not implement this yet" marker that needs a long-term plan. This issue is the umbrella tracker so the disabled features are visible.
The opt-outs are not bugs in newlib — they use newlib's own capability-macro idiom (cf. the RTEMS entry at configure.host:623). But each cflag corresponds to a real gap on the Nanvix side that should eventually be closed so the cflag can be removed.
Disabled by PR-3 + PR-4
| Feature |
newlib gate |
What it provides |
Why disabled today |
Sub-issue |
| Signal masks |
-D_NO_SIGPROCMASK |
sigprocmask, sigfillset, sigemptyset, sigaddset, sigdelset, sigismember, sigsuspend |
Nanvix has no kernel-side per-thread signal-mask plumbing yet. PR-3 added the cflag to unblock libc/search/hash_page.c. |
(to be filed against nanvix/nanvix + libposix) |
posix_spawn family |
-D_NO_POSIX_SPAWN |
posix_spawn, posix_spawnp, posix_spawnattr_*, posix_spawn_file_actions_* |
Needs fork+execve+sigprocmask; Nanvix has none of those primitives yet. |
(folded with sigprocmask for now) |
popen / pclose |
-D_NO_POPEN |
popen, pclose |
Needs fork+pipe+execve+/bin/sh. |
(to be filed) |
wordexp / wordfree |
-D_NO_WORDEXP |
wordexp, wordfree |
Shells out to /bin/sh for word expansion. |
(to be filed) |
Plus the HAVE_* opt-in (PR-4)
| Macro |
What it silences in newlib |
Why it's set |
-DHAVE_OPENDIR |
opendir.c, readdir.c, closedir.c, dirfd.c, scandir.c, seekdir.c, telldir.c, rewinddir.c, ftw.c, nftw.c |
Nanvix provides opendir/readdir/... in libposix using a different struct dirent layout (d_ino+d_name, no d_reclen). Newlib's BSD-style versions would not compile against Nanvix's <sys/dirent.h>. |
HAVE_OPENDIR is not itself a missing feature — the API exists, just in libposix instead of newlib. But two related items in the same gate are missing everywhere on Nanvix:
| Symbol |
Status on Nanvix |
Notes |
ftw / nftw |
missing everywhere |
Currently empty because HAVE_OPENDIR silences libc/posix/{ftw,nftw}.c. Tree-walk APIs. Pure C — could land in libposix without kernel work; the easy win in this list. |
What "done" looks like
Every cflag listed above can eventually be removed from *-nanvix* in newlib/configure.host. That requires implementations on the Nanvix side (kernel or libposix). This umbrella issue stays open until the cflag list is empty.
Suggested sub-issue breakdown (to be filed against nanvix/nanvix and/or nanvix/libposix)
- sigprocmask + sigaction + sigsuspend — kernel + libposix; biggest item, blocks most others. Local note:
nanvix-todo/nanvix-newlib-implement-sigprocmask.md (also being filed).
- posix_spawn family — libposix; depends on fork/execve which are larger items.
- popen / pclose — libposix; depends on pipe + fork + execve +
/bin/sh.
- wordexp / wordfree — libposix; depends on
/bin/sh for expansion OR a pure-C re-implementation.
- ftw / nftw — libposix; pure-C, just walks
opendir/readdir — easy win, no kernel dep.
References
Tracking: POSIX feature gaps opted out in
configure.hostfor*-nanvix*Summary
While shipping the .so-enablement work (esaurez#3, #4), we explicitly opted out of four POSIX feature families that newlib's
libc/posix/ships, plus enabledHAVE_OPENDIRto defer dirent-API responsibility to libposix. Each opt-out is a deliberate "Nanvix does not implement this yet" marker that needs a long-term plan. This issue is the umbrella tracker so the disabled features are visible.The opt-outs are not bugs in newlib — they use newlib's own capability-macro idiom (cf. the RTEMS entry at
configure.host:623). But each cflag corresponds to a real gap on the Nanvix side that should eventually be closed so the cflag can be removed.Disabled by PR-3 + PR-4
-D_NO_SIGPROCMASKsigprocmask,sigfillset,sigemptyset,sigaddset,sigdelset,sigismember,sigsuspendlibc/search/hash_page.c.posix_spawnfamily-D_NO_POSIX_SPAWNposix_spawn,posix_spawnp,posix_spawnattr_*,posix_spawn_file_actions_*fork+execve+sigprocmask; Nanvix has none of those primitives yet.popen/pclose-D_NO_POPENpopen,pclosefork+pipe+execve+/bin/sh.wordexp/wordfree-D_NO_WORDEXPwordexp,wordfree/bin/shfor word expansion.Plus the
HAVE_*opt-in (PR-4)-DHAVE_OPENDIRopendir.c,readdir.c,closedir.c,dirfd.c,scandir.c,seekdir.c,telldir.c,rewinddir.c,ftw.c,nftw.copendir/readdir/... in libposix using a differentstruct direntlayout (d_ino+d_name, nod_reclen). Newlib's BSD-style versions would not compile against Nanvix's<sys/dirent.h>.HAVE_OPENDIRis not itself a missing feature — the API exists, just in libposix instead of newlib. But two related items in the same gate are missing everywhere on Nanvix:ftw/nftwHAVE_OPENDIRsilenceslibc/posix/{ftw,nftw}.c. Tree-walk APIs. Pure C — could land in libposix without kernel work; the easy win in this list.What "done" looks like
Every cflag listed above can eventually be removed from
*-nanvix*innewlib/configure.host. That requires implementations on the Nanvix side (kernel or libposix). This umbrella issue stays open until the cflag list is empty.Suggested sub-issue breakdown (to be filed against
nanvix/nanvixand/ornanvix/libposix)nanvix-todo/nanvix-newlib-implement-sigprocmask.md(also being filed)./bin/sh./bin/shfor expansion OR a pure-C re-implementation.opendir/readdir— easy win, no kernel dep.References
_NO_SIGPROCMASKand_NO_POSIX_SPAWN._NO_POPEN,_NO_WORDEXP, andHAVE_OPENDIR.nanvix-todo/nanvix-newlib-disabled-posix-features.md