diff options
author | Sam Ravnborg <sam@neptun.(none)> | 2007-10-15 22:03:58 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@neptun.(none)> | 2007-10-15 22:03:58 +0200 |
commit | 52bcc3308ae3344266f55bf98a22c1ac0201eda7 (patch) | |
tree | 78f1f35060575c8b3f0659220728196fb80b4722 /Makefile | |
parent | kbuild: enable 'make AFLAGS=...' to add additional options to AS (diff) | |
download | linux-52bcc3308ae3344266f55bf98a22c1ac0201eda7.tar.xz linux-52bcc3308ae3344266f55bf98a22c1ac0201eda7.zip |
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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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,)) |