lkml.org 
[lkml]   [2000]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: hello world module no longer compiles?!
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/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.039 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site