NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/56418: cannot compile INSTALL_FLOPPY kernel on current/i386
>Number: 56418
>Category: kern
>Synopsis: cannot compile INSTALL_FLOPPY kernel on current/i386
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 27 08:45:00 +0000 2021
>Originator: Kouichi Hashikawa
>Release: 9.99.88
>Organization:
>Environment:
>Description:
I cannot compile INSTALL_FLOPPY kernel (contains no option PTRACE_HOOKS) on current/i386 with,
# link INSTALL_FLOPPY/netbsd
/current/netbsd/c/build/tools/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
/current/netbsd/c/build/tools/bin/i486--netbsdelf-ld: sys_process_lwpstatus.o: in function `process_doregs': sys_process_lwpstatus.c:(.text+0x379): undefined reference to `process_write_regs'
/current/netbsd/c/build/tools/bin/i486--netbsdelf-ld: sys_process_lwpstatus.o: in function `process_dofpregs': sys_process_lwpstatus.c:(.text+0x3a9): undefined reference to `process_write_fpregs'
/current/netbsd/c/build/tools/bin/i486--netbsdelf-ld: sys_process_lwpstatus.o: in function `process_dodbregs': sys_process_lwpstatus.c:(.text+0x3d9): undefined reference to `process_write_dbregs'
*** Failed target: netbsd
>How-To-Repeat:
enable to build INSTALL_FLOPPY kernel and make the kernel.
(in src/etc/etc.i386/Makefile.inc, INSTALL_FLOPPY to BUILD_KERNELS).
>Fix:
I think,
--- src/sys/kern/sys_process_lwpstatus.c-dist 2020-12-21 16:20:40.000000000 +0900
+++ src/sys/kern/sys_process_lwpstatus.c 2021-09-26 15:19:27.982208400 +0900
@@ -144,7 +144,7 @@
#endif
}
-#ifdef PT_REGISTERS
+#if defined(PTRACE_HOOKS) && defined(PT_REGISTERS)
static int
proc_regio(struct lwp *l, struct uio *uio, size_t ks, ptrace_regrfunc_t r,
ptrace_regwfunc_t w)
@@ -186,7 +186,7 @@
struct lwp *l /*traced*/,
struct uio *uio)
{
-#if defined(PT_GETREGS) || defined(PT_SETREGS)
+#if defined(PTRACE_HOOKS) && (defined(PT_GETREGS) || defined(PT_SETREGS))
size_t s;
ptrace_regrfunc_t r;
ptrace_regwfunc_t w;
@@ -220,7 +220,7 @@
struct lwp *l /*traced*/,
struct uio *uio)
{
-#if defined(PT_GETFPREGS) || defined(PT_SETFPREGS)
+#if defined(PTRACE_HOOKS) && (defined(PT_GETFPREGS) || defined(PT_SETFPREGS))
size_t s;
ptrace_regrfunc_t r;
ptrace_regwfunc_t w;
@@ -255,7 +255,7 @@
struct lwp *l /*traced*/,
struct uio *uio)
{
-#if defined(PT_GETDBREGS) || defined(PT_SETDBREGS)
+#if defined(PTRACE_HOOKS) && (defined(PT_GETDBREGS) || defined(PT_SETDBREGS))
size_t s;
ptrace_regrfunc_t r;
ptrace_regwfunc_t w;
Home |
Main Index |
Thread Index |
Old Index