]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: do not deduplicate modules.order
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 20 Aug 2022 09:15:30 +0000 (18:15 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 28 Sep 2022 19:40:14 +0000 (04:40 +0900)
commit8521eb430e3721b3cf41687abb223c23c623ca0e
tree1a5dcc8f9971cc822ac1e3c8e94d98924c5a9a7f
parent51aa8ee3f1d2c396f16d05345c668e747eca24df
kbuild: do not deduplicate modules.order

The AWK code was added to deduplicate modules.order in case $(obj-m)
contains the same module multiple times, but it is actually unneeded
since commit f07dcb684fc9 ("kbuild: update modules.order only when
contained modules are updated").

The list is already deduplicated before being processed by AWK because
$^ is the deduplicated list of prerequisites.
(Please note the real-prereqs macro uses $^)

Yet, modules.order will contain duplication if two different Makefiles
build the same module:

  foo/Makefile:

      obj-m += bar/baz.o

  foo/bar/Makefile:

      obj-m += baz.o

However, the parallel builds cannot properly handle this case in the
first place. So, it is better to let it fail (as already done by
scripts/modules-check.sh).

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Makefile
scripts/Makefile.build