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.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -104,8 +104,9 @@ modname_flags = $(if $(filter 1,$(words $(modname))),\ · 103 unmodified lines | |||
| 104 | orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \ | 104 | orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \ |
| 105 | $(ccflags-y) $(CFLAGS_$(basetarget).o) | 105 | $(ccflags-y) $(CFLAGS_$(basetarget).o) |
| 106 | _c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags)) | 106 | _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) \ |
| 108 | $(asflags-y) $(AFLAGS_$(basetarget).o) | 108 | $(asflags-y) $(AFLAGS_$(basetarget).o) |
| 109 | _a_flags = $(filter-out $(AFLAGS_REMOVE_$(basetarget).o), $(orig_a_flags)) | ||
| 109 | _cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F)) | 110 | _cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F)) |
| 110 | 111 | ||
| 111 | # | 112 | # |