[uClibc] Re: uClibc Digest, Vol 6, Issue 11

cui lirong stone at chinadigipro.com
Wed Sep 10 01:34:24 UTC 2003


Hi,

You can compile you app like this

arm-elf-gcc -Wl,-elf2flt -o a.out a.c -lpthread


goodluck


> From: Erik Andersen <andersen at codepoet.org>
> Subject: Re: [uClibc] pthread for armnommu
> To: Andrea Scian <andrea.scian at wawnet.biz>
> Cc: uClibc Mailing List <uclibc at uclibc.org>
> Message-ID: <20030908195906.GA10479 at codepoet.org>
> Content-Type: text/plain; charset=us-ascii
> 
> 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