]> git.baikalelectronics.ru Git - kernel.git/commit
sh: fix build error for invisible CONFIG_BUILTIN_DTB_SOURCE
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 4 Feb 2019 09:10:55 +0000 (18:10 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 13 Feb 2019 14:29:42 +0000 (23:29 +0900)
commit4894712f6b7ed44591eb2838f812a1406d0e7e2b
treea43c59b872814e713a5368d3c66130b290125cf1
parentf8ba237d94a883fb9208577a97603253bf5613d7
sh: fix build error for invisible CONFIG_BUILTIN_DTB_SOURCE

I fixed a similar build error in commit 2dbdd88eac65 ("sh: fix build
error for empty CONFIG_BUILTIN_DTB_SOURCE"), but it came back again.

Since commit 1f763ced9ac3 ("kbuild: consolidate Devicetree dtb
build rules"), the combination of CONFIG_OF_EARLY_FLATTREE=y and
CONFIG_USE_BUILTIN_DTB=n results in the following build error:

  make[1]: *** No rule to make target 'arch/sh/boot/dts/.dtb.o',
  needed by 'arch/sh/boot/dts/built-in.a'.  Stop.

Prior to that commit, there was only one path to descend into
arch/sh/boot/dts/, and arch/sh/Makefile correctly guards it with
CONFIG_USE_BUILTIN_DTB:

  core-$(CONFIG_USE_BUILTIN_DTB)  += arch/sh/boot/dts/

Now, there is another path to descend there from the top Makefile
when CONFIG_OF_EARLY_FLATTREE=y. If CONFIG_USE_BUILTIN_DTB is disabled,
CONFIG_BUILTIN_DTB_SOURCE is invisible instead of defined as "".

Add obj-$(CONFIG_USE_BUILTIN_DTB) guard to avoid the attempt to build
the non-existing file.

Fixes: 1f763ced9ac3 ("kbuild: consolidate Devicetree dtb build rules")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/sh/boot/dts/Makefile