Merge 21a6ab2131 ("Merge tag 'modules-for-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux") into android-mainline
Steps on the way to 5.12-rc1 Resolves conflicts in: include/linux/module.h Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I44772d65a5d6b1c5f4c33905554092c2cdc5b210
This commit is contained in:
@@ -43,6 +43,9 @@ __modpost:
|
||||
include include/config/auto.conf
|
||||
include scripts/Kbuild.include
|
||||
|
||||
# for ld_flags
|
||||
include scripts/Makefile.lib
|
||||
|
||||
MODPOST = scripts/mod/modpost \
|
||||
$(if $(CONFIG_MODVERSIONS),-m) \
|
||||
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \
|
||||
@@ -124,12 +127,30 @@ $(input-symdump):
|
||||
@echo >&2 'WARNING: Symbol version dump "$@" is missing.'
|
||||
@echo >&2 ' Modules may not have dependencies or modversions.'
|
||||
|
||||
ifdef CONFIG_LTO_CLANG
|
||||
# With CONFIG_LTO_CLANG, .o files might be LLVM bitcode, so we need to run
|
||||
# LTO to compile them into native code before running modpost
|
||||
prelink-ext := .lto
|
||||
|
||||
quiet_cmd_cc_lto_link_modules = LTO [M] $@
|
||||
cmd_cc_lto_link_modules = \
|
||||
$(LD) $(ld_flags) -r -o $@ \
|
||||
$(shell [ -s $(@:.lto.o=.o.symversions) ] && \
|
||||
echo -T $(@:.lto.o=.o.symversions)) \
|
||||
--whole-archive $^
|
||||
|
||||
%.lto.o: %.o
|
||||
$(call if_changed,cc_lto_link_modules)
|
||||
endif
|
||||
|
||||
modules := $(sort $(shell cat $(MODORDER)))
|
||||
|
||||
# Read out modules.order to pass in modpost.
|
||||
# Otherwise, allmodconfig would fail with "Argument list too long".
|
||||
quiet_cmd_modpost = MODPOST $@
|
||||
cmd_modpost = sed 's/ko$$/o/' $< | $(MODPOST) -T -
|
||||
cmd_modpost = sed 's/\.ko$$/$(prelink-ext)\.o/' $< | $(MODPOST) -T -
|
||||
|
||||
$(output-symdump): $(MODORDER) $(input-symdump) FORCE
|
||||
$(output-symdump): $(MODORDER) $(input-symdump) $(modules:.ko=$(prelink-ext).o) FORCE
|
||||
$(call if_changed,modpost)
|
||||
|
||||
targets += $(output-symdump)
|
||||
|
||||
Reference in New Issue
Block a user