Selaa lähdekoodia

FROMLIST: 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.

Bug: 145210207
Change-Id: I8fa54c4c9b71f5d481a364b6eb10a4c34b2b71b7
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Sami Tolvanen <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Sami Tolvanen 8 vuotta sitten
vanhempi
sitoutus
beab453713
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      scripts/mod/Makefile

+ 1 - 0
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