#
# nptl: remove duplicate vfork() in libpthread
#

Problem description:    http://lists.uclibc.org/pipermail/uclibc/2014-August/048535.html
Fix taken/adapted from: http://lists.uclibc.org/pipermail/uclibc/2014-September/048597.html

--- libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
+++ libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
@@ -5,7 +5,7 @@
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-libpthread_linux_arch_SSRC = pt-vfork.S
+libpthread_linux_arch_SSRC =
 libpthread_linux_arch_CSRC = pthread_once.c \
 	pt-__syscall_rt_sigaction.c pt-__syscall_error.c \
 	lowlevellock.c
@@ -19,7 +19,6 @@
 CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread
 CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
 CFLAGS-pt-__syscall_error.c =  -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -marm
 
 ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
 CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
--- libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
+++ libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
@@ -5,7 +5,7 @@
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_spin_unlock.S pthread_once.S
+libpthread_linux_arch_SSRC = clone.S pthread_spin_unlock.S pthread_once.S
 libpthread_linux_arch_CSRC = pthread_spin_init.c pt-__syscall_error.c
 
 libc_linux_arch_CSRC = fork.c
@@ -14,7 +14,6 @@
 ASFLAGS += -DUSE___THREAD
 
 CFLAGS-pt-__syscall_error.c =  -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
 ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
 ASFLAGS-lowlevelrobustlock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
 ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
--- libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
+++ libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
@@ -5,7 +5,7 @@
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-libpthread_linux_arch_SSRC = pt-vfork.S clone.S
+libpthread_linux_arch_SSRC = clone.S
 libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_rt_sigaction.c
 
 libc_linux_arch_CSRC = fork.c
@@ -21,7 +21,6 @@
 endif
 CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
 CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread
 
 ASFLAGS-clone.S = -D_LIBC_REENTRANT
 ASFLAGS-vfork.S = -D_LIBC_REENTRANT
--- libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
+++ libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
@@ -5,7 +5,7 @@
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-libpthread_linux_arch_SSRC = pt-vfork.S
+libpthread_linux_arch_SSRC =
 libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_error.c
 
 libc_linux_arch_CSRC = fork.c
@@ -19,7 +19,6 @@
 CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
 CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
 CFLAGS-pt-__syscall_error.c =  -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
 #ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
 
 #ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT
--- libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
+++ libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
@@ -5,7 +5,7 @@
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-libpthread_linux_arch_SSRC = pt-vfork.S pthread_once.S pthread_rwlock_wrlock.S \
+libpthread_linux_arch_SSRC = pthread_once.S pthread_rwlock_wrlock.S \
 			pthread_rwlock_rdlock.S pthread_rwlock_unlock.S \
 			lowlevellock.S lowlevelrobustlock.S pthread_barrier_wait.S \
 			pthread_cond_broadcast.S pthread_cond_signal.S \
@@ -17,7 +17,6 @@
 
 ASFLAGS += -DUSE___THREAD
 
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
 ASFLAGS-pthread_once.S = -D_LIBC_REENTRANT
 ASFLAGS-pthread_rwlock_wrlock.S = -D_LIBC_REENTRANT
 ASFLAGS-pthread_rwlock_rdlock.S = -D_LIBC_REENTRANT
--- libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
+++ libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
@@ -5,7 +5,7 @@
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-libpthread_linux_arch_SSRC = pt-vfork.S clone.S
+libpthread_linux_arch_SSRC = clone.S
 libpthread_linux_arch_CSRC = pthread_once.c lowlevellock.c \
 	pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c \
 	pt-__syscall_error.c
@@ -17,7 +17,6 @@
 
 ASFLAGS += -DUSE___THREAD
 
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
 CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
 CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
 CFLAGS-pt-__syscall_error.c =  -DNOT_IN_libc -DIS_IN_libpthread
--- libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
+++ libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
@@ -5,7 +5,7 @@
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_once.S \
+libpthread_linux_arch_SSRC = clone.S pthread_once.S \
 	lowlevellock.S pthread_barrier_wait.S pthread_cond_signal.S pthread_cond_broadcast.S \
 	sem_post.S sem_timedwait.S lowlevelrobustlock.S \
 	sem_trywait.S sem_wait.S pthread_rwlock_rdlock.S pthread_rwlock_wrlock.S \
@@ -21,7 +21,6 @@
 ASFLAGS += -DUSE___THREAD
 
 CFLAGS-pt-__syscall_error.c =  -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
 ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
 ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
 ASFLAGS-cancellation.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
