uClibc compilation error with nommu

Michael Unterkalmsteiner miciu at gmx.de
Tue Mar 10 11:44:32 UTC 2009


On Tuesday 10 March 2009 11.04.41 Michael Unterkalmsteiner wrote:
> On Tuesday 10 March 2009 00.32.40 Khem Raj wrote:

> > > /* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
> >
> > You should check if you are using right kernel headers while building
> > uclibc.
>
> Since I'm using buildroot I guess the kernel headers configured there are
> used: BR2_KERNEL_HEADERS_2_6_28=y
> BR2_DEFAULT_KERNEL_HEADERS="2.6.28.4"

Ok, I've investigated this a bit... but I'm not sure if what I found out is 
true, so if someone could please confirm I'd be glad :-)

1. The fork syscall is not implemented on nommu systems:
From linux-source-2.6.28/Documentation/nommu-mmap.txt
	"Memory mapping behaviour also involves the way fork(), vfork(), clone() and
	ptrace() work. Under uClinux there is no fork(), and clone() must be supplied
	the CLONE_VM flag."

2. The kernel headers (2.8.28.4) do NOT define __NR_vfork
linux-2.6.28.4/arch/mips/include/asm/unistd.h:
	[...]
	/* whitelists for checksyscalls */
	#define __IGNORE_select
	#define __IGNORE_vfork
	[...]

3. Ergo the compilation fails since __NR_vfork is indeed not defined and fork() 
is neither. 
How to solve that?

Thanks,
Michael



More information about the uClibc mailing list