From 1642d70c0d44daf75d5b0238d97e3f6419b8e892 Mon Sep 17 00:00:00 2001 From: Sami Tolvanen Date: Mon, 1 May 2017 11:08:05 -0700 Subject: [PATCH] FROMLIST: efi/libstub: disable LTO With CONFIG_LTO_CLANG, we produce LLVM IR instead of object files. Since LTO is not really needed here and the Makefile assumes we produce an object file, disable LTO for libstub. Bug: 62093296 Bug: 67506682 Change-Id: Ieaa3d7e2c694655788f480f4351bf7c4d3fce090 (am from https://patchwork.kernel.org/patch/10060309/) Acked-by: Ard Biesheuvel Signed-off-by: Sami Tolvanen --- drivers/firmware/efi/libstub/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index adaa4a964f0c..69b3fbfb7f97 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -20,7 +20,8 @@ cflags-$(CONFIG_EFI_ARMSTUB) += -I$(srctree)/scripts/dtc/libfdt KBUILD_CFLAGS := $(cflags-y) -DDISABLE_BRANCH_PROFILING \ -D__NO_FORTIFY \ $(call cc-option,-ffreestanding) \ - $(call cc-option,-fno-stack-protector) + $(call cc-option,-fno-stack-protector) \ + $(DISABLE_LTO) GCOV_PROFILE := n KASAN_SANITIZE := n -- 2.20.1