mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-05-02 18:15:03 -04:00
kbuild: move modkern_{c,a}flags to Makefile.lib from Makefile.build
Makefile.lib is included by Makefile.modfinal as well as Makefile.build. Move modkern_cflags to Makefile.lib in order to simplify cmd_cc_o_c in Makefile.modfinal. Move modkern_cflags as well for consistency. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
@@ -159,6 +159,18 @@ _cpp_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
|
||||
endif
|
||||
endif
|
||||
|
||||
part-of-module = $(if $(filter $(basename $@).o, $(real-obj-m)),y)
|
||||
quiet_modtag = $(if $(part-of-module),[M], )
|
||||
|
||||
modkern_cflags = \
|
||||
$(if $(part-of-module), \
|
||||
$(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE), \
|
||||
$(KBUILD_CFLAGS_KERNEL) $(CFLAGS_KERNEL))
|
||||
|
||||
modkern_aflags = $(if $(part-of-module), \
|
||||
$(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE), \
|
||||
$(KBUILD_AFLAGS_KERNEL) $(AFLAGS_KERNEL))
|
||||
|
||||
c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
|
||||
-include $(srctree)/include/linux/compiler_types.h \
|
||||
$(_c_flags) $(modkern_cflags) \
|
||||
|
||||
Reference in New Issue
Block a user