On Sat, Apr 27, 2024 at 11:55:00PM +0900, Masahiro Yamada wrote: > scripts/Makefile.lib is included not only from scripts/Makefile.build > but also from scripts/Makefile.{vmlinux,modfinal} for building generated > C files. > > In scripts/Makefile.{vmlinux,modfinal}, $(obj) and $(src) are empty. > > Therefore, the header include paths: > > -I $(srctree)/$(src) -I $(objtree)/$(obj) > > ... become meaningless code: > > -I $(srctree)/ -I $(objtree)/ > > Add these paths only when 'obj' and 'src' are defined. > > Reported-by: kernel test robot <lkp@xxxxxxxxx> > Link: https://lore.kernel.org/oe-kbuild-all/202404170634.BlqTaYA0-lkp@xxxxxxxxx/ > Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx> > --- > > Changes in v2: > - New patch to address the build error reported by 0day bot Reviewed-by: Nicolas Schier <n.schier@xxxxxx>