Skip to content
Commit 9dcb47a6 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

kbuild: do not add $(srctree) or $(objtree) to header search paths



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: default avatarkernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202404170634.BlqTaYA0-lkp@intel.com/
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarNicolas Schier <n.schier@avm.de>
parent b957df3b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment