Reorganize SRCS lists for libcompat, compat.kmod, sysv_ipc.kmod.

- Share lists between the libcompat and module makefiles.
- Include some omitted entries in compat.kmod:
  . if_43.c
  . kern_sa_60.c
  . kern_time_30.c
  . rndpseudo_50.c
  . rtsock_14.c
  . rtsock_50.c
  . rtsock_70.c
  . uipc_syscalls_40.c
  . uipc_syscalls_50.c
- Exclude a (harmless) spurious entry in sysv_ipc.kmod on LP64 systems:
  . kern_ipc_10.c

Should fix broken ifconfig on modular current kernels.

ok pgoyette
This commit is contained in:
riastradh 2016-11-03 04:26:58 +00:00
parent 18cd37a864
commit 2903f566e2
5 changed files with 65 additions and 63 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.57 2016/09/21 10:50:23 roy Exp $ # $NetBSD: Makefile,v 1.58 2016/11/03 04:26:58 riastradh Exp $
LIB= compat LIB= compat
NOPIC= # defined NOPIC= # defined
@ -11,50 +11,8 @@ CPPFLAGS= ${COMPATCPPFLAGS} ${SKIP_AUTODEP::=}
# Common compatibility code, used by all emulations # Common compatibility code, used by all emulations
SRCS= compat_exec.c compat_util.c SRCS= compat_exec.c compat_util.c
# Compatibility code for 4.3BSD .include "Makefile.sysio"
SRCS+= kern_exit_43.c kern_info_43.c kern_resource_43.c kern_sig_43.c \ .include "Makefile.sysv"
tty_43.c uipc_syscalls_43.c vfs_syscalls_43.c vm_43.c if_43.c
# Compatibility code for NetBSD 0.9
SRCS+= kern_info_09.c
# Compatibility code for NetBSD 1.2
SRCS+= kern_xxx_12.c vfs_syscalls_12.c vm_12.c
# Compatibility code for NetBSD 1.3
SRCS+= kern_sig_13.c
# Compatibility code for NetBSD 1.6
SRCS+= kern_sig_16.c
# Compatibility code for NetBSD 1.4
SRCS+= sysv_msg_14.c sysv_shm_14.c sysv_sem_14.c rtsock_14.c
# Compatibility code for NetBSD 2.0
SRCS+= vfs_syscalls_20.c
# Compatibility code for NetBSD 3.0
SRCS+= kern_time_30.c vfs_syscalls_30.c uipc_syscalls_30.c
# Compatibility code for NetBSD 4.0
SRCS+= vfs_syscalls_40.c uipc_syscalls_40.c
# Compatibility code for NetBSD 5.0
SRCS+= kern_50.c kern_time_50.c kern_select_50.c rndpseudo_50.c rtsock_50.c \
sysv_ipc_50.c sysv_msg_50.c sysv_sem_50.c sysv_shm_50.c \
vfs_syscalls_50.c uipc_syscalls_50.c
# Compatibility code for NetBSD 6.0
SRCS+= kern_sa_60.c tty_60.c kern_time_60.c
# Compatibility code for NetBSD 7.0
SRCS+= rtsock_70.c uipc_usrreq_70.c
# really, all machines where sizeof(int) != sizeof(long) (LP64)
.if (${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "sparc64" \
&& ${MACHINE_ARCH} != "x86_64")
SRCS+= kern_ipc_10.c
.endif
# only needed during build # only needed during build
libinstall:: libinstall::

View File

@ -0,0 +1,41 @@
# $NetBSD: Makefile.sysio,v 1.1 2016/11/03 04:26:58 riastradh Exp $
# Sources for syscall and ioctl compatibility across the versions.
# Compatibility code for 4.3BSD
SRCS+= kern_exit_43.c kern_info_43.c kern_resource_43.c kern_sig_43.c \
tty_43.c uipc_syscalls_43.c vfs_syscalls_43.c vm_43.c if_43.c
# Compatibility code for NetBSD 0.9
SRCS+= kern_info_09.c
# Compatibility code for NetBSD 1.2
SRCS+= kern_xxx_12.c vfs_syscalls_12.c vm_12.c
# Compatibility code for NetBSD 1.3
SRCS+= kern_sig_13.c
# Compatibility code for NetBSD 1.6
SRCS+= kern_sig_16.c
# Compatibility code for NetBSD 1.4
SRCS+= rtsock_14.c
# Compatibility code for NetBSD 2.0
SRCS+= vfs_syscalls_20.c
# Compatibility code for NetBSD 3.0
SRCS+= kern_time_30.c vfs_syscalls_30.c uipc_syscalls_30.c
# Compatibility code for NetBSD 4.0
SRCS+= vfs_syscalls_40.c uipc_syscalls_40.c
# Compatibility code for NetBSD 5.0
SRCS+= kern_50.c kern_time_50.c kern_select_50.c rndpseudo_50.c rtsock_50.c \
vfs_syscalls_50.c uipc_syscalls_50.c
# Compatibility code for NetBSD 6.0
SRCS+= kern_sa_60.c tty_60.c kern_time_60.c
# Compatibility code for NetBSD 7.0
SRCS+= rtsock_70.c uipc_usrreq_70.c

View File

@ -0,0 +1,15 @@
# $NetBSD: Makefile.sysv,v 1.1 2016/11/03 04:26:58 riastradh Exp $
# Sources for sysv ipc compatibility across the versions.
# Compatibility code for NetBSD 1.4
SRCS+= sysv_msg_14.c sysv_shm_14.c sysv_sem_14.c
# Compatibility code for NetBSD 5.0
SRCS+= sysv_ipc_50.c sysv_msg_50.c sysv_sem_50.c sysv_shm_50.c
# really, all machines where sizeof(int) != sizeof(long) (LP64)
.if (${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "sparc64" \
&& ${MACHINE_ARCH} != "x86_64")
SRCS+= kern_ipc_10.c
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.13 2016/04/06 19:45:45 roy Exp $ # $NetBSD: Makefile,v 1.14 2016/11/03 04:26:58 riastradh Exp $
.include "../Makefile.inc" .include "../Makefile.inc"
@ -25,16 +25,9 @@ CPPFLAGS+= -DCOMPAT_30 -DCOMPAT_40 -DCOMPAT_50
CPPFLAGS+= -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80 CPPFLAGS+= -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80
CPPFLAGS+= -DCOMPAT_43 CPPFLAGS+= -DCOMPAT_43
SRCS= kern_exit_43.c kern_info_09.c .include "../../compat/common/Makefile.sysio"
SRCS+= kern_info_43.c kern_resource_43.c kern_select_50.c
SRCS+= kern_sig_13.c kern_sig_43.c kern_xxx_12.c SRCS+= compat_mod.c
SRCS+= tty_43.c uipc_syscalls_30.c
SRCS+= uipc_syscalls_43.c vfs_syscalls_12.c kern_sig_16.c
SRCS+= vfs_syscalls_20.c vfs_syscalls_30.c vfs_syscalls_40.c
SRCS+= vfs_syscalls_43.c vm_12.c vm_43.c compat_mod.c
SRCS+= kern_time_50.c kern_50.c vfs_syscalls_50.c
SRCS+= tty_60.c kern_time_60.c
SRCS+= uipc_usrreq_70.c
.PATH: ${S}/arch/${MACHINE}/${MACHINE} .PATH: ${S}/arch/${MACHINE}/${MACHINE}
.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} .PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 2015/12/03 02:51:01 pgoyette Exp $ # $NetBSD: Makefile,v 1.3 2016/11/03 04:26:58 riastradh Exp $
.include "../Makefile.inc" .include "../Makefile.inc"
@ -17,11 +17,6 @@ CPPFLAGS+= -DCOMPAT_13
CPPFLAGS+= -DCOMPAT_14 CPPFLAGS+= -DCOMPAT_14
CPPFLAGS+= -DCOMPAT_50 CPPFLAGS+= -DCOMPAT_50
SRCS+= sysv_msg_14.c sysv_sem_14.c sysv_shm_14.c .include "../../compat/common/Makefile.sysv"
SRCS+= sysv_msg_50.c sysv_sem_50.c sysv_shm_50.c sysv_ipc_50.c
.if ${MACHINE_ARCH} != "alpha"
SRCS+= kern_ipc_10.c
.endif
.include <bsd.kmodule.mk> .include <bsd.kmodule.mk>