]> git.karo-electronics.de Git - linux-beck.git/commitdiff
kbuild: add AFLAGS_REMOVE_(basename).o option
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 5 Nov 2015 13:03:27 +0000 (14:03 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 18 Dec 2015 13:59:25 +0000 (14:59 +0100)
It is already possible to remove CFLAGS with the CFLAGS_REMOVE option
that was introduced with commit 656ee82cc855 ("kbuild: create new
CFLAGS_REMOVE_(basename).o option").  However it is not possible to
remove AFLAGS for assembler files.

So this patch just adds the AFLAGS_REMOVE option which works the same
like CFLAGS_REMOVE.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
scripts/Makefile.lib

index 79e86613712f22308b8ad4c3442403e09770f2ed..26a48d76eb9d08f4d5001a09bbf3a359aa41139d 100644 (file)
@@ -104,8 +104,9 @@ modname_flags  = $(if $(filter 1,$(words $(modname))),\
 orig_c_flags   = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \
                  $(ccflags-y) $(CFLAGS_$(basetarget).o)
 _c_flags       = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))
-_a_flags       = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \
+orig_a_flags   = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \
                  $(asflags-y) $(AFLAGS_$(basetarget).o)
+_a_flags       = $(filter-out $(AFLAGS_REMOVE_$(basetarget).o), $(orig_a_flags))
 _cpp_flags     = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
 
 #