Re: Does kernel use system stdarg.h?

Russell King
2002-09-27T08:21:32Z

On Fri, Sep 27, 2002 at 10:58:52AM -0200, Denis Vlasenko wrote:
> make[3]: Entering directory `/usr/src/linux-2.5.36/kernel'
> gcc -E
> -Wp,-MD,/usr/src/linux-2.5.36/include/linux/modules/kernel/.exec_domain.ver.d
> -D__KERNEL__ -I/usr/src/linux-2.5.36/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
> -pipe -mpreferred-stack-boundary=2 -march=i486 -nostdinc -iwithprefix include
> -DKBUILD_BASENAME=exec_domain -D__GENKSYMS__ exec_domain.c |
> /sbin/genksyms -p smp_ -k 2.5.36 >
> /usr/src/linux-2.5.36/include/linux/modules/kernel/exec_domain.ver.tmp
> In file included from exec_domain.c:12:
> /usr/src/linux-2.5.36/include/linux/kernel.h:10:20: stdarg.h: No such file or
> directory
>
> There is no stdarg.h in kernel tree, should it be there?
> For now I just copied GCC one into linux/include...

It must be the GCC one. If your GCC isn't finding it, then you've got a
broken GCC installation; "-iwithprefix include" tells GCC to look in its
private include directory for such things.

You could try adding -v to CFLAGS to see where it is searching for includes.

--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux