Revert "ANDROID: kbuild: fix modfinal with LTO"

This reverts commit 2d939f16c3 as the LTO
feature causes merge issues with 5.8-rc1.  So remove it for now and
allow the developer to add the latest version of the patches later on.

Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I36ab73538f0ea727b82b52edb2a3c049d440aaed
This commit is contained in:
Greg Kroah-Hartman 2020-06-24 08:33:19 +02:00
parent f3ab3cc850
commit 677093625d

View File

@ -6,7 +6,6 @@
PHONY := __modfinal
__modfinal:
include $(objtree)/include/config/auto.conf
include $(srctree)/scripts/Kbuild.include
# for c_flags
@ -36,10 +35,11 @@ ifdef CONFIG_LTO_CLANG
cmd_ld_ko_o = \
$(LD) -r $(LDFLAGS) \
$(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \
$(addprefix -T , $(KBUILD_LDS_MODULE)) \
$(addprefix -T , $(KBUILD_LDS_MODULE)) \
$(shell [ -s $(@:.ko=.o.symversions) ] && \
echo -T $(@:.ko=.o.symversions)) \
-o $@ --whole-archive $(filter %.o, $^); \
-o $@ --whole-archive \
$(filter-out FORCE,$(^:$(modpost-ext).o=.o)); \
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
ifdef CONFIG_FTRACE_MCOUNT_RECORD
@ -54,7 +54,7 @@ else
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
endif
$(modules): %.ko: %.o %.mod.o $(KBUILD_LDS_MODULE) FORCE
$(modules): %.ko: %$(modpost-ext).o %.o %.mod.o $(KBUILD_LDS_MODULE) FORCE
+$(call if_changed,ld_ko_o)
targets += $(modules) $(modules:.ko=.mod.o)