Commit 091ccb00 authored by Linus Torvalds's avatar Linus Torvalds
parents c0b79882 720097d8
...@@ -49,6 +49,7 @@ include/linux/compile.h ...@@ -49,6 +49,7 @@ include/linux/compile.h
include/linux/version.h include/linux/version.h
include/linux/utsrelease.h include/linux/utsrelease.h
include/linux/bounds.h include/linux/bounds.h
include/generated
# stgit generated dirs # stgit generated dirs
patches-* patches-*
......
...@@ -316,6 +316,16 @@ more details, with real examples. ...@@ -316,6 +316,16 @@ more details, with real examples.
#arch/m68k/fpsp040/Makefile #arch/m68k/fpsp040/Makefile
ldflags-y := -x ldflags-y := -x
subdir-ccflags-y, subdir-asflags-y
The two flags listed above are similar to ccflags-y and as-falgs-y.
The difference is that the subdir- variants has effect for the kbuild
file where tey are present and all subdirectories.
Options specified using subdir-* are added to the commandline before
the options specified using the non-subdir variants.
Example:
subdir-ccflags-y := -Werror
CFLAGS_$@, AFLAGS_$@ CFLAGS_$@, AFLAGS_$@
CFLAGS_$@ and AFLAGS_$@ only apply to commands in current CFLAGS_$@ and AFLAGS_$@ only apply to commands in current
......
...@@ -1200,7 +1200,7 @@ CLEAN_FILES += vmlinux System.map \ ...@@ -1200,7 +1200,7 @@ CLEAN_FILES += vmlinux System.map \
.tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map
# Directories & files removed with 'make mrproper' # Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config include2 usr/include MRPROPER_DIRS += include/config include2 usr/include include/generated
MRPROPER_FILES += .config .config.old include/asm .version .old_version \ MRPROPER_FILES += .config .config.old include/asm .version .old_version \
include/linux/autoconf.h include/linux/version.h \ include/linux/autoconf.h include/linux/version.h \
include/linux/utsrelease.h \ include/linux/utsrelease.h \
......
...@@ -27,6 +27,9 @@ ccflags-y := ...@@ -27,6 +27,9 @@ ccflags-y :=
cppflags-y := cppflags-y :=
ldflags-y := ldflags-y :=
subdir-asflags-y :=
subdir-ccflags-y :=
# Read auto.conf if it exists, otherwise ignore # Read auto.conf if it exists, otherwise ignore
-include include/config/auto.conf -include include/config/auto.conf
......
...@@ -4,6 +4,11 @@ ccflags-y += $(EXTRA_CFLAGS) ...@@ -4,6 +4,11 @@ ccflags-y += $(EXTRA_CFLAGS)
cppflags-y += $(EXTRA_CPPFLAGS) cppflags-y += $(EXTRA_CPPFLAGS)
ldflags-y += $(EXTRA_LDFLAGS) ldflags-y += $(EXTRA_LDFLAGS)
#
# flags that take effect in sub directories
export KBUILD_SUBDIR_ASFLAGS := $(KBUILD_SUBDIR_ASFLAGS) $(subdir-asflags-y)
export KBUILD_SUBDIR_CCFLAGS := $(KBUILD_SUBDIR_CCFLAGS) $(subdir-ccflags-y)
# Figure out what we need to build from the various variables # Figure out what we need to build from the various variables
# =========================================================================== # ===========================================================================
...@@ -104,10 +109,10 @@ else ...@@ -104,10 +109,10 @@ else
debug_flags = debug_flags =
endif endif
orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \ orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \
$(ccflags-y) $(CFLAGS_$(basetarget).o) $(ccflags-y) $(CFLAGS_$(basetarget).o)
_c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags)) _c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))
_a_flags = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) \ _a_flags = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \
$(asflags-y) $(AFLAGS_$(basetarget).o) $(asflags-y) $(AFLAGS_$(basetarget).o)
_cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F)) _cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
......
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