Re: hello world module no longer compiles?!

From: Tigran Aivazian (tigran@veritas.com)
Date: Mon Oct 16 2000 - 11:13:50 EST


On Mon, 16 Oct 2000, Arjan van de Ven wrote:

> In article <Pine.LNX.4.21.0010161552160.3748-100000@saturn.homenet> you wrote:
>
> > # kgcc -v -E -dM -Wall -O2 -g -c -o hello.o hello.c
>
> The biggest problem with this is that you use the glibc headers (in
> /usr/include) instead of the kernel headers (in /usr/src/linux/include)
>
> kgcc -O2 -I/usr/src/linux/include -D__KERNEL__ -o hello.o hello.c
>
> would be a much better command-line.

I agree. The main reason, imho, being the fact that we need <stdarg.h> and
that is found in one of those "private" locations so -nostdinc will hide
it unnecessarily and although the trivial hello.c would compile, a
slightly less trivial one (including mm.h/sched.h) won't. But your
commandline should compile anything and pick up <stdarg.h> correctly.

Regards,
Tigran

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:09 EST