summaryrefslogtreecommitdiff
path: root/mk/kernel-vars.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/kernel-vars.mk')
-rw-r--r--mk/kernel-vars.mk11
1 files changed, 8 insertions, 3 deletions
diff --git a/mk/kernel-vars.mk b/mk/kernel-vars.mk
index ee1ce803b..1b1baee87 100644
--- a/mk/kernel-vars.mk
+++ b/mk/kernel-vars.mk
@@ -10,9 +10,14 @@ KERNEL_MAKE_OPTS:= V=1 \
DISABLE_PAX_PLUGINS=y \
CONFIG_SHELL='${SHELL}'
-# regex for relocs needs pcre on Darwin
-ifeq (${OStype},Darwin)
-KERNEL_MAKE_OPTS+= HOSTCFLAGS='$(HOST_CPPFLAGS) ${HOST_CFLAGS}' HOSTLDFLAGS='-lpcreposix'
+# regex for relocs needs pcre
+ifeq ($(OS_FOR_BUILD),Darwin)
+KERNEL_MAKE_OPTS+= HOSTLDFLAGS='-lpcreposix'
+endif
+
+# non-Linux platforms need elf.h
+ifneq ($(OS_FOR_BUILD),Linux)
+KERNEL_MAKE_OPTS+= HOSTCFLAGS='$(HOST_CPPFLAGS) ${HOST_CFLAGS}'
KERNEL_MAKE_OPTS+= HOST_EXTRACFLAGS='-I ${ADK_TOPDIR}/adk/include -DKBUILD_NO_NLS'
else
KERNEL_MAKE_OPTS+= HOSTCFLAGS='${HOST_CFLAGS}'