diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -331,3 +331,11 @@ LD_EMULATION_powerpc64le= elf64lppc_fbsd LD_EMULATION_riscv64= elf64lriscv LD_EMULATION=${LD_EMULATION_${MACHINE_ARCH}} + +# +# Autogenerated files must be located in the current object directory +# and not the one belonging to the parent build. This prevents kernel +# modules from using autogenerated files from the kernel build. +# This is only an issue when is used. +# +.NOPATH: ${CLEAN} ${CLEANFILES}