summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2020-03-17 14:17:44 -0700
committerSami Tolvanen <samitolvanen@google.com>2020-04-02 08:35:05 -0700
commitec4174eff9f58c34c94a2151c32e3fcaa0a43eff (patch)
tree91e4411a3d0eea4bc925ec734e8a4ee74506fcee
parentc57952b019ae4245dfd0d974405a2e8029af2cb3 (diff)
downloadgoldfish-ec4174eff9f58c34c94a2151c32e3fcaa0a43eff.tar.gz
ANDROID: kbuild: fix module linker script flags for LTO
KBUILD_LDS_MODULE didn't exist in 4.19, it was added in upstream commit 10df06385582 ("kbuild: rebuild modules when module linker scripts are updated"), which means the module-lto.lds linker script is not actually passed to the linker. Append the flags directly to KBUILD_LDFLAGS_MODULE instead. Bug: 151700304 Fixes: 6cea04778e12 ("ANDROID: kbuild: merge module sections with LTO") Change-Id: I600db54d2ff9cd4e287913e8ddd463a20741a4a3 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b6386c308244..26cf64841fca 100644
--- a/Makefile
+++ b/Makefile
@@ -847,7 +847,7 @@ LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5
KBUILD_LDFLAGS += $(LD_FLAGS_LTO_CLANG)
KBUILD_LDFLAGS_MODULE += $(LD_FLAGS_LTO_CLANG)
-KBUILD_LDS_MODULE += $(srctree)/scripts/module-lto.lds
+KBUILD_LDFLAGS_MODULE += -T $(srctree)/scripts/module-lto.lds
# allow disabling only clang LTO where needed
DISABLE_LTO_CLANG := -fno-lto