From: Sami Tolvanen Date: Fri, 11 Dec 2020 18:46:28 +0000 (-0800) Subject: scripts/mod: disable LTO for empty.c X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d23dddf86a12c96d9a3d135a567b9716e5b47821;p=linux.git 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 Reviewed-by: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201211184633.3213045-12-samitolvanen@google.com --- diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index 78071681d9242..c9e38ad937fd4 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