summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada2018-03-16 08:37:13 +0100
committerMasahiro Yamada2018-03-25 19:01:23 +0200
commit1f50b80a093836743b5b579b3fab33eb2f6834f2 (patch)
tree7a52f2b9e79e025c779966c43461963ba4af8d5f
parentkbuild: restore autoksyms.h touch to the top Makefile (diff)
downloadkernel-qcow2-linux-1f50b80a093836743b5b579b3fab33eb2f6834f2.tar.gz
kernel-qcow2-linux-1f50b80a093836743b5b579b3fab33eb2f6834f2.tar.xz
kernel-qcow2-linux-1f50b80a093836743b5b579b3fab33eb2f6834f2.zip
kbuild: move CONFIG_TRIM_UNUSED_KSYMS code unneeded for external module
The external module building does not need to parse this code because KBUILD_MODULES is always set anyway. Move this code inside the "ifeq ($(KBUILD_EXTMOD),) ... endif" block. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Nicolas Pitre <nico@linaro.org>
-rw-r--r--Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index b65cfe3bcba8..1e7f134dac0d 100644
--- a/Makefile
+++ b/Makefile
@@ -612,13 +612,6 @@ else
include/config/auto.conf: ;
endif # $(dot-config)
-# For the kernel to actually contain only the needed exported symbols,
-# we have to build modules as well to determine what those symbols are.
-# (this can be evaluated only once include/config/auto.conf has been included)
-ifdef CONFIG_TRIM_UNUSED_KSYMS
- KBUILD_MODULES := 1
-endif
-
# The all: target is the default when no target is given on the
# command line.
# This allow a user to issue only 'make' to build a kernel including modules
@@ -1019,6 +1012,13 @@ ifdef CONFIG_TRIM_UNUSED_KSYMS
"$(MAKE) -f $(srctree)/Makefile vmlinux"
endif
+# For the kernel to actually contain only the needed exported symbols,
+# we have to build modules as well to determine what those symbols are.
+# (this can be evaluated only once include/config/auto.conf has been included)
+ifdef CONFIG_TRIM_UNUSED_KSYMS
+ KBUILD_MODULES := 1
+endif
+
autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h)
$(autoksyms_h):