build: skip kernel stack validation when building on macOS
authorFelix Fietkau <nbd@nbd.name>
Wed, 3 Jul 2019 11:29:13 +0000 (13:29 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 3 Jul 2019 12:07:59 +0000 (14:07 +0200)
Since we switched to 4.19, the kernel build checks for libelf to decide if
it should build tools for stack validation.

On macOS, this check fails during target/compile, but succeeds during package
build (because of the pkg-config path picking up target libraries).

Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/kernel.mk

index 8dfe903bccbb6857d36feda25bf90f80e346acf1..975cf455c4f3aefaa7e103496d4a460194215a5e 100644 (file)
@@ -129,6 +129,10 @@ ifdef CONFIG_USE_SPARSE
   KERNEL_MAKEOPTS += C=1 CHECK=$(STAGING_DIR_HOST)/bin/sparse
 endif
 
+ifeq ($(HOST_OS),Darwin)
+  export SKIP_STACK_VALIDATION:=1
+endif
+
 PKG_EXTMOD_SUBDIRS ?= .
 
 define populate_module_symvers