ANDROID: kbuild: fix build for DEBUG_INFO_BTF_MODULES
Upstream commit f73edc89 ("kbuild: unify two modpost invocations") adds 'vmlinux' as a Makefile rule dependency for the target 'modules'. This rule is conditional on DEBUG_INFO_BTF_MODULES like so: ifdef CONFIG_DEBUG_INFO_BTF_MODULES modules: vmlinux endif However, setting this option breaks android's mixed builds as an out-of-tree patch skips the definition of the 'vmlinux' rule whenever KBUILD_MIXED_TREE is set. For details on this approach see commit ee1b16e8 ("ANDROID: Kbuild: Add support for KBUILD_MIXED_TREE"). Since kbuild is unable to find the 'vmlinux' binary or a rule to generate it in this case, we hit the following build error: $ ./scripts/config -e DEBUG_INFO_BTF $ make olddefconfig $ KBUILD_MIXED_TREE=${path} make modules make[1]: *** No rule to make target 'vmlinux', needed by 'modules'. Stop. make[1]: *** Waiting for unfinished jobs.... In order to fix this issue, lets pass the appropiate path to vmlinux by prepending mixed-build-prefix. If KBUILD_MIXED_TREE is set, kbuild will find the previously built 'vmlinux' and won't require a rule for it. Bug: 266874587 Change-Id: I2290502b557f454187313a563e5477b05d37f3c4 Signed-off-by:Carlos Llamas <cmllamas@google.com>
Loading