Skip to content

Commit

Permalink
kbuild: do not create built-in objects for external module builds
Browse files Browse the repository at this point in the history
'make M=/path/to/your/external/module' creates a pointless built-in.a
in the top of the external module directory because KBUILD_BUILTIN is
set to 1.

Clear KBUILD_BUILTIN when we are building external modules so that
'make M=...' and 'make M=... modules' work equivalently.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
masahir0y committed Sep 24, 2020
1 parent 596b047 commit 6212804
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,8 @@ else # KBUILD_EXTMOD
# Install the modules built in the module directory
# Assumes install directory is already created

# We are always building modules
# We are always building only modules.
KBUILD_BUILTIN :=
KBUILD_MODULES := 1

build-dirs := $(KBUILD_EXTMOD)
Expand Down

0 comments on commit 6212804

Please sign in to comment.