The check for libelf in the kernel build is not enough, because the code that
uses libelf for stack validation is completely non-portable, as it tries to
include asm/types.h and relies on kernel types in user space.
Until this is fixed properly, the only solution is to disable this on any non
Linux build host
Signed-off-by: Felix Fietkau <nbd@nbd.name>
KERNEL_MAKEOPTS += C=1 CHECK=$(STAGING_DIR_HOST)/bin/sparse
endif
-ifeq ($(HOST_OS),Darwin)
+ifneq ($(HOST_OS),Linux)
+ KERNEL_MAKEOPTS += CONFIG_STACK_VALIDATION=
export SKIP_STACK_VALIDATION:=1
endif