lkml.org 
[lkml]   [2004]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectModule compilation


In Makefiles for compiling modules before the new
kernel build procedure, we would just build up
a gcc command-line with the correct parameters
and definitions, i.e. :

CC = gcc -Wall -O2 -etc -etc

DEFINES = -DMODULE -D__KERNEL__ -DONE=1 -DTWO=2 -DETC=etc

CC += $(DEFINES)

In this manner, one could dynamically change definitions
(-DEFINES) being passed to the compiler. The problem is
that the new compile procedure doesn't allow this. It
is possible to 'cheat' and add a string to CFLAGS like

CFLAGS += -DONE=1 -DTWO=2 -DETC=etc

...but it's not CFLAGS that needs to be modified, it's
a named variable that doesn't exist yet, perhaps "USERDEF",
or "DEFINES". I see that the normal "defines" is a constant
called "CHECKFLAGS", so this isn't appropriate for user
modification.

Could whomever remade the kernel Makefile, please add
a variable, initially set to "", like CFLAGS_KERNEL, that
is exported and is always included on the compiler command-
line?


Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 GrumpyMips).
98.36% of all statistics are fiction.
-
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: 2005-03-22 14:07    [W:0.272 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site