Jelajahi Sumber

fix multiple definitions of pthread_once for x86_64

also add a missing weak for clone

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Austin Foxley 15 tahun lalu
induk
melakukan
ae030fbef4

+ 1 - 0
libc/sysdeps/linux/x86_64/clone.S

@@ -112,3 +112,4 @@ clone:
 	call	HIDDEN_JUMPTARGET(_exit)
 
 .size clone,.-clone
+weak_alias(clone, __clone)

+ 0 - 4
libpthread/nptl/sysdeps/pthread/Makefile.in

@@ -43,10 +43,6 @@ SH_PTHREAD_EXCLUDE_LIST = pthread_spin_unlock.c pthread_spin_init.c \
 libpthread_CSRC := $(filter-out $(SH_PTHREAD_EXCLUDE_LIST),$(libpthread_CSRC))
 endif
 
-ifeq ($(TARGET_ARCH),x86_64)
-libpthread_CSRC += pthread_once.c
-endif
-
 
 CFLAGS-pt-common = -DNOT_IN_libc=1 $(SSP_ALL_CFLAGS)
 

+ 2 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S

@@ -17,6 +17,8 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <sysdep.h>
+
 #ifndef UP
 # define LOCK lock
 #else