userland/lib/mxlinux: what NetBSD's headers and libc have and glibc lacks,
in one place instead of per port. NetBSD's own sources where they run on
glibc unchanged (getopt, signalname/signalnumber/signalnext,
humanize_number, dehumanize_number, getbsize), ours where Linux's view is
needed (sys_signame from sigabbrev_np, fgetwln, LC_C_LOCALE);
include/mxlinux.h with the NetBSD header line each item stands in for.
The frame forces nbtool_config.h and mxlinux.h into every port and links
libmxlinux.a ahead of libc, so every program gets NetBSD's getopt (glibc's
permutes argv: env -i A=1 failed). SIGINFO is SIGPWR on Makronix,
system-wide (Konrad, 2026-11-11), named INFO in sys_signame: kill -INFO
makes sleep print NetBSD's "Between 2 and 3 seconds left".
The ports shrink to what is theirs: 23 are two lines again; stty keeps its
termios names, sleep -lm, fold _XOPEN_SOURCE, dirname MAN=. Clean rebuild
28/28, no warning; tests 28/28 under qemu and on the phone
(build/logs/userland-{qemu,phone}-mxlinux-2026-11-11.log).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
458 B
Makefile
13 lines
458 B
Makefile
# dirname(1) for the phone, from src/usr.bin/dirname (docs/PORTING-USERLAND.md)
|
|
|
|
MX_SRCDIR= usr.bin/dirname
|
|
|
|
# src/usr.bin/dirname/Makefile says "NOMAN= # defined": there is no
|
|
# dirname.1, the page is basename.1 and is linked to it (basename/Makefile,
|
|
# MLINKS). bsd.hostprog.mk:132 defaults MAN to ${HOSTPROG}.1 without
|
|
# looking at NOMAN, and realall then wants a file that does not exist, so
|
|
# the port states it here.
|
|
MAN=
|
|
|
|
.include "../mk/mx.prog.mk"
|