All of lore.kernel.org
 help / color / mirror / Atom feed
* Module compilation
@ 2004-10-20 14:36 Richard B. Johnson
  2004-10-20 14:49 ` David Woodhouse
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Richard B. Johnson @ 2004-10-20 14:36 UTC (permalink / raw)
  To: Linux kernel



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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-10-22  3:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-20 14:36 Module compilation Richard B. Johnson
2004-10-20 14:49 ` David Woodhouse
2004-10-20 15:01   ` Richard B. Johnson
2004-10-20 14:59 ` Ian Campbell
2004-10-20 15:06   ` Richard B. Johnson
2004-10-21 20:15 ` Sam Ravnborg
2004-10-21 18:21   ` Richard B. Johnson
2004-10-22  2:54     ` Herbert Poetzl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.