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>
10 lines
330 B
Makefile
10 lines
330 B
Makefile
# kill(1) for the phone, from src/bin/kill (docs/PORTING-USERLAND.md)
|
|
#
|
|
# What the program needs beyond src/bin/kill unchanged -- libnbcompat's
|
|
# nbtool_config.h, NetBSD's getopt, the timespec macros, sys_signame,
|
|
# fgetwln -- comes from the frame (mk/mx.prog.mk) and libmxlinux.
|
|
|
|
MX_SRCDIR= bin/kill
|
|
|
|
.include "../mk/mx.prog.mk"
|