summaryrefslogtreecommitdiff
path: root/scripts/mod
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2020-12-11 10:46:28 -0800
committerKees Cook <keescook@chromium.org>2021-01-14 08:21:09 -0800
commitd23dddf86a12c96d9a3d135a567b9716e5b47821 (patch)
tree4a6f5114d11f69619b74c40ccb3f12f0acb5e9a7 /scripts/mod
parent7ac204b545f263c7595a8b5ec3797ae9f9954f82 (diff)
scripts/mod: disable LTO for empty.c
With CONFIG_LTO_CLANG, clang generates LLVM IR instead of ELF object files. As empty.o is used for probing target properties, disable LTO for it to produce an object file instead. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20201211184633.3213045-12-samitolvanen@google.com
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile
index 78071681d924..c9e38ad937fd 100644
--- a/scripts/mod/Makefile
+++ b/scripts/mod/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
OBJECT_FILES_NON_STANDARD := y
+CFLAGS_REMOVE_empty.o += $(CC_FLAGS_LTO)
hostprogs-always-y += modpost mk_elfconfig
always-y += empty.o