Skip to content

Commit

Permalink
kbuild: move CONFIG_TRIM_UNUSED_KSYMS code unneeded for external module
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Nicolas Pitre <[email protected]>
  • Loading branch information
masahir0y committed Mar 25, 2018
1 parent 07a422b commit 1f50b80
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 1f50b80

Please sign in to comment.