Эх сурвалжийг харах

add vfork implementation from klibc, fix gnu tar problem

Waldemar Brodkorb 14 жил өмнө
parent
commit
074aa4df81

+ 49 - 0
toolchain/uClibc/patches/cris-vfork.patch

@@ -0,0 +1,49 @@
+diff -Nur uClibc-0.9.32-rc2.orig/libc/sysdeps/linux/cris/Makefile.arch uClibc-0.9.32-rc2/libc/sysdeps/linux/cris/Makefile.arch
+--- uClibc-0.9.32-rc2.orig/libc/sysdeps/linux/cris/Makefile.arch	2011-01-20 15:49:47.000000000 +0100
++++ uClibc-0.9.32-rc2/libc/sysdeps/linux/cris/Makefile.arch	2011-02-07 23:01:26.000000000 +0100
+@@ -7,7 +7,7 @@
+ 
+ CSRC := __init_brk.c brk.c sbrk.c
+ 
+-SSRC := setjmp.S __longjmp.S clone.S sysdep.S syscall.S
++SSRC := setjmp.S __longjmp.S clone.S sysdep.S syscall.S vfork.S
+ ifeq ($(UNIFIED_SYSCALL),y)
+ SSRC += __uClibc_syscall.S
+ endif
+diff -Nur uClibc-0.9.32-rc2.orig/libc/sysdeps/linux/cris/vfork.S uClibc-0.9.32-rc2/libc/sysdeps/linux/cris/vfork.S
+--- uClibc-0.9.32-rc2.orig/libc/sysdeps/linux/cris/vfork.S	1970-01-01 01:00:00.000000000 +0100
++++ uClibc-0.9.32-rc2/libc/sysdeps/linux/cris/vfork.S	2011-02-08 00:39:10.000000000 +0100
+@@ -0,0 +1,33 @@
++/*
++ * vfork.S
++ *
++ * On cris, r9 contains the syscall number (set by generated stub);
++ * r10..r13 contain arguments 0-3 per the standard calling convention.
++ * The return address is in $srp; so we just need to avoid the stack
++ * usage of the normal syscall stubs.
++ */
++
++#include <asm/unistd.h>
++#include <sys/syscall.h>
++
++	.section ".text","ax"
++	.balign	4
++	.globl	__vfork
++	.type	__vfork,@function
++__vfork:
++	move.d	__NR_vfork, $r9
++	break	13
++
++	cmps.w	-4096,$r10
++	blo	1f
++	neg.d	$r10,$r11
++	move.d	$r11,[errno]
++	moveq	-1,$r10
++1:
++	ret
++	nop
++
++	.size	__vfork,.-__vfork
++
++weak_alias(__vfork,vfork)
++libc_hidden_weak(vfork)

+ 12 - 0
toolchain/uClibc/patches/gnutar-problem.patch

@@ -0,0 +1,12 @@
+diff -Nur uClibc-0.9.32-rc3.orig/Makefile.in uClibc-0.9.32-rc3/Makefile.in
+--- uClibc-0.9.32-rc3.orig/Makefile.in	2011-03-16 20:11:13.000000000 +0100
++++ uClibc-0.9.32-rc3/Makefile.in	2011-03-18 18:00:13.000000000 +0100
+@@ -383,6 +383,8 @@
+ # Installs run-time libraries
+ install_runtime: all | $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)
+ ifeq ($(HAVE_SHARED),y)
++	$(INSTALL) -m 755 $(top_builddir)lib/ld-uClibc-$(VERSION).so \
++		$(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)
+ 	$(INSTALL) -m 755 $(top_builddir)lib/lib*-$(VERSION).so \
+ 		$(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)
+ 	(cd $(top_builddir)lib && $(TAR) -cf - *.so.*) | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)