[uClibc] pthread for armnommu

Erik Andersen andersen at codepoet.org
Mon Sep 8 19:59:06 UTC 2003


On Mon Sep 08, 2003 at 06:19:25PM +0200, Andrea Scian wrote:
> Hi all!
> I'm using uClibc under uClinux from a while and everything works fine... but now I have an application (Kaffe JVM) that require pthreading... when I try to build it I receive the following message:
> 
> kaffe-bin.elf2flt: In function `__fork':
> /home/amon/B2/sw/uClinux/uClinux-dist/uClibc/libpthread/linuxthreads/ptfork.c:91: undefined reference to `__libc_fork'
> collect2: ld returned 1 exit status

Does this patch help?

--- uClibc/libc/sysdeps/linux/common/syscalls.c	8 Sep 2003 06:31:16 -0000	1.112
+++ uClibc/libc/sysdeps/linux/common/syscalls.c	8 Sep 2003 19:58:04 -0000
@@ -46,14 +46,14 @@
 #	ifdef __UCLIBC_HAS_MMU__
 #define __NR___libc_fork __NR_fork
 		_syscall0(pid_t, __libc_fork);
-		weak_alias (__libc_fork, fork)
 #	else
-		pid_t fork(void)
+		pid_t __libc_fork(void)
 		{
 			__set_errno(ENOSYS);
 			return -1;
 		}
 #	endif
+weak_alias (__libc_fork, fork)
 #endif
 
 //#define __NR_read             3

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list