From: Sami Tolvanen Date: Mon, 1 Oct 2018 23:21:22 +0000 (-0700) Subject: ANDROID: arm64: kbuild: only specify code model with LTO for X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5823e640f008729a4018e414d7c996e71969ac94;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ANDROID: arm64: kbuild: only specify code model with LTO for modules This fixes CONFIG_LTO_CLANG for LLVM >= r334571 where LLVMgold actually started respecting the code model flag. Bug: 116819139 Bug: 119418330 Test: builds with LLVM r334571, boots on a device, all modules load Change-Id: I1af9d24ed1b789a40ac1e85bd00e176ff8a68aa5 Signed-off-by: Sami Tolvanen Signed-off-by: Miguel de Dios --- diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index b54572206413..b0f0f607c479 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -104,7 +104,7 @@ ifeq ($(CONFIG_ARM64_MODULE_CMODEL_LARGE), y) KBUILD_CFLAGS_MODULE += -mcmodel=large ifeq ($(CONFIG_LTO_CLANG), y) # Code model is not stored in LLVM IR, so we need to pass it also to LLVMgold -LDFLAGS += -plugin-opt=-code-model=large +KBUILD_LDFLAGS_MODULE += -plugin-opt=-code-model=large endif endif