From 84cf1990330703c1d560ec63cba820e508707519 Mon Sep 17 00:00:00 2001 From: Sami Tolvanen Date: Tue, 19 Dec 2017 08:55:23 -0800 Subject: [PATCH] ANDROID: arm64: vdso: disable LTO Due to a bug in clang, vdso fails to build when both LTO_CLANG and CC_OPTIMIZE_FOR_SIZE are enabled: https://bugs.llvm.org/show_bug.cgi?id=32155 Disable LTO for vdso to work around the problem. Bug: 62093296 Bug: 67506682 Change-Id: I1d0279535fd389db4c829e4556f9ef728f240a34 Signed-off-by: Sami Tolvanen --- arch/arm64/kernel/vdso/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile index b215c712d897..ef3f9d9d4062 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -15,6 +15,7 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) ccflags-y := -shared -fno-common -fno-builtin ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 \ $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) +ccflags-y += $(DISABLE_LTO) # Disable gcov profiling for VDSO code GCOV_PROFILE := n -- 2.20.1