diff options
author | Khem Raj <raj.khem@gmail.com> | 2010-05-19 15:59:50 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2010-05-19 15:59:50 -0700 |
commit | e029f5e73de2c195d0a87e5816f28fb09594e80f (patch) | |
tree | cc216c1fef966a29b349cb92edb597b66b2aef5b | |
parent | be6735eb6ba46d1a21a421acdac26be8ec213062 (diff) |
mips: Add vfork to libc
* When using NPTL get clone.o from nptl.
* Only use vfork if syscall is there.
* Add libc_a_SSRC to LINUX_LIBC_ARCH_OBJ.
* Use CLEAN_* for clean target.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | libc/sysdeps/linux/mips/Makefile.arch | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/vfork.S | 7 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch | 13 |
3 files changed, 18 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/mips/Makefile.arch b/libc/sysdeps/linux/mips/Makefile.arch index 73e64991c..e8925e438 100644 --- a/libc/sysdeps/linux/mips/Makefile.arch +++ b/libc/sysdeps/linux/mips/Makefile.arch @@ -10,15 +10,17 @@ CSRC := \ cacheflush.c pread_write.c sysmips.c _test_and_set.c \ readahead.c +SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S + ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y) CSRC += posix_fadvise.c posix_fadvise64.c endif ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y) CSRC += sigaction.c +SSRC += vfork.S clone.S endif -SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S syscall.S pipe.S ARCH_HEADERS := sgidefs.h # regdef.h diff --git a/libc/sysdeps/linux/mips/vfork.S b/libc/sysdeps/linux/mips/vfork.S index 8400df052..b30744759 100644 --- a/libc/sysdeps/linux/mips/vfork.S +++ b/libc/sysdeps/linux/mips/vfork.S @@ -29,6 +29,7 @@ #define RESTORE_PID #endif +#ifdef __NR_fork /* int vfork() */ @@ -93,5 +94,7 @@ L(error): #endif END(__vfork) -.weak vfork; - vfork = __vfork +weak_alias(__vfork,vfork) +libc_hidden_weak(vfork) + +#endif diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch index 3042cb480..0307977e7 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch @@ -22,6 +22,12 @@ ASFLAGS-pt-vfork.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 ASFLAGS-clone.S = -D_LIBC_REENTRANT ASFLAGS-vfork.S = -D_LIBC_REENTRANT +ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) + #Needed to use the correct SYSCALL_ERROR_HANDLER + ASFLAGS-clone.S += -DUSE___THREAD + ASFLAGS-vfork.S += -DUSE___THREAD + ASFLAGS-pt-vfork.S += -DUSE___THREAD +endif CFLAGS += $(SSP_ALL_CFLAGS) #CFLAGS:=$(CFLAGS:-O1=-O2) @@ -42,13 +48,14 @@ libpthread-so-y += $(LINUX_ARCH_OBJ:.o=.oS) libpthread-nomulti-y+=$(LINUX_ARCH_OBJS) LIBC_LINUX_ARCH_OBJ:=$(patsubst %.c,$(LINUX_ARCH_OUT)/%.o,$(libc_a_CSRC)) +LIBC_LINUX_ARCH_OBJ+=$(patsubst %.S,$(LINUX_ARCH_OUT)/%.o,$(libc_a_SSRC)) libc-static-y+=$(LIBC_LINUX_ARCH_OBJ) libc-shared-y+=$(LIBC_LINUX_ARCH_OBJ:.o=.oS) libc-nomulti-y+=$(LIBC_LINUX_ARCH_OBJ) -objclean-y+=pthread_linux_arch_objclean +objclean-y+=CLEAN_libpthread/nptl/sysdeps/unix/sysv/linux/mips -pthread_linux_arch_objclean: - $(RM) $(LINUX_ARCH_OUT)/*.{o,os,oS} +CLEAN_libpthread/nptl/sysdeps/unix/sysv/linux/mips: + $(do_rm) $(addprefix $(LINUX_ARCH_OUT)/*., o os oS) |