From 36a8a2affef022c304ee7115d897996d0b71254d Mon Sep 17 00:00:00 2001 From: Prakruthi Deepak Heragu Date: Thu, 21 May 2020 12:53:35 -0700 Subject: [PATCH] Makefile: Add a check of CONFIG_TRIM_UNUSED_KSYMS before remaking vmlinux Gaurd the rule to re generate vmlinux only when CONFIG_TRIM_UNUSED_KSYMS is set. Without this change, the vmlinux was generated twice as opposed to Image generating only once. Change-Id: I8370f64553b0ed7cb6536aabb1c68d77e5b58bf1 Signed-off-by: Prakruthi Deepak Heragu --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index e28dbcd9caa4..7923832ce8b1 100644 --- a/Makefile +++ b/Makefile @@ -1364,8 +1364,10 @@ all: modules PHONY += modules modules: $(if $(KBUILD_BUILTIN),vmlinux) modules.order modules.builtin +ifdef CONFIG_TRIM_UNUSED_KSYMS $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \ "$(MAKE) -f $(srctree)/Makefile vmlinux" +endif $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh