From cbe0799aafcac09fdb4c174dfa24b8c8889f32ce Mon Sep 17 00:00:00 2001 From: John Birrell Date: Mon, 9 Mar 1998 04:00:42 +0000 Subject: [PATCH] Add statements to generate a sys/syscall.mk file for inclusion during the libc/libc_r to automatically pick up syscall names on the assumption that default asm code needs to generated for them. In the up-coming changes to the libc makefiles, there is the option to provide a machine dependent asm source file which will turn off the automatic generation of the default. There is also an option to just stop code being generated for a syscall. In most cases, though, the default asm code is all that is required, so this change makes that the most convenient was to do business. Idea suggested by: bde --- sys/kern/makesyscalls.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh index 190cc81af2e2..9f5339b0e595 100644 --- a/sys/kern/makesyscalls.sh +++ b/sys/kern/makesyscalls.sh @@ -1,6 +1,6 @@ #! /bin/sh - # @(#)makesyscalls.sh 8.1 (Berkeley) 6/10/93 -# $Id: makesyscalls.sh,v 1.29 1997/12/16 18:51:45 eivind Exp $ +# $Id: makesyscalls.sh,v 1.30 1998/02/03 17:39:13 bde Exp $ set -e @@ -12,6 +12,7 @@ sysnames="syscalls.c" sysproto="../sys/sysproto.h" sysproto_h=_SYS_SYSPROTO_H_ syshdr="../sys/syscall.h" +sysmk="../sys/syscall.mk" syssw="init_sysent.c" syshide="../sys/syscall-hide.h" syscallprefix="SYS_" @@ -64,6 +65,7 @@ s/\$//g sysarg = \"$sysarg\" sysnames = \"$sysnames\" syshdr = \"$syshdr\" + sysmk = \"$sysmk\" compat = \"$compat\" syshide = \"$syshide\" syscallprefix = \"$syscallprefix\" @@ -85,6 +87,8 @@ s/\$//g printf "/*\n * System call numbers.\n *\n" > syshdr printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr + printf "# FreeBSD system call names.\n" > sysmk + printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk printf "/*\n * System call hiders.\n *\n" > syshide printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshide } @@ -114,6 +118,8 @@ s/\$//g printf " * created from%s\n */\n\n", $0 > syshdr + printf "# created from%s\nMIASM = ", $0 > sysmk + printf " * created from%s\n */\n\n", $0 > syshide next } @@ -286,9 +292,11 @@ s/\$//g } printf("\t\"%s\",\t\t\t/* %d = %s */\n", \ funcalias, syscall, funcalias) > sysnames - if ($2 != "NODEF") + if ($2 != "NODEF") { printf("#define\t%s%s\t%d\n", syscallprefix, \ funcalias, syscall) > syshdr + printf(" \\\n\t%s.o", funcalias) > sysmk + } if ($3 != "NOHIDE") printf("HIDE_%s(%s)\n", $3, funcname) > syshide syscall++ @@ -328,6 +336,7 @@ s/\$//g funcalias, syscall, funcalias) > sysnames printf("#define\t%s%s\t%d\t/* compatibility; still used by libc */\n", \ syscallprefix, funcalias, syscall) > syshdr + printf(" \\\n\t%s.o", funcalias) > sysmk if ($3 != "NOHIDE") printf("HIDE_%s(%s)\n", $3, funcname) > syshide syscall++