Commit 52bcc330 authored by Sam Ravnborg's avatar Sam Ravnborg

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: default avatarSam Ravnborg <sam@ravnborg.org>
parent 222d394d
...@@ -523,6 +523,10 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) ...@@ -523,6 +523,10 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
# disable pointer signed / unsigned warnings in gcc 4.0 # disable pointer signed / unsigned warnings in gcc 4.0
KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) 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. # Use --build-id when available.
LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
$(call ld-option, -Wl$(comma)--build-id,)) $(call ld-option, -Wl$(comma)--build-id,))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment