linux/Documentation/kbuild
Masahiro Yamada 28f94a4429 kbuild: clarify the difference between obj-y and obj-m w.r.t. descending
Kbuild descends into a directory by either 'y' or 'm', but there is an
important difference.

Kbuild combines the built-in objects into built-in.a in each directory.
The built-in.a in the directory visited by obj-y is merged into the
built-in.a in the parent directory. This merge happens recursively
when Kbuild is ascending back towards the top directory, then built-in
objects are linked into vmlinux eventually. This works properly only
when the Makefile specifying obj-y is reachable by the chain of obj-y.

On the other hand, Kbuild does not take built-in.a from the directory
visited by obj-m. This it, all the objects in that directory are
supposed to be modular. If Kbuild descends into a directory by obj-m,
but the Makefile in the sub-directory specifies obj-y, those objects
are just left orphan.

The current statement "Kbuild only uses this information to decide that
it needs to visit the directory" is misleading. Clarify the difference.

Reported-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
2019-12-22 00:25:35 +09:00
..
headers_install.rst Kbuild updates for v5.3 2019-07-12 16:03:16 -07:00
index.rst Documentation: kbuild: Add document about reproducible builds 2019-09-15 01:14:41 -06:00
issues.rst docs: kbuild: fix build with pdf and fix some minor issues 2019-07-15 11:03:04 -03:00
kbuild.rst kbuild: rename KBUILD_ENABLE_EXTRA_GCC_CHECKS to KBUILD_EXTRA_WARN 2019-09-06 23:46:52 +09:00
kconfig-language.rst kconfig: remove ---help--- from documentation 2019-12-18 23:17:29 +09:00
kconfig-macro-language.rst docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
Kconfig.recursion-issue-01 kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
Kconfig.recursion-issue-02 kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
kconfig.rst docs: kbuild: fix build with pdf and fix some minor issues 2019-07-15 11:03:04 -03:00
Kconfig.select-break kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
makefiles.rst kbuild: clarify the difference between obj-y and obj-m w.r.t. descending 2019-12-22 00:25:35 +09:00
modules.rst kbuild: do not read $(KBUILD_EXTMOD)/Module.symvers 2019-11-11 20:07:03 +09:00
reproducible-builds.rst kheaders: make headers archive reproducible 2019-10-05 15:29:49 +09:00