This still isn't quite correct. For i386, a custom kernel build fails. Here's the diff between GENERIC and the custom config (this mirrors the config I used on amd64 to file the original PR kern/55731):
--- GENERIC 2020-09-27 22:28:13.468056102 -0700 +++ TEST 2020-10-20 07:41:41.302325022 -0700 @@ -22,6 +22,17 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary +# Remove standard options, as they are provided by modules + +no options EXEC_SCRIPT +no options EXEC_ELF32 +no options COREDUMP +no options AIO +no options MQUEUE +no options SEMAPHORE +no options PTRACE + + #ident "GENERIC-$Revision: 1.1233 $" maxusers 64 # estimated number of users @@ -120,7 +131,7 @@ # Diagnostic/debugging support options options DIAGNOSTIC # inexpensive kernel consistency checks # XXX to be commented out on release branch -#options DEBUG # expensive debugging checks/support +options DEBUG # expensive debugging checks/support #options LOCKDEBUG # expensive locking checks/support options DDB # in-kernel debugger #options DDB_ONPANIC=1 # see also sysctl(7): `ddb.onpanic' Here's the build failure (with sources updated Tue Oct 20 14:02:24 UTC) ... # link TEST/netbsd /build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld -Map netbsd.map --cref -T netbsd.ldscript -Ttext c0100000 -e start -X -o netbsd ${SYSTEM_OBJ:[@]:Nswapnetbsd.o} ${EXTRA_OBJ} vers.o swapnetbsd.o /build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: process_machdep.o: in function `ptrace_machdep_dorequest': /build/netbsd-compat/src/sys/arch/i386/i386/process_machdep.c:298: undefined reference to `ptrace_update_lwp' /build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: /build/netbsd-compat/src/sys/arch/i386/i386/process_machdep.c:324: undefined reference to `ptrace_update_lwp' /build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: procfs_fpregs.o: in function `procfs_dofpregs': /build/netbsd-compat/src/sys/miscfs/procfs/procfs_fpregs.c:96: undefined reference to `process_dofpregs' /build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: procfs_fpregs.o: in function `procfs_validfpregs': /build/netbsd-compat/src/sys/miscfs/procfs/procfs_fpregs.c:103: undefined reference to `process_validfpregs' /build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: procfs_regs.o: in function `procfs_doregs': /build/netbsd-compat/src/sys/miscfs/procfs/procfs_regs.c:93: undefined reference to `process_doregs' /build/netbsd-compat/tools/x86_64/i386/bin/i486--netbsdelf-ld: procfs_regs.o: in function `procfs_validregs': /build/netbsd-compat/src/sys/miscfs/procfs/procfs_regs.c:100: undefined reference to `process_validregs' *** [netbsd] Error code 1 nbmake: stopped in /build/netbsd-compat/obj/i386/sys/arch/i386/compile/TEST 1 error On Mon, 19 Oct 2020, Christos Zoulas wrote:
Module Name: src Committed By: christos Date: Mon Oct 19 19:33:02 UTC 2020 Modified Files: src/sys/arch/amd64/conf: MODULAR files.amd64 src/sys/kern: compat_stub.c core_elf32.c files.kern kern_core.c kern_sig.c src/sys/modules/coredump: Makefile src/sys/modules/exec_elf32: Makefile src/sys/modules/exec_elf64: Makefile src/sys/modules/ptrace_common: Makefile src/sys/sys: compat_stub.h exec_elf.h Added Files: src/sys/modules/ptrace_common: machdep.mk Log Message: Arrange so that no options COREDUMP and no options PTRACE work together. Thanks to Paul Goyette for testing. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/amd64/conf/MODULAR cvs rdiff -u -r1.117 -r1.118 src/sys/arch/amd64/conf/files.amd64 cvs rdiff -u -r1.19 -r1.20 src/sys/kern/compat_stub.c cvs rdiff -u -r1.65 -r1.66 src/sys/kern/core_elf32.c cvs rdiff -u -r1.52 -r1.53 src/sys/kern/files.kern cvs rdiff -u -r1.30 -r1.31 src/sys/kern/kern_core.c cvs rdiff -u -r1.390 -r1.391 src/sys/kern/kern_sig.c cvs rdiff -u -r1.6 -r1.7 src/sys/modules/coredump/Makefile cvs rdiff -u -r1.5 -r1.6 src/sys/modules/exec_elf32/Makefile cvs rdiff -u -r1.4 -r1.5 src/sys/modules/exec_elf64/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/modules/ptrace_common/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/ptrace_common/machdep.mk cvs rdiff -u -r1.23 -r1.24 src/sys/sys/compat_stub.h cvs rdiff -u -r1.167 -r1.168 src/sys/sys/exec_elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. !DSPAM:5f8dea32273387311682910!
+--------------------+--------------------------+-----------------------+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | +--------------------+--------------------------+-----------------------+