Subject: Re: compiling src/sys/lkm/compat/linux on alpha fails
To: None <ks@ub.uni-mainz.de>
From: Juan RP <juan@xtrarom.org>
List: current-users
Date: 09/25/2006 12:37:06
On Mon, 25 Sep 2006 10:23:24 +0200
Kurt Schreiner <ks@ub.uni-mainz.de> wrote:

> Hi,
> 
> compiling -current on alpha fails in src/sys/lkm/compat/linux as
> there is no linux_ptrace.c for alpha (yet?)"
> 
>        link  linux/compat_linux.o
> /u/NetBSD/hxp1/alpha/TOOLS/bin/alpha--netbsd-ld: linux_ptrace.o: No
> such file: No such file or directory --- compat_linux.o ---
> *** [compat_linux.o] Error code 1
> 1 error
> 
> nbmake: stopped in /u/NetBSD/src/sys/lkm/compat/linux
> --- dependall ---
> *** [dependall] Error code 2
> 1 error
> 
> nbmake: stopped in /u/NetBSD/src/sys/lkm/compat/linux
> --- dependall-linux ---
> *** [dependall-linux] Error code 2
> 1 error
> 
> nbmake: stopped in /u/NetBSD/src/sys/lkm/compat
> --- dependall-compat ---
> *** [dependall-compat] Error code 2
> 
> As linux_ptrace.c is only available in
> /u/NetBSD/src/sys/compat/linux/arch/arm/linux_ptrace.c
> /u/NetBSD/src/sys/compat/linux/arch/i386/linux_ptrace.c
> /u/NetBSD/src/sys/compat/linux/arch/mips/linux_ptrace.c
> /u/NetBSD/src/sys/compat/linux/arch/powerpc/linux_ptrace.c
> somthing like the following patch to src/sys/lkm/compat/linux/Makefile
> is needed:
> 
> cvs diff -u Makefile 
> Index: Makefile
> ===================================================================
> RCS file: /cvsroot/src/sys/lkm/compat/linux/Makefile,v
> retrieving revision 1.29
> diff -u -r1.29 Makefile
> --- Makefile    24 Sep 2006 14:35:22 -0000      1.29
> +++ Makefile    25 Sep 2006 08:14:01 -0000
> @@ -22,7 +22,7 @@
>         linux_socket.c linux_termios.c linux_time.c linux_uselib.c
>  SRCS+= linux_machdep.c linux_syscalls.c linux_sysent.c
>  SRCS+= linux_fdio.c linux_hdio.c linux_blkio.c linux_sysctl.c
> -SRCS+= linux_sg.c linux_mtio.c linux_ptrace.c
> +SRCS+= linux_sg.c linux_mtio.c
>  
>  # XXXX - temporary, not applicable for kernel with COMPAT_43,
>  # OSSAUDIO
>  #.PATH: $S/compat/common $S/compat/ossaudio
> @@ -34,7 +34,7 @@
>  SRCS+= linux_break.c linux_llseek.c linux_misc_notalpha.c
> linux_oldolduname.c \ linux_oldselect.c linux_sig_notalpha.c
> linux_socketcall.c \ linux_ipccall.c linux_oldmmap.c linux_olduname.c
> linux_file64.c -SRCS+= linux_syscall.c linux_trap.c
> +SRCS+= linux_syscall.c linux_trap.c linux_ptrace.c
>  SRCS+= linux_sigcode.S
>  .endif
>  
> @@ -51,12 +51,16 @@
>  SRCS+= linux_sigcode.s
>  .endif
>  
> +.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "mips"
> +SRCS+=  linux_ptrace.c
> +.endif
> +
>  .if ${MACHINE_ARCH} == "powerpc"
>  CPPFLAGS+=     -Dpowerpc
>  SRCS+= linux_ipccall.c linux_misc_notalpha.c
> linux_sig_notalpha.c      \ linux_socketcall.c linux_llseek.c
> linux_olduname.c linux_file64.c SRCS+= linux_exec_powerpc.c
> linux_sp_wrap_powerpc.S -SRCS+= linux_sigcode.S linux_trap.c
> +SRCS+= linux_sigcode.S linux_trap.c linux_ptrace.c
>  .endif
>  
>  .include <bsd.kmod.mk>

Patch applied, thanks.