Skip to content

Commit 6212804

Browse files
committed
kbuild: do not create built-in objects for external module builds
'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>
1 parent 596b047 commit 6212804

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,7 +1702,8 @@ else # KBUILD_EXTMOD
17021702
# Install the modules built in the module directory
17031703
# Assumes install directory is already created
17041704

1705-
# We are always building modules
1705+
# We are always building only modules.
1706+
KBUILD_BUILTIN :=
17061707
KBUILD_MODULES := 1
17071708

17081709
build-dirs := $(KBUILD_EXTMOD)

0 commit comments

Comments
 (0)