Messages in this thread | | | Date | Wed, 20 Oct 2004 10:36:00 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Module 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/
| |