diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-16 03:37:13 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-25 13:01:23 -0400 |
commit | 1f50b80a093836743b5b579b3fab33eb2f6834f2 (patch) | |
tree | 7a52f2b9e79e025c779966c43461963ba4af8d5f | |
parent | 07a422bb213adb7ee1afbb2347ce6922c60a558a (diff) |
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-- | Makefile | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -612,13 +612,6 @@ else | |||
612 | include/config/auto.conf: ; | 612 | include/config/auto.conf: ; |
613 | endif # $(dot-config) | 613 | endif # $(dot-config) |
614 | 614 | ||
615 | # For the kernel to actually contain only the needed exported symbols, | ||
616 | # we have to build modules as well to determine what those symbols are. | ||
617 | # (this can be evaluated only once include/config/auto.conf has been included) | ||
618 | ifdef CONFIG_TRIM_UNUSED_KSYMS | ||
619 | KBUILD_MODULES := 1 | ||
620 | endif | ||
621 | |||
622 | # The all: target is the default when no target is given on the | 615 | # The all: target is the default when no target is given on the |
623 | # command line. | 616 | # command line. |
624 | # This allow a user to issue only 'make' to build a kernel including modules | 617 | # This allow a user to issue only 'make' to build a kernel including modules |
@@ -1019,6 +1012,13 @@ ifdef CONFIG_TRIM_UNUSED_KSYMS | |||
1019 | "$(MAKE) -f $(srctree)/Makefile vmlinux" | 1012 | "$(MAKE) -f $(srctree)/Makefile vmlinux" |
1020 | endif | 1013 | endif |
1021 | 1014 | ||
1015 | # For the kernel to actually contain only the needed exported symbols, | ||
1016 | # we have to build modules as well to determine what those symbols are. | ||
1017 | # (this can be evaluated only once include/config/auto.conf has been included) | ||
1018 | ifdef CONFIG_TRIM_UNUSED_KSYMS | ||
1019 | KBUILD_MODULES := 1 | ||
1020 | endif | ||
1021 | |||
1022 | autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h) | 1022 | autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h) |
1023 | 1023 | ||
1024 | $(autoksyms_h): | 1024 | $(autoksyms_h): |