Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68fc8185 authored by Sami Tolvanen's avatar Sami Tolvanen
Browse files

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: 6cea0477 ("ANDROID: kbuild: merge module sections with LTO")
Change-Id: I600db54d2ff9cd4e287913e8ddd463a20741a4a3
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent 998f3331
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -827,7 +827,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