diff options
author | Austin Foxley <austinf@cetoncorp.com> | 2009-12-11 03:46:37 -0800 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-12-11 03:46:37 -0800 |
commit | 1c4f98663635995919a2fe7f9c4cbf630ae238d2 (patch) | |
tree | b58c370583a937739249ca21a0fe64e5be8761db /libc | |
parent | 5ea195692d4e18c3fe317bcc4428777d8adab3a3 (diff) |
get x86_64 nptl building
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc')
-rw-r--r-- | libc/misc/sysvipc/msgq.c | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/x86_64/Makefile.arch | 12 | ||||
-rw-r--r-- | libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/x86_64/vfork.S | 12 |
4 files changed, 22 insertions, 6 deletions
diff --git a/libc/misc/sysvipc/msgq.c b/libc/misc/sysvipc/msgq.c index e20e3ca64..27eb1ff92 100644 --- a/libc/misc/sysvipc/msgq.c +++ b/libc/misc/sysvipc/msgq.c @@ -65,7 +65,7 @@ static inline ssize_t do_msgrcv (int msqid, void *msgp, size_t msgsz, return __syscall_ipc(IPCOP_msgrcv ,msqid ,msgsz ,msgflg ,&temp, 0); #endif } -int msgrcv (int msqid, void *msgp, size_t msgsz, +ssize_t msgrcv (int msqid, void *msgp, size_t msgsz, long int msgtyp, int msgflg) { if (SINGLE_THREAD_P) diff --git a/libc/sysdeps/linux/x86_64/Makefile.arch b/libc/sysdeps/linux/x86_64/Makefile.arch index 044f97f95..de7ce7285 100644 --- a/libc/sysdeps/linux/x86_64/Makefile.arch +++ b/libc/sysdeps/linux/x86_64/Makefile.arch @@ -5,7 +5,15 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -CSRC := brk.c sigaction.c __syscall_error.c mmap.c +CSRC := brk.c __syscall_error.c mmap.c + +ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y) +CSRC += sigaction.c +endif SSRC := \ - __longjmp.S vfork.S setjmp.S syscall.S bsd-setjmp.S bsd-_setjmp.S clone.S + __longjmp.S setjmp.S syscall.S bsd-setjmp.S bsd-_setjmp.S + +ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y) +SSRC += vfork.S clone.S +endif diff --git a/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h b/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h index 748e544bb..1d966aee4 100644 --- a/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h @@ -36,7 +36,7 @@ #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__ /* define if target supports CFI pseudo ops */ -#undef __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__ +#define __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__ /* define if target supports IEEE signed zero floats */ #define __UCLIBC_HAVE_SIGNED_ZERO__ diff --git a/libc/sysdeps/linux/x86_64/vfork.S b/libc/sysdeps/linux/x86_64/vfork.S index 2dadbbfe0..97c9c5b67 100644 --- a/libc/sysdeps/linux/x86_64/vfork.S +++ b/libc/sysdeps/linux/x86_64/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002, 2004, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -31,7 +31,7 @@ .text .global __vfork .hidden __vfork -.type __vfork,%function +.type __vfork,%function __vfork: @@ -39,6 +39,10 @@ __vfork: is preserved by the syscall and that we're allowed to destroy. */ popq %rdi +#ifdef SAVE_PID + SAVE_PID +#endif + /* Stuff the syscall number in RAX and enter into the kernel. */ movl $__NR_vfork, %eax syscall @@ -46,6 +50,10 @@ __vfork: /* Push back the return PC. */ pushq %rdi +#ifdef RESTORE_PID + RESTORE_PID +#endif + cmpl $-4095, %eax jae __syscall_error /* Branch forward if it failed. */ |