diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-06 16:21:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-06 16:21:57 -0400 |
commit | 15700770ef7c5d12e2f1659d2ddbeb3f658d9f37 (patch) | |
tree | 7fa2f81c33c9efcb1a1568385beead75c5892cfb /scripts/checksyscalls.sh | |
parent | 6de410c2b0cc055ae9ee640c84331f6a70878d9b (diff) | |
parent | 11de39e2fbbc592018e0a231d0ee773653dcc8d6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (38 commits)
kconfig: fix mconf segmentation fault
kbuild: enable use of code from a different dir
kconfig: error out if recursive dependencies are found
kbuild: scripts/basic/fixdep segfault on pathological string-o-death
kconfig: correct minor typo in Kconfig warning message.
kconfig: fix path to modules.txt in Kconfig help
usr/Kconfig: fix typo
kernel-doc: alphabetically-sorted entries in index.html of 'htmldocs'
kbuild: be more explicit on missing .config file
kbuild: clarify the creation of the LOCALVERSION_AUTO string.
kbuild: propagate errors from find in scripts/gen_initramfs_list.sh
kconfig: refer to qt3 if we cannot find qt libraries
kbuild: handle compressed cpio initramfs-es
kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
kbuild: remove stale comment in modpost.c
kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE
kbuild: fix make mrproper for Documentation/DocBook/man
kbuild: remove kconfig binaries during make mrproper
kconfig/menuconfig: do not hardcode '.config'
kbuild: override build timestamp & version
...
Diffstat (limited to 'scripts/checksyscalls.sh')
-rwxr-xr-x | scripts/checksyscalls.sh | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh new file mode 100755 index 000000000000..f98171f5a3df --- /dev/null +++ b/scripts/checksyscalls.sh | |||
@@ -0,0 +1,118 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Check if current architecture are missing any function calls compared | ||
4 | # to i386. | ||
5 | # i386 define a number of legacy system calls that are i386 specific | ||
6 | # and listed below so they are ignored. | ||
7 | # | ||
8 | # Usage: | ||
9 | # syscallchk gcc gcc-options | ||
10 | # | ||
11 | |||
12 | ignore_list() { | ||
13 | cat << EOF | ||
14 | #include <asm/types.h> | ||
15 | #include <asm/unistd.h> | ||
16 | |||
17 | /* System calls for 32-bit kernels only */ | ||
18 | #if BITS_PER_LONG == 64 | ||
19 | #define __IGNORE_sendfile64 | ||
20 | #define __IGNORE_ftruncate64 | ||
21 | #define __IGNORE_truncate64 | ||
22 | #define __IGNORE_stat64 | ||
23 | #define __IGNORE_lstat64 | ||
24 | #define __IGNORE_fstat64 | ||
25 | #define __IGNORE_fcntl64 | ||
26 | #define __IGNORE_fadvise64_64 | ||
27 | #define __IGNORE_fstatat64 | ||
28 | #define __IGNORE_fstatfs64 | ||
29 | #define __IGNORE_statfs64 | ||
30 | #endif | ||
31 | |||
32 | /* i386-specific or historical system calls */ | ||
33 | #define __IGNORE_break | ||
34 | #define __IGNORE_stty | ||
35 | #define __IGNORE_gtty | ||
36 | #define __IGNORE_ftime | ||
37 | #define __IGNORE_prof | ||
38 | #define __IGNORE_lock | ||
39 | #define __IGNORE_mpx | ||
40 | #define __IGNORE_ulimit | ||
41 | #define __IGNORE_profil | ||
42 | #define __IGNORE_ioperm | ||
43 | #define __IGNORE_iopl | ||
44 | #define __IGNORE_idle | ||
45 | #define __IGNORE_modify_ldt | ||
46 | #define __IGNORE_ugetrlimit | ||
47 | #define __IGNORE_mmap2 | ||
48 | #define __IGNORE_vm86 | ||
49 | #define __IGNORE_vm86old | ||
50 | #define __IGNORE_set_thread_area | ||
51 | #define __IGNORE_get_thread_area | ||
52 | #define __IGNORE_madvise1 | ||
53 | #define __IGNORE_oldstat | ||
54 | #define __IGNORE_oldfstat | ||
55 | #define __IGNORE_oldlstat | ||
56 | #define __IGNORE_oldolduname | ||
57 | #define __IGNORE_olduname | ||
58 | #define __IGNORE_umount2 | ||
59 | #define __IGNORE_umount | ||
60 | #define __IGNORE_waitpid | ||
61 | #define __IGNORE_stime | ||
62 | #define __IGNORE_nice | ||
63 | #define __IGNORE_signal | ||
64 | #define __IGNORE_sigaction | ||
65 | #define __IGNORE_sgetmask | ||
66 | #define __IGNORE_sigsuspend | ||
67 | #define __IGNORE_sigpending | ||
68 | #define __IGNORE_ssetmask | ||
69 | #define __IGNORE_readdir | ||
70 | #define __IGNORE_socketcall | ||
71 | #define __IGNORE_ipc | ||
72 | #define __IGNORE_sigreturn | ||
73 | #define __IGNORE_sigprocmask | ||
74 | #define __IGNORE_bdflush | ||
75 | #define __IGNORE__llseek | ||
76 | #define __IGNORE__newselect | ||
77 | #define __IGNORE_create_module | ||
78 | #define __IGNORE_delete_module | ||
79 | #define __IGNORE_query_module | ||
80 | #define __IGNORE_get_kernel_syms | ||
81 | /* ... including the "new" 32-bit uid syscalls */ | ||
82 | #define __IGNORE_lchown32 | ||
83 | #define __IGNORE_getuid32 | ||
84 | #define __IGNORE_getgid32 | ||
85 | #define __IGNORE_geteuid32 | ||
86 | #define __IGNORE_getegid32 | ||
87 | #define __IGNORE_setreuid32 | ||
88 | #define __IGNORE_setregid32 | ||
89 | #define __IGNORE_getgroups32 | ||
90 | #define __IGNORE_setgroups32 | ||
91 | #define __IGNORE_fchown32 | ||
92 | #define __IGNORE_setresuid32 | ||
93 | #define __IGNORE_getresuid32 | ||
94 | #define __IGNORE_setresgid32 | ||
95 | #define __IGNORE_getresgid32 | ||
96 | #define __IGNORE_chown32 | ||
97 | #define __IGNORE_setuid32 | ||
98 | #define __IGNORE_setgid32 | ||
99 | #define __IGNORE_setfsuid32 | ||
100 | #define __IGNORE_setfsgid32 | ||
101 | |||
102 | /* Unmerged syscalls for AFS, STREAMS, etc. */ | ||
103 | #define __IGNORE_afs_syscall | ||
104 | #define __IGNORE_getpmsg | ||
105 | #define __IGNORE_putpmsg | ||
106 | #define __IGNORE_vserver | ||
107 | EOF | ||
108 | } | ||
109 | |||
110 | syscall_list() { | ||
111 | sed -n -e '/^\#define/ { s/[^_]*__NR_\([^[:space:]]*\).*/\ | ||
112 | \#if !defined \(__NR_\1\) \&\& !defined \(__IGNORE_\1\)\ | ||
113 | \#warning syscall \1 not implemented\ | ||
114 | \#endif/p }' $1 | ||
115 | } | ||
116 | |||
117 | (ignore_list && syscall_list ${srctree}/include/asm-i386/unistd.h) | \ | ||
118 | $* -E -x c - > /dev/null | ||