summaryrefslogtreecommitdiffstats
path: root/sys/kern/makesyscalls.sh
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-03-09 04:00:42 +0000
committerjb <jb@FreeBSD.org>1998-03-09 04:00:42 +0000
commita069106ffcd11db830b1511afbb11a6837a466c6 (patch)
tree516793f9c1ed3c7e00c7add003a23b15850978b1 /sys/kern/makesyscalls.sh
parentdce663f91f6d7aa725ddf7fae3a9b637cd7d9dd4 (diff)
downloadFreeBSD-src-a069106ffcd11db830b1511afbb11a6837a466c6.zip
FreeBSD-src-a069106ffcd11db830b1511afbb11a6837a466c6.tar.gz
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
Diffstat (limited to 'sys/kern/makesyscalls.sh')
-rw-r--r--sys/kern/makesyscalls.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh
index 190cc81..9f5339b 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++
OpenPOWER on IntegriCloud