about summary refs log tree commit diff
path: root/sysdeps/unix/make-syscalls.sh
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-08-23 17:43:21 -0700
committerRoland McGrath <roland@redhat.com>2009-08-24 11:40:15 -0700
commit036e46b655557f9a17784e502f694a80abfd68dc (patch)
tree13d443cd242f9e7a26465894b8d0d24442cfd0e1 /sysdeps/unix/make-syscalls.sh
parent7b943af6cf2bfd4b94be271877a10128c32d03da (diff)
downloadglibc-036e46b655557f9a17784e502f694a80abfd68dc.tar.gz
glibc-036e46b655557f9a17784e502f694a80abfd68dc.tar.xz
glibc-036e46b655557f9a17784e502f694a80abfd68dc.zip
Add sysdeps/unix/syscall-template.S; build syscall stubs with deps and -g pointing to it.
Diffstat (limited to 'sysdeps/unix/make-syscalls.sh')
-rw-r--r--sysdeps/unix/make-syscalls.sh33
1 files changed, 20 insertions, 13 deletions
diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh
index 8abb0349bf..a8b8a262a7 100644
--- a/sysdeps/unix/make-syscalls.sh
+++ b/sysdeps/unix/make-syscalls.sh
@@ -83,12 +83,13 @@ while read file srcfile caller syscall args strong weak; do
   ;;
   esac
 
-  cancellable=
-  noerrno=
+  cancellable=0
+  noerrno=0
+  errval=0
   case $args in
-  C*) cancellable=-cancel; args=`echo $args | sed 's/C:\?//'`;;
-  E*) noerrno=_NOERRNO; args=`echo $args | sed 's/E:\?//'`;;
-  V*) noerrno=_ERRVAL; args=`echo $args | sed 's/V:\?//'`;;
+  C*) cancellable=1; args=`echo $args | sed 's/C:\?//'`;;
+  E*) noerrno=1; args=`echo $args | sed 's/E:\?//'`;;
+  V*) errval=1; args=`echo $args | sed 's/V:\?//'`;;
   esac
 
   # Derive the number of arguments from the argument signature
@@ -115,7 +116,7 @@ while read file srcfile caller syscall args strong weak; do
  x--)
   # Undefined callnum for an extra syscall.
   if [ x$caller != x- ]; then
-    if [ x$noerrno != x ]; then
+    if [ $noerrno != 0 ]; then
       echo >&2 "$0: no number for $fileno, no-error syscall ($strong $weak)"
       exit 2
     fi
@@ -151,7 +152,7 @@ shared-only-routines += $file
     ;;
   esac
 
-  echo "		\$(common-objpfx)s-proto$cancellable.d"
+  echo "		\$(..)sysdeps/unix/make-syscalls.sh"
   case x"$callnum" in
   x_)
   echo "\
@@ -161,11 +162,17 @@ shared-only-routines += $file
   x*)
   echo "\
 	\$(make-target-directory)
-	(echo '#include <sysdep$cancellable.h>'; \\
-	 echo 'PSEUDO$noerrno ($strong, $syscall, $nargs)'; \\
-	 echo '	ret$noerrno'; \\
-	 echo 'PSEUDO_END$noerrno($strong)'; \\
-	 echo 'libc_hidden_def ($strong)'; \\"
+	(echo '#define SYSCALL_NAME $syscall'; \\
+	 echo '#define SYSCALL_NARGS $nargs'; \\
+	 echo '#define SYSCALL_SYMBOL $strong'; \\"
+  [ $cancellable = 0 ] || echo "\
+	 echo '#define SYSCALL_CANCELLABLE 1'; \\"
+  [ $noerrno = 0 ] || echo "\
+	 echo '#define SYSCALL_NOERRNO 1'; \\"
+  [ $errval = 0 ] || echo "\
+	 echo '#define SYSCALL_ERRVAL 1'; \\"
+  echo "\
+	 echo '#include <syscall-template.S>'; \\"
   ;;
   esac
 
@@ -201,7 +208,7 @@ shared-only-routines += $file
 	  vcount=`expr $vcount + 1`
 	  echo "	 echo 'strong_alias ($strong, $source)'; \\"
 	fi
-	echo "	 echo 'symbol_version($source, $base, $ver)'; \\"
+	echo "	 echo 'symbol_version ($source, $base, $ver)'; \\"
 	;;
       !*)
 	name=`echo $name | sed 's/.//'`