[PATCH] Makefile: Make sure all linker input objects exist
Tom Rini
trini at konsulko.com
Sat Jan 18 17:43:20 CET 2025
On Sun, 12 Jan 2025 23:32:38 +0100, Marek Vasut wrote:
> In case the build system builds a directory with empty Makefile,
> one which does not contain any obj-y entries, the build fails to
> link due to missing built-in.o .
>
> This happens because of this part of scripts/Makefile.build
> 81 ifneq ($(strip $(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)),)
> 82 builtin-target := $(obj)/built-in.o
> 83 endif
> which does not assign builtin-target in case obj-y is empty. The
> built-in target is then not built at all, and built-in.o is not
> generated by this part of scripts/Makefile.build
> 325 ifdef builtin-target
> 326 quiet_cmd_link_o_target = AR $@
> 327 # If the list of objects to link is empty, just create an empty built-in.o
> ...
> 335 targets += $(builtin-target)
> 336 endif # builtin-target
> This is the correct behavior.
>
> [...]
Applied to u-boot/master, thanks!
--
Tom
More information about the U-Boot
mailing list