From 932f49b97536058d40163be5b22674ea37bdfe51 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 15 Aug 2003 06:32:58 +0000 Subject: [PATCH] Make modules work again part 1: linkup emulation/ and change the architecture softlink scheme so the module build and the direct linked-to-kernel build can more easily access architecture-specific files. A new config is required. still more to come... --- sys/conf/Makefile.i386 | 4 +- sys/conf/kmod.mk | 12 +++- sys/emulation/ibcs2/Makefile | 4 +- sys/emulation/ibcs2/i386/Makefile | 6 +- sys/emulation/ibcs2/i386/syscalls.xenix.conf | 4 +- sys/emulation/linux/Makefile | 7 +- sys/emulation/linux/i386/Makefile | 6 +- sys/emulation/linux/i386/linprocfs/Makefile | 4 +- sys/emulation/linux/linux_file.c | 6 +- sys/emulation/linux/linux_getcwd.c | 6 +- sys/emulation/linux/linux_ioctl.c | 6 +- sys/emulation/linux/linux_ipc.c | 6 +- sys/emulation/linux/linux_mib.c | 4 +- sys/emulation/linux/linux_misc.c | 6 +- sys/emulation/linux/linux_signal.c | 6 +- sys/emulation/linux/linux_socket.c | 6 +- sys/emulation/linux/linux_stats.c | 6 +- sys/emulation/linux/linux_sysctl.c | 6 +- sys/emulation/linux/linux_uid16.c | 6 +- sys/emulation/svr4/Makefile | 67 +++++++++++++++++--- sys/emulation/svr4/svr4_signal.h | 4 +- usr.sbin/config/configvers.h | 4 +- usr.sbin/config/main.c | 29 +++++---- 23 files changed, 141 insertions(+), 74 deletions(-) diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index 4ef967576c..ba09b437a3 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -2,7 +2,7 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 # $FreeBSD: src/sys/conf/Makefile.i386,v 1.179.2.16 2002/11/18 11:26:49 ru Exp $ -# $DragonFly: src/sys/conf/Attic/Makefile.i386,v 1.3 2003/08/07 21:16:48 dillon Exp $ +# $DragonFly: src/sys/conf/Attic/Makefile.i386,v 1.4 2003/08/15 06:32:57 dillon Exp $ # # Makefile for FreeBSD # @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 400020 +%VERSREQ= 400021 # Can be overridden by makeoptions or /etc/make.conf KERNEL?= kernel diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index ac004b33af..bc29866179 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -1,6 +1,6 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 # $FreeBSD: src/sys/conf/kmod.mk,v 1.82.2.15 2003/02/10 13:11:50 nyan Exp $ -# $DragonFly: src/sys/conf/kmod.mk,v 1.4 2003/08/08 03:57:35 dillon Exp $ +# $DragonFly: src/sys/conf/kmod.mk,v 1.5 2003/08/15 06:32:58 dillon Exp $ # # The include file handles installing Kernel Loadable Device # drivers (KLD's). @@ -137,6 +137,9 @@ ${KMOD}.kld: ${OBJS} .endif _ILINKS=@ machine +.if defined(ARCH) +_ILINKS+=${ARCH} +.endif all: objwarn ${PROG} .if !defined(NOMAN) @@ -153,7 +156,7 @@ ${OBJS}: ${_link} .endfor # Search for kernel source tree in standard places. -.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. /sys /usr/src/sys .if !defined(SYSDIR) && exists(${_dir}/kern/) SYSDIR= ${_dir} .endif @@ -162,14 +165,17 @@ SYSDIR= ${_dir} .error "can't find kernel source tree" .endif +# path=`(cd $$path && /bin/pwd)` ; + ${_ILINKS}: @case ${.TARGET} in \ machine) \ path=${SYSDIR}/${MACHINE_ARCH}/include ;; \ @) \ path=${SYSDIR} ;; \ + arch_*) \ + path=${.CURDIR}/${MACHINE_ARCH} ;; \ esac ; \ - path=`(cd $$path && /bin/pwd)` ; \ ${ECHO} ${.TARGET} "->" $$path ; \ ln -s $$path ${.TARGET} diff --git a/sys/emulation/ibcs2/Makefile b/sys/emulation/ibcs2/Makefile index cfcc4e4c8d..2c6f20e434 100644 --- a/sys/emulation/ibcs2/Makefile +++ b/sys/emulation/ibcs2/Makefile @@ -1,7 +1,7 @@ # $FreeBSD: src/sys/modules/ibcs2/Makefile,v 1.26.2.3 2002/08/07 16:31:56 ru Exp $ -# $DragonFly: src/sys/emulation/ibcs2/Attic/Makefile,v 1.2 2003/06/17 04:28:44 dillon Exp $ +# $DragonFly: src/sys/emulation/ibcs2/Attic/Makefile,v 1.3 2003/08/15 06:32:47 dillon Exp $ -.PATH: ${.CURDIR}/../../i386/ibcs2 +.PATH: ${.CURDIR}/../../emulation/ibcs2/i386 KMOD= ibcs2 SRCS= ibcs2_errno.c ibcs2_ipc.c ibcs2_stat.c ibcs2_misc.c \ ibcs2_fcntl.c ibcs2_signal.c ibcs2_sysent.c ibcs2_ioctl.c \ diff --git a/sys/emulation/ibcs2/i386/Makefile b/sys/emulation/ibcs2/i386/Makefile index 4e4d9bd218..1a1045ddc9 100644 --- a/sys/emulation/ibcs2/i386/Makefile +++ b/sys/emulation/ibcs2/i386/Makefile @@ -1,10 +1,12 @@ # Makefile for syscall tables # # $FreeBSD: src/sys/i386/ibcs2/Makefile,v 1.2 1999/08/28 00:43:56 peter Exp $ -# $DragonFly: src/sys/emulation/ibcs2/i386/Attic/Makefile,v 1.4 2003/08/07 21:17:17 dillon Exp $ +# $DragonFly: src/sys/emulation/ibcs2/i386/Attic/Makefile,v 1.5 2003/08/15 06:32:48 dillon Exp $ all: - @echo "make ibcs2_sysent.c, ibcs2_isc_sysent.c or ibcs2_xenix_sysent.c only" + @echo "make sysent only (generates ibcs2_sysent.c, ibcs2_isc_sysent.c and ibcs2_xenix_sysent.c)" + +sysent: ibcs2_sysent.c ibcs2_isc_sysent.c ibcs2_xenix_sysent.c ibcs2_sysent.c ibcs2_syscall.h ibcs2_proto.h ibcs2_union.h: ../../../kern/makesyscalls.sh \ syscalls.master syscalls.conf diff --git a/sys/emulation/ibcs2/i386/syscalls.xenix.conf b/sys/emulation/ibcs2/i386/syscalls.xenix.conf index 24cfc9df8b..cda0220ae4 100644 --- a/sys/emulation/ibcs2/i386/syscalls.xenix.conf +++ b/sys/emulation/ibcs2/i386/syscalls.xenix.conf @@ -1,8 +1,8 @@ # syscalls.conf $FreeBSD: src/sys/i386/ibcs2/syscalls.xenix.conf,v 1.5 1999/08/28 00:44:02 peter Exp $ -# syscalls.conf $DragonFly: src/sys/emulation/ibcs2/i386/Attic/syscalls.xenix.conf,v 1.3 2003/07/30 00:19:14 dillon Exp $ +# syscalls.conf $DragonFly: src/sys/emulation/ibcs2/i386/Attic/syscalls.xenix.conf,v 1.4 2003/08/15 06:32:48 dillon Exp $ sysnames="/dev/null" sysproto="ibcs2_xenix.h" -sysunion="ibcs2_xenix_union.h" +sysunion="/dev/null" sysproto_h=_IBCS2_XENIX_H_ syshdr="ibcs2_xenix_syscall.h" sysmk="/dev/null" diff --git a/sys/emulation/linux/Makefile b/sys/emulation/linux/Makefile index a86ce7b0e4..a48213ab9b 100644 --- a/sys/emulation/linux/Makefile +++ b/sys/emulation/linux/Makefile @@ -1,10 +1,11 @@ # $FreeBSD: src/sys/modules/linux/Makefile,v 1.34.2.12 2003/01/02 20:41:34 kan Exp $ -# $DragonFly: src/sys/emulation/linux/Makefile,v 1.2 2003/06/17 04:28:44 dillon Exp $ +# $DragonFly: src/sys/emulation/linux/Makefile,v 1.3 2003/08/15 06:32:51 dillon Exp $ MAINTAINER= marcel@FreeBSD.org -.PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_ARCH}/linux +.PATH: ${.CURDIR}/../../emulation/linux ${.CURDIR}/../../emulation/linux/${MACHINE_ARCH} +ARCH= arch_linux KMOD= linux SRCS= linux_dummy.c linux_file.c linux_getcwd.c linux_ioctl.c linux_ipc.c \ linux_machdep.c linux_mib.c linux_misc.c linux_signal.c linux_socket.c \ @@ -13,6 +14,7 @@ SRCS= linux_dummy.c linux_file.c linux_getcwd.c linux_ioctl.c linux_ipc.c \ OBJS= linux_locore.o MAN= linux.8 +SUBDIR= i386/linprocfs .if ${MACHINE_ARCH} == "i386" SRCS+= linux_ptrace.c linux_uid16.c imgact_linux.c opt_cpu.h .endif @@ -40,3 +42,4 @@ afterinstall: ${.CURDIR}/linux.sh ${DESTDIR}/usr/sbin/linux .include +.include diff --git a/sys/emulation/linux/i386/Makefile b/sys/emulation/linux/i386/Makefile index 849fdf4876..aeb05926a3 100644 --- a/sys/emulation/linux/i386/Makefile +++ b/sys/emulation/linux/i386/Makefile @@ -1,10 +1,12 @@ # Makefile for syscall tables # # $FreeBSD: src/sys/i386/linux/Makefile,v 1.4 1999/08/28 00:45:21 peter Exp $ -# $DragonFly: src/sys/emulation/linux/i386/Makefile,v 1.4 2003/08/07 21:17:18 dillon Exp $ +# $DragonFly: src/sys/emulation/linux/i386/Makefile,v 1.5 2003/08/15 06:32:54 dillon Exp $ all: - @echo "make linux_sysent.c only" + @echo "make sysent only" + +sysent: linux_sysent.c linux_sysent.c linux_syscall.h linux_proto.h linux_union.h: ../../../kern/makesyscalls.sh \ syscalls.master syscalls.conf diff --git a/sys/emulation/linux/i386/linprocfs/Makefile b/sys/emulation/linux/i386/linprocfs/Makefile index 4c3eec201c..981737b8fb 100644 --- a/sys/emulation/linux/i386/linprocfs/Makefile +++ b/sys/emulation/linux/i386/linprocfs/Makefile @@ -1,7 +1,7 @@ # $FreeBSD: src/sys/modules/linprocfs/Makefile,v 1.1.2.3 2000/06/06 11:53:28 des Exp $ -# $DragonFly: src/sys/emulation/linux/i386/linprocfs/Makefile,v 1.2 2003/06/17 04:28:44 dillon Exp $ +# $DragonFly: src/sys/emulation/linux/i386/linprocfs/Makefile,v 1.3 2003/08/15 06:32:55 dillon Exp $ -.PATH: ${.CURDIR}/../../i386/linux/linprocfs +.PATH: ${.CURDIR}/../../../../emulation/linux/i386/linprocfs KMOD= linprocfs SRCS= vnode_if.h linprocfs_misc.c linprocfs_subr.c \ linprocfs_vfsops.c linprocfs_vnops.c diff --git a/sys/emulation/linux/linux_file.c b/sys/emulation/linux/linux_file.c index f17300a944..2805781f8d 100644 --- a/sys/emulation/linux/linux_file.c +++ b/sys/emulation/linux/linux_file.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_file.c,v 1.41.2.6 2003/01/06 09:19:43 fjoe Exp $ - * $DragonFly: src/sys/emulation/linux/linux_file.c,v 1.8 2003/08/07 21:17:18 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_file.c,v 1.9 2003/08/15 06:32:51 dillon Exp $ */ #include "opt_compat.h" @@ -51,8 +51,8 @@ #include -#include -#include +#include +#include #include "linux_util.h" #ifndef __alpha__ diff --git a/sys/emulation/linux/linux_getcwd.c b/sys/emulation/linux/linux_getcwd.c index 543c48a6b5..be257a8911 100644 --- a/sys/emulation/linux/linux_getcwd.c +++ b/sys/emulation/linux/linux_getcwd.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/compat/linux/linux_getcwd.c,v 1.2.2.3 2001/11/05 19:08:22 marcel Exp $ */ -/* $DragonFly: src/sys/emulation/linux/linux_getcwd.c,v 1.9 2003/08/07 21:17:18 dillon Exp $ */ +/* $DragonFly: src/sys/emulation/linux/linux_getcwd.c,v 1.10 2003/08/15 06:32:51 dillon Exp $ */ /* $OpenBSD: linux_getcwd.c,v 1.2 2001/05/16 12:50:21 ho Exp $ */ /* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */ @@ -56,8 +56,8 @@ #include #include /* XXX only for DIRBLKSIZ */ -#include -#include +#include +#include #include "linux_util.h" static int diff --git a/sys/emulation/linux/linux_ioctl.c b/sys/emulation/linux/linux_ioctl.c index 73a90411e9..1fe773a737 100644 --- a/sys/emulation/linux/linux_ioctl.c +++ b/sys/emulation/linux/linux_ioctl.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.55.2.11 2003/05/01 20:16:09 anholt Exp $ - * $DragonFly: src/sys/emulation/linux/linux_ioctl.c,v 1.8 2003/08/09 20:26:21 drhodus Exp $ + * $DragonFly: src/sys/emulation/linux/linux_ioctl.c,v 1.9 2003/08/15 06:32:51 dillon Exp $ */ #include @@ -54,8 +54,8 @@ #include #include -#include -#include +#include +#include #include "linux_ioctl.h" #include "linux_mib.h" diff --git a/sys/emulation/linux/linux_ipc.c b/sys/emulation/linux/linux_ipc.c index 9b64056695..3493e7e54f 100644 --- a/sys/emulation/linux/linux_ipc.c +++ b/sys/emulation/linux/linux_ipc.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_ipc.c,v 1.17.2.3 2001/11/05 19:08:22 marcel Exp $ - * $DragonFly: src/sys/emulation/linux/linux_ipc.c,v 1.6 2003/08/07 21:17:18 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_ipc.c,v 1.7 2003/08/15 06:32:51 dillon Exp $ */ #include @@ -36,8 +36,8 @@ #include #include -#include -#include +#include +#include #include "linux_ipc.h" #include "linux_util.h" diff --git a/sys/emulation/linux/linux_mib.c b/sys/emulation/linux/linux_mib.c index b3b731ed45..832706299f 100644 --- a/sys/emulation/linux/linux_mib.c +++ b/sys/emulation/linux/linux_mib.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_mib.c,v 1.7.2.2 2001/11/05 19:08:22 marcel Exp $ - * $DragonFly: src/sys/emulation/linux/linux_mib.c,v 1.6 2003/08/07 21:17:18 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_mib.c,v 1.7 2003/08/15 06:32:51 dillon Exp $ */ #include @@ -37,7 +37,7 @@ #include #include -#include +#include #include "linux_mib.h" struct linux_prison { diff --git a/sys/emulation/linux/linux_misc.c b/sys/emulation/linux/linux_misc.c index b631569355..649e0df3e3 100644 --- a/sys/emulation/linux/linux_misc.c +++ b/sys/emulation/linux/linux_misc.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.85.2.9 2002/09/24 08:11:41 mdodd Exp $ - * $DragonFly: src/sys/emulation/linux/linux_misc.c,v 1.12 2003/08/07 21:17:18 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_misc.c,v 1.13 2003/08/15 06:32:51 dillon Exp $ */ #include "opt_compat.h" @@ -74,8 +74,8 @@ #include -#include -#include +#include +#include #include "linux_mib.h" #include "linux_util.h" diff --git a/sys/emulation/linux/linux_signal.c b/sys/emulation/linux/linux_signal.c index 282ba7a9f3..3c19bc25ff 100644 --- a/sys/emulation/linux/linux_signal.c +++ b/sys/emulation/linux/linux_signal.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_signal.c,v 1.23.2.3 2001/11/05 19:08:23 marcel Exp $ - * $DragonFly: src/sys/emulation/linux/linux_signal.c,v 1.6 2003/08/07 21:17:18 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_signal.c,v 1.7 2003/08/15 06:32:51 dillon Exp $ */ #include @@ -36,8 +36,8 @@ #include #include -#include -#include +#include +#include #include "linux_signal.h" #include "linux_util.h" diff --git a/sys/emulation/linux/linux_socket.c b/sys/emulation/linux/linux_socket.c index e05607d0da..4b27f0cb30 100644 --- a/sys/emulation/linux/linux_socket.c +++ b/sys/emulation/linux/linux_socket.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.19.2.8 2001/11/07 20:33:55 marcel Exp $ - * $DragonFly: src/sys/emulation/linux/linux_socket.c,v 1.7 2003/08/07 21:17:18 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_socket.c,v 1.8 2003/08/15 06:32:51 dillon Exp $ */ /* XXX we use functions that might not exist. */ @@ -50,8 +50,8 @@ #include #include -#include -#include +#include +#include #include "linux_socket.h" #include "linux_util.h" diff --git a/sys/emulation/linux/linux_stats.c b/sys/emulation/linux/linux_stats.c index c1cb349bff..308283e3ac 100644 --- a/sys/emulation/linux/linux_stats.c +++ b/sys/emulation/linux/linux_stats.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_stats.c,v 1.22.2.3 2001/11/05 19:08:23 marcel Exp $ - * $DragonFly: src/sys/emulation/linux/linux_stats.c,v 1.6 2003/08/07 21:17:18 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_stats.c,v 1.7 2003/08/15 06:32:51 dillon Exp $ */ #include @@ -45,8 +45,8 @@ #include #include -#include -#include +#include +#include #include "linux_util.h" static int diff --git a/sys/emulation/linux/linux_sysctl.c b/sys/emulation/linux/linux_sysctl.c index 5177ab1025..e65ec16f10 100644 --- a/sys/emulation/linux/linux_sysctl.c +++ b/sys/emulation/linux/linux_sysctl.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_sysctl.c,v 1.2.2.1 2001/10/21 03:57:35 marcel Exp $ - * $DragonFly: src/sys/emulation/linux/linux_sysctl.c,v 1.4 2003/08/07 21:17:18 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_sysctl.c,v 1.5 2003/08/15 06:32:51 dillon Exp $ */ #include "opt_compat.h" @@ -36,8 +36,8 @@ #include #include -#include -#include +#include +#include #include "linux_util.h" #define LINUX_CTL_KERN 1 diff --git a/sys/emulation/linux/linux_uid16.c b/sys/emulation/linux/linux_uid16.c index dc2f8daf48..462e7e8256 100644 --- a/sys/emulation/linux/linux_uid16.c +++ b/sys/emulation/linux/linux_uid16.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_uid16.c,v 1.4.2.1 2001/10/21 03:57:35 marcel Exp $ - * $DragonFly: src/sys/emulation/linux/linux_uid16.c,v 1.7 2003/08/07 21:17:18 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_uid16.c,v 1.8 2003/08/15 06:32:51 dillon Exp $ */ #include "opt_compat.h" @@ -34,8 +34,8 @@ #include #include -#include -#include +#include +#include #include "linux_util.h" DUMMY(setfsuid16); diff --git a/sys/emulation/svr4/Makefile b/sys/emulation/svr4/Makefile index f6fc424907..d7a51187c2 100644 --- a/sys/emulation/svr4/Makefile +++ b/sys/emulation/svr4/Makefile @@ -1,17 +1,64 @@ # Makefile for syscall tables # # $FreeBSD: src/sys/svr4/Makefile,v 1.3 1999/09/01 00:32:18 newton Exp $ -# $DragonFly: src/sys/emulation/svr4/Attic/Makefile,v 1.4 2003/08/07 21:17:19 dillon Exp $ +# $DragonFly: src/sys/emulation/svr4/Attic/Makefile,v 1.5 2003/08/15 06:32:56 dillon Exp $ MAINTAINER= newton@freebsd.org -all: - @echo "make svr4_sysent.c only" +# This regenerates the system calls +# +sysent: ${.CURDIR}/svr4_sysent.c + +${.CURDIR}/svr4_sysent.c ${.CURDIR}/svr4_syscall.h ${.CURDIR}/svr4_proto.h ${.CURDIR}/svr4_union.h: ${.CURDIR}/../../kern/makesyscalls.sh \ + ${.CURDIR}/syscalls.master ${.CURDIR}/syscalls.conf + -mv -f ${.CURDIR}/svr4_sysent.c ${.CURDIR}/svr4_sysent.c.bak + -mv -f ${.CURDIR}/svr4_syscall.h ${.CURDIR}/svr4_syscall.h.bak + -mv -f ${.CURDIR}/svr4_proto.h ${.CURDIR}/svr4_proto.h.bak + -mv -f ${.CURDIR}/svr4_union.h ${.CURDIR}/svr4_union.h.bak + cd ${.CURDIR} && sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf + +# This builds the module +# +MAINTAINER= newton@FreeBSD.org + +.PATH: ${.CURDIR}/../../emulation/svr4/${MACHINE_ARCH} ${.CURDIR}/../../emulation/svr4 +ARCH= arch_svr4 +KMOD= svr4 +SRCS= svr4_sysent.c svr4_sysvec.c opt_compat.h opt_svr4.h opt_vmpage.h \ + vnode_if.h imgact_svr4.c svr4_signal.c svr4_fcntl.c svr4_misc.c \ + svr4_ioctl.c svr4_stat.c svr4_filio.c svr4_ttold.c svr4_termios.c \ + svr4_stream.c svr4_socket.c svr4_sockio.c svr4_machdep.c \ + svr4_resource.c svr4_ipc.c +OBJS= svr4_locore.o +MAN= svr4.8 + +EXPORT_SYMS=_svr4_mod +CLEANFILES= svr4_assym.h svr4_genassym.o + +svr4_assym.h: svr4_genassym.o +.if exists(@) +svr4_assym.h: @/kern/genassym.sh +.endif + sh @/kern/genassym.sh svr4_genassym.o > ${.TARGET} + +svr4_locore.o: svr4_locore.s svr4_assym.h + ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ + ${.IMPSRC} -o ${.TARGET} + +svr4_genassym.o: svr4_genassym.c svr4.h @ machine ${ARCH} + ${CC} -c ${CFLAGS} ${.IMPSRC} + +opt_compat.h: + echo "#define COMPAT_43 1" > opt_compat.h + +opt_svr4.h: + touch opt_svr4.h +.if defined(DEBUG) + echo "#define DEBUG_SVR4 1" >> opt_svr4.h +.endif + +afterinstall: + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${.CURDIR}/svr4.sh ${DESTDIR}/usr/sbin/svr4 -svr4_sysent.c svr4_syscall.h svr4_proto.h svr4_union.h: ../../kern/makesyscalls.sh \ - syscalls.master syscalls.conf - -mv -f svr4_sysent.c svr4_sysent.c.bak - -mv -f svr4_syscall.h svr4_syscall.h.bak - -mv -f svr4_proto.h svr4_proto.h.bak - -mv -f svr4_union.h svr4_union.h.bak - sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf +.include diff --git a/sys/emulation/svr4/svr4_signal.h b/sys/emulation/svr4/svr4_signal.h index 5272c65b63..98a23e964a 100644 --- a/sys/emulation/svr4/svr4_signal.h +++ b/sys/emulation/svr4/svr4_signal.h @@ -26,13 +26,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/svr4/svr4_signal.h,v 1.6.2.1 2001/02/22 05:15:12 marcel Exp $ - * $DragonFly: src/sys/emulation/svr4/Attic/svr4_signal.h,v 1.3 2003/08/07 21:17:19 dillon Exp $ + * $DragonFly: src/sys/emulation/svr4/Attic/svr4_signal.h,v 1.4 2003/08/15 06:32:56 dillon Exp $ */ #ifndef _SVR4_SIGNAL_H_ #define _SVR4_SIGNAL_H_ -#include "i386/svr4_machdep.h" +#include #include "svr4_siginfo.h" #define SVR4_SIGHUP 1 diff --git a/usr.sbin/config/configvers.h b/usr.sbin/config/configvers.h index 91c687cb14..721cdda60d 100644 --- a/usr.sbin/config/configvers.h +++ b/usr.sbin/config/configvers.h @@ -7,6 +7,6 @@ * and system. * * $FreeBSD: src/usr.sbin/config/configvers.h,v 1.19.2.1 2001/12/19 18:09:32 silby Exp $ - * $DragonFly: src/usr.sbin/config/configvers.h,v 1.3 2003/08/07 21:19:25 dillon Exp $ + * $DragonFly: src/usr.sbin/config/configvers.h,v 1.4 2003/08/15 06:32:45 dillon Exp $ */ -#define CONFIGVERS 400020 +#define CONFIGVERS 400021 diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index 9beb644d3e..1efbd2f4f1 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1980, 1993 The Regents of the University of California. All rights reserved. * @(#)main.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.sbin/config/main.c,v 1.37.2.3 2001/06/13 00:25:53 cg Exp $ - * $DragonFly: src/usr.sbin/config/main.c,v 1.3 2003/08/07 21:19:25 dillon Exp $ + * $DragonFly: src/usr.sbin/config/main.c,v 1.4 2003/08/15 06:32:45 dillon Exp $ */ #include @@ -201,17 +201,24 @@ main(argc, argv) (void) mkdir(path("net/i4b/include"), 0755); (void) symlink(xxx, path("net/i4b/include/machine")); } + { - char xxx[MAXPATHLEN]; - if (*srcdir == '\0') - (void)snprintf(xxx, sizeof(xxx), "../../../../emulation/linux/%s", - machinename); - else - (void)snprintf(xxx, sizeof(xxx), "%s/emulation/linux/%s", - srcdir, machinename); - (void) mkdir(path("emulation"), 0755); - (void) mkdir(path("emulation/linux"), 0755); - (void) symlink(xxx, path("emulation/linux/machine")); + static char *ary[] = { "linux", "svr4" }; + char xxx[MAXPATHLEN]; + char yyy[64]; + int i; + + for (i = 0; i < sizeof(ary)/sizeof(ary[0]); ++i) { + if (*srcdir == 0) { + snprintf(xxx, sizeof(xxx), "../../emulation/%s/%s", + ary[i], machinename); + } else { + snprintf(xxx, sizeof(xxx), "%s/emulation/%s/%s", + srcdir, ary[i], machinename); + } + snprintf(yyy, sizeof(yyy), "arch_%s", ary[i]); + symlink(xxx, path(yyy)); + } } options(); /* make options .h files */ -- 2.41.0