dect
/
linux-2.6
Archived
13
0
Fork 0

kbuild: enable use of AFLAGS and CFLAGS on commandline

The previous patches was preparation.
With this patch we can now say:
make CFLAGS=-Os vmlinux

And the option specified will be appended to the
options passed to gcc for C files.

For assembler use:
make AFLAGS=-foo vmlinux
for the same functionality.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
Sam Ravnborg 2007-10-15 22:03:58 +02:00
parent 222d394d30
commit 52bcc3308a
1 changed files with 4 additions and 0 deletions

View File

@ -523,6 +523,10 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
# disable pointer signed / unsigned warnings in gcc 4.0
KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
# Add user supplied AFLAGS and CFLAGS as the last assignments
KBUILD_AFLAGS += $(AFLAGS)
KBUILD_CFLAGS += $(CFLAGS)
# Use --build-id when available.
LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
$(call ld-option, -Wl$(comma)--build-id,))