lkml.org 
[lkml]   [2006]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Makefile problem
From
Date
On Tue, 2006-03-21 at 03:21 -0800, cranium2003 wrote:
> Hi,
> I have some Makefile questions
> 1)Why a kernel module in 2.6 kernel cannot be compiled
> with single gcc command? Why it requires Makefile in
> current directory so that i can use Makefile?
>
> 2) why following command used to compile 2.4 kernel
> module fails on 2.6 kernel
> gcc -D__KERNEL__ -DMODULE -DLINUX -O2 -Wall
> -Wstrict-prototypes -I/lib/modules/`uname
> -r`/build/include -c -o example.ko example.c

because it's broken and isn't using the same CFLAGS as the kernel is.
Read Documentation/kbuild/*

You *HAVE* to use the same CFLAGS as the rest of the kernel.


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

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