Skip to content

Commit

Permalink
kbuild: enable use of AFLAGS and CFLAGS on commandline
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Sam Ravnborg committed Oct 15, 2007
1 parent 222d394 commit 52bcc33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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,))
Expand Down

0 comments on commit 52bcc33

Please sign in to comment.