Remove dependencies on obsolete __ARCH_WANT_SYSCALL_DEPRECATED system calls.

(aarch64 kernels don't have these system calls.)

Change-Id: I6f64075aa412f71520f2df71c3d69b647f91c1ca
diff --git a/libc/arch-x86/syscalls.mk b/libc/arch-x86/syscalls.mk
index 471dbb9..3b8586b 100644
--- a/libc/arch-x86/syscalls.mk
+++ b/libc/arch-x86/syscalls.mk
@@ -1,9 +1,10 @@
 # Generated by gensyscalls.py. Do not edit.
 syscall_src :=
 syscall_src += arch-x86/syscalls/__brk.S
+syscall_src += arch-x86/syscalls/__clone.S
+syscall_src += arch-x86/syscalls/__epoll_pwait.S
 syscall_src += arch-x86/syscalls/__fcntl.S
 syscall_src += arch-x86/syscalls/__fcntl64.S
-syscall_src += arch-x86/syscalls/__fork.S
 syscall_src += arch-x86/syscalls/__fstatfs64.S
 syscall_src += arch-x86/syscalls/__getcpu.S
 syscall_src += arch-x86/syscalls/__getcwd.S
@@ -11,8 +12,9 @@
 syscall_src += arch-x86/syscalls/__ioctl.S
 syscall_src += arch-x86/syscalls/__llseek.S
 syscall_src += arch-x86/syscalls/__mmap2.S
-syscall_src += arch-x86/syscalls/__open.S
 syscall_src += arch-x86/syscalls/__openat.S
+syscall_src += arch-x86/syscalls/__ppoll.S
+syscall_src += arch-x86/syscalls/__pselect6.S
 syscall_src += arch-x86/syscalls/__ptrace.S
 syscall_src += arch-x86/syscalls/__reboot.S
 syscall_src += arch-x86/syscalls/__rt_sigaction.S
@@ -24,7 +26,6 @@
 syscall_src += arch-x86/syscalls/__set_thread_area.S
 syscall_src += arch-x86/syscalls/__sigaction.S
 syscall_src += arch-x86/syscalls/__statfs64.S
-syscall_src += arch-x86/syscalls/__sys_clone.S
 syscall_src += arch-x86/syscalls/__syslog.S
 syscall_src += arch-x86/syscalls/__timer_create.S
 syscall_src += arch-x86/syscalls/__timer_delete.S
@@ -34,7 +35,6 @@
 syscall_src += arch-x86/syscalls/__waitid.S
 syscall_src += arch-x86/syscalls/_exit.S
 syscall_src += arch-x86/syscalls/_exit_thread.S
-syscall_src += arch-x86/syscalls/_waitpid.S
 syscall_src += arch-x86/syscalls/accept.S
 syscall_src += arch-x86/syscalls/acct.S
 syscall_src += arch-x86/syscalls/bind.S
@@ -53,7 +53,6 @@
 syscall_src += arch-x86/syscalls/dup3.S
 syscall_src += arch-x86/syscalls/epoll_create1.S
 syscall_src += arch-x86/syscalls/epoll_ctl.S
-syscall_src += arch-x86/syscalls/epoll_wait.S
 syscall_src += arch-x86/syscalls/eventfd.S
 syscall_src += arch-x86/syscalls/execve.S
 syscall_src += arch-x86/syscalls/faccessat.S
@@ -125,11 +124,9 @@
 syscall_src += arch-x86/syscalls/munlockall.S
 syscall_src += arch-x86/syscalls/munmap.S
 syscall_src += arch-x86/syscalls/nanosleep.S
-syscall_src += arch-x86/syscalls/pause.S
 syscall_src += arch-x86/syscalls/perf_event_open.S
 syscall_src += arch-x86/syscalls/personality.S
 syscall_src += arch-x86/syscalls/pipe2.S
-syscall_src += arch-x86/syscalls/poll.S
 syscall_src += arch-x86/syscalls/prctl.S
 syscall_src += arch-x86/syscalls/pread64.S
 syscall_src += arch-x86/syscalls/pwrite64.S
@@ -150,7 +147,6 @@
 syscall_src += arch-x86/syscalls/sched_setparam.S
 syscall_src += arch-x86/syscalls/sched_setscheduler.S
 syscall_src += arch-x86/syscalls/sched_yield.S
-syscall_src += arch-x86/syscalls/select.S
 syscall_src += arch-x86/syscalls/sendfile.S
 syscall_src += arch-x86/syscalls/sendfile64.S
 syscall_src += arch-x86/syscalls/sendmsg.S
diff --git a/libc/arch-x86/syscalls/__sys_clone.S b/libc/arch-x86/syscalls/__clone.S
similarity index 94%
rename from libc/arch-x86/syscalls/__sys_clone.S
rename to libc/arch-x86/syscalls/__clone.S
index 3080a87..c2e8ed8 100644
--- a/libc/arch-x86/syscalls/__sys_clone.S
+++ b/libc/arch-x86/syscalls/__clone.S
@@ -4,7 +4,7 @@
 #include <linux/err.h>
 #include <machine/asm.h>
 
-ENTRY(__sys_clone)
+ENTRY(__clone)
     pushl   %ebx
     pushl   %ecx
     pushl   %edx
@@ -31,4 +31,4 @@
     popl    %ecx
     popl    %ebx
     ret
-END(__sys_clone)
+END(__clone)
diff --git a/libc/arch-x86/syscalls/__sys_clone.S b/libc/arch-x86/syscalls/__epoll_pwait.S
similarity index 63%
copy from libc/arch-x86/syscalls/__sys_clone.S
copy to libc/arch-x86/syscalls/__epoll_pwait.S
index 3080a87..9dc07f6 100644
--- a/libc/arch-x86/syscalls/__sys_clone.S
+++ b/libc/arch-x86/syscalls/__epoll_pwait.S
@@ -4,18 +4,20 @@
 #include <linux/err.h>
 #include <machine/asm.h>
 
-ENTRY(__sys_clone)
+ENTRY(__epoll_pwait)
     pushl   %ebx
     pushl   %ecx
     pushl   %edx
     pushl   %esi
     pushl   %edi
-    mov     24(%esp), %ebx
-    mov     28(%esp), %ecx
-    mov     32(%esp), %edx
-    mov     36(%esp), %esi
-    mov     40(%esp), %edi
-    movl    $__NR_clone, %eax
+    pushl   %ebp
+    mov     28(%esp), %ebx
+    mov     32(%esp), %ecx
+    mov     36(%esp), %edx
+    mov     40(%esp), %esi
+    mov     44(%esp), %edi
+    mov     48(%esp), %ebp
+    movl    $__NR_epoll_pwait, %eax
     int     $0x80
     cmpl    $-MAX_ERRNO, %eax
     jb      1f
@@ -25,10 +27,11 @@
     addl    $4, %esp
     orl     $-1, %eax
 1:
+    popl    %ebp
     popl    %edi
     popl    %esi
     popl    %edx
     popl    %ecx
     popl    %ebx
     ret
-END(__sys_clone)
+END(__epoll_pwait)
diff --git a/libc/arch-x86/syscalls/__fork.S b/libc/arch-x86/syscalls/__fork.S
deleted file mode 100644
index af737c7..0000000
--- a/libc/arch-x86/syscalls/__fork.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Generated by gensyscalls.py. Do not edit. */
-
-#include <asm/unistd.h>
-#include <linux/err.h>
-#include <machine/asm.h>
-
-ENTRY(__fork)
-    pushl   %ebx
-    mov     8(%esp), %ebx
-    movl    $__NR_fork, %eax
-    int     $0x80
-    cmpl    $-MAX_ERRNO, %eax
-    jb      1f
-    negl    %eax
-    pushl   %eax
-    call    __set_errno
-    addl    $4, %esp
-    orl     $-1, %eax
-1:
-    popl    %ebx
-    ret
-END(__fork)
diff --git a/libc/arch-x86/syscalls/__open.S b/libc/arch-x86/syscalls/__open.S
deleted file mode 100644
index be286d2..0000000
--- a/libc/arch-x86/syscalls/__open.S
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Generated by gensyscalls.py. Do not edit. */
-
-#include <asm/unistd.h>
-#include <linux/err.h>
-#include <machine/asm.h>
-
-ENTRY(__open)
-    pushl   %ebx
-    pushl   %ecx
-    pushl   %edx
-    mov     16(%esp), %ebx
-    mov     20(%esp), %ecx
-    mov     24(%esp), %edx
-    movl    $__NR_open, %eax
-    int     $0x80
-    cmpl    $-MAX_ERRNO, %eax
-    jb      1f
-    negl    %eax
-    pushl   %eax
-    call    __set_errno
-    addl    $4, %esp
-    orl     $-1, %eax
-1:
-    popl    %edx
-    popl    %ecx
-    popl    %ebx
-    ret
-END(__open)
diff --git a/libc/arch-x86/syscalls/select.S b/libc/arch-x86/syscalls/__ppoll.S
similarity index 90%
rename from libc/arch-x86/syscalls/select.S
rename to libc/arch-x86/syscalls/__ppoll.S
index a67ffa5..6445fb5 100644
--- a/libc/arch-x86/syscalls/select.S
+++ b/libc/arch-x86/syscalls/__ppoll.S
@@ -4,7 +4,7 @@
 #include <linux/err.h>
 #include <machine/asm.h>
 
-ENTRY(select)
+ENTRY(__ppoll)
     pushl   %ebx
     pushl   %ecx
     pushl   %edx
@@ -15,7 +15,7 @@
     mov     32(%esp), %edx
     mov     36(%esp), %esi
     mov     40(%esp), %edi
-    movl    $__NR__newselect, %eax
+    movl    $__NR_ppoll, %eax
     int     $0x80
     cmpl    $-MAX_ERRNO, %eax
     jb      1f
@@ -31,4 +31,4 @@
     popl    %ecx
     popl    %ebx
     ret
-END(select)
+END(__ppoll)
diff --git a/libc/arch-x86/syscalls/__sys_clone.S b/libc/arch-x86/syscalls/__pselect6.S
similarity index 63%
copy from libc/arch-x86/syscalls/__sys_clone.S
copy to libc/arch-x86/syscalls/__pselect6.S
index 3080a87..8faa2da 100644
--- a/libc/arch-x86/syscalls/__sys_clone.S
+++ b/libc/arch-x86/syscalls/__pselect6.S
@@ -4,18 +4,20 @@
 #include <linux/err.h>
 #include <machine/asm.h>
 
-ENTRY(__sys_clone)
+ENTRY(__pselect6)
     pushl   %ebx
     pushl   %ecx
     pushl   %edx
     pushl   %esi
     pushl   %edi
-    mov     24(%esp), %ebx
-    mov     28(%esp), %ecx
-    mov     32(%esp), %edx
-    mov     36(%esp), %esi
-    mov     40(%esp), %edi
-    movl    $__NR_clone, %eax
+    pushl   %ebp
+    mov     28(%esp), %ebx
+    mov     32(%esp), %ecx
+    mov     36(%esp), %edx
+    mov     40(%esp), %esi
+    mov     44(%esp), %edi
+    mov     48(%esp), %ebp
+    movl    $__NR_pselect6, %eax
     int     $0x80
     cmpl    $-MAX_ERRNO, %eax
     jb      1f
@@ -25,10 +27,11 @@
     addl    $4, %esp
     orl     $-1, %eax
 1:
+    popl    %ebp
     popl    %edi
     popl    %esi
     popl    %edx
     popl    %ecx
     popl    %ebx
     ret
-END(__sys_clone)
+END(__pselect6)
diff --git a/libc/arch-x86/syscalls/_waitpid.S b/libc/arch-x86/syscalls/_waitpid.S
deleted file mode 100644
index b83b986..0000000
--- a/libc/arch-x86/syscalls/_waitpid.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Generated by gensyscalls.py. Do not edit. */
-
-#include <asm/unistd.h>
-#include <linux/err.h>
-#include <machine/asm.h>
-
-ENTRY(_waitpid)
-    pushl   %ebx
-    pushl   %ecx
-    pushl   %edx
-    pushl   %esi
-    mov     20(%esp), %ebx
-    mov     24(%esp), %ecx
-    mov     28(%esp), %edx
-    mov     32(%esp), %esi
-    movl    $__NR_waitpid, %eax
-    int     $0x80
-    cmpl    $-MAX_ERRNO, %eax
-    jb      1f
-    negl    %eax
-    pushl   %eax
-    call    __set_errno
-    addl    $4, %esp
-    orl     $-1, %eax
-1:
-    popl    %esi
-    popl    %edx
-    popl    %ecx
-    popl    %ebx
-    ret
-END(_waitpid)
diff --git a/libc/arch-x86/syscalls/epoll_wait.S b/libc/arch-x86/syscalls/epoll_wait.S
deleted file mode 100644
index e0c7a6d..0000000
--- a/libc/arch-x86/syscalls/epoll_wait.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Generated by gensyscalls.py. Do not edit. */
-
-#include <asm/unistd.h>
-#include <linux/err.h>
-#include <machine/asm.h>
-
-ENTRY(epoll_wait)
-    pushl   %ebx
-    pushl   %ecx
-    pushl   %edx
-    pushl   %esi
-    mov     20(%esp), %ebx
-    mov     24(%esp), %ecx
-    mov     28(%esp), %edx
-    mov     32(%esp), %esi
-    movl    $__NR_epoll_wait, %eax
-    int     $0x80
-    cmpl    $-MAX_ERRNO, %eax
-    jb      1f
-    negl    %eax
-    pushl   %eax
-    call    __set_errno
-    addl    $4, %esp
-    orl     $-1, %eax
-1:
-    popl    %esi
-    popl    %edx
-    popl    %ecx
-    popl    %ebx
-    ret
-END(epoll_wait)
diff --git a/libc/arch-x86/syscalls/pause.S b/libc/arch-x86/syscalls/pause.S
deleted file mode 100644
index 3ce05d5..0000000
--- a/libc/arch-x86/syscalls/pause.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Generated by gensyscalls.py. Do not edit. */
-
-#include <asm/unistd.h>
-#include <linux/err.h>
-#include <machine/asm.h>
-
-ENTRY(pause)
-    movl    $__NR_pause, %eax
-    int     $0x80
-    cmpl    $-MAX_ERRNO, %eax
-    jb      1f
-    negl    %eax
-    pushl   %eax
-    call    __set_errno
-    addl    $4, %esp
-    orl     $-1, %eax
-1:
-    ret
-END(pause)
diff --git a/libc/arch-x86/syscalls/poll.S b/libc/arch-x86/syscalls/poll.S
deleted file mode 100644
index 273062a..0000000
--- a/libc/arch-x86/syscalls/poll.S
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Generated by gensyscalls.py. Do not edit. */
-
-#include <asm/unistd.h>
-#include <linux/err.h>
-#include <machine/asm.h>
-
-ENTRY(poll)
-    pushl   %ebx
-    pushl   %ecx
-    pushl   %edx
-    mov     16(%esp), %ebx
-    mov     20(%esp), %ecx
-    mov     24(%esp), %edx
-    movl    $__NR_poll, %eax
-    int     $0x80
-    cmpl    $-MAX_ERRNO, %eax
-    jb      1f
-    negl    %eax
-    pushl   %eax
-    call    __set_errno
-    addl    $4, %esp
-    orl     $-1, %eax
-1:
-    popl    %edx
-    popl    %ecx
-    popl    %ebx
-    ret
-END(poll)