From 2903f566e2e5d13cf4fa79e4cc6c9bae9ffa3f36 Mon Sep 17 00:00:00 2001 From: riastradh Date: Thu, 3 Nov 2016 04:26:58 +0000 Subject: [PATCH] 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 --- sys/compat/common/Makefile | 48 ++------------------------------ sys/compat/common/Makefile.sysio | 41 +++++++++++++++++++++++++++ sys/compat/common/Makefile.sysv | 15 ++++++++++ sys/modules/compat/Makefile | 15 +++------- sys/modules/sysv_ipc/Makefile | 9 ++---- 5 files changed, 65 insertions(+), 63 deletions(-) create mode 100644 sys/compat/common/Makefile.sysio create mode 100644 sys/compat/common/Makefile.sysv diff --git a/sys/compat/common/Makefile b/sys/compat/common/Makefile index 6333252117b3..f6f378184bf9 100644 --- a/sys/compat/common/Makefile +++ b/sys/compat/common/Makefile @@ -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 NOPIC= # defined @@ -11,50 +11,8 @@ CPPFLAGS= ${COMPATCPPFLAGS} ${SKIP_AUTODEP::=} # Common compatibility code, used by all emulations SRCS= compat_exec.c compat_util.c -# 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+= 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 +.include "Makefile.sysio" +.include "Makefile.sysv" # only needed during build libinstall:: diff --git a/sys/compat/common/Makefile.sysio b/sys/compat/common/Makefile.sysio new file mode 100644 index 000000000000..fa8bfceecc0c --- /dev/null +++ b/sys/compat/common/Makefile.sysio @@ -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 diff --git a/sys/compat/common/Makefile.sysv b/sys/compat/common/Makefile.sysv new file mode 100644 index 000000000000..12a004da4da3 --- /dev/null +++ b/sys/compat/common/Makefile.sysv @@ -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 diff --git a/sys/modules/compat/Makefile b/sys/modules/compat/Makefile index 97ea25607182..ffd2ae761420 100644 --- a/sys/modules/compat/Makefile +++ b/sys/modules/compat/Makefile @@ -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" @@ -25,16 +25,9 @@ CPPFLAGS+= -DCOMPAT_30 -DCOMPAT_40 -DCOMPAT_50 CPPFLAGS+= -DCOMPAT_60 -DCOMPAT_70 -DCOMPAT_80 CPPFLAGS+= -DCOMPAT_43 -SRCS= kern_exit_43.c kern_info_09.c -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+= 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 +.include "../../compat/common/Makefile.sysio" + +SRCS+= compat_mod.c .PATH: ${S}/arch/${MACHINE}/${MACHINE} .PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} diff --git a/sys/modules/sysv_ipc/Makefile b/sys/modules/sysv_ipc/Makefile index c54b0cec135f..f80e253257cb 100644 --- a/sys/modules/sysv_ipc/Makefile +++ b/sys/modules/sysv_ipc/Makefile @@ -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" @@ -17,11 +17,6 @@ CPPFLAGS+= -DCOMPAT_13 CPPFLAGS+= -DCOMPAT_14 CPPFLAGS+= -DCOMPAT_50 -SRCS+= sysv_msg_14.c sysv_sem_14.c sysv_shm_14.c -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 "../../compat/common/Makefile.sysv" .include