From 677093625d9489fde0c6b8ce754c6468987477a2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 24 Jun 2020 08:33:19 +0200 Subject: [PATCH] Revert "ANDROID: kbuild: fix modfinal with LTO" This reverts commit 2d939f16c34039a6b411fb656ffc49434c195ccf 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 Signed-off-by: Greg Kroah-Hartman Change-Id: I36ab73538f0ea727b82b52edb2a3c049d440aaed --- scripts/Makefile.modfinal | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal index 216a3f84bafe..6eb343ed0cad 100644 --- a/scripts/Makefile.modfinal +++ b/scripts/Makefile.modfinal @@ -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)