History

kbuild: add AFLAGS_REMOVE_(basename).o option

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.

Heiko Carstens committed 11 years ago

Commit a7e137e1 parent f3d05f91 file · +2 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/Makefile.lib+2−1
@@ -104,8 +104,9 @@ modname_flags = $(if $(filter 1,$(words $(modname))),\ · 103 unmodified lines
104104 orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \
105105 $(ccflags-y) $(CFLAGS_$(basetarget).o)
106106 _c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))
107−_a_flags = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \
107+orig_a_flags = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \
108108 $(asflags-y) $(AFLAGS_$(basetarget).o)
109+_a_flags = $(filter-out $(AFLAGS_REMOVE_$(basetarget).o), $(orig_a_flags))
109110 _cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
110111
111112 #