The kernel eclass checks for KBUILD_OUTPUT work normally. However, the knem build system has separate options for the kernel source and build directories. When only the source directory (--with-linux) is set, the build location is assumed to be the same. The ebuild needs to set the build directory (--with-linux-build) explicitly when KBUILD_OUTPUT is used. econf should specify --with-linux-build="${KBUILD_OUTPUT}" Example of configure failure when KBUILD_OUTPUT is in use: checking kernel Makefile... found in /usr/src/linux configure: looked for kernel headers and build system using: configure: kernel headers in /usr/src/linux configure: kernel build in /usr/src/linux configure: might need --with-linux-release, --with-linux, or --with-linux-build configure: error: could not find kernel headers and build system econf '--enable-hwloc' '--with-linux=/usr/src/linux' '--with-linux-release=5.4.48-gentoo' '--disable-debug' Reproducible: Always