ifeq ($(BR2_KERNEL_HEADERS_VERSION)$(BR2_KERNEL_HEADERS_AS_KERNEL)$(BR2_KERNEL_HEADERS_CUSTOM_TARBALL)$(BR2_KERNEL_HEADERS_CUSTOM_GIT),y)
define LINUX_HEADERS_CHECK_VERSION
$(call check_kernel_headers_version,\
+ $(BUILD_DIR),\
$(STAGING_DIR),\
$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)))
endef
#!/bin/sh
-SYSROOT="${1}"
+BUILDDIR="${1}"
+SYSROOT="${2}"
# Make sure we have enough version components
-HDR_VER="${2}.0.0"
+HDR_VER="${3}.0.0"
HDR_M="${HDR_VER%%.*}"
HDR_V="${HDR_VER#*.}"
HDR_m="${HDR_V%%.*}"
-EXEC="$(mktemp -t check-headers.XXXXXX)"
+EXEC="$(mktemp -p "${BUILDDIR}" -t .check-headers.XXXXXX)"
# We do not want to account for the patch-level, since headers are
# not supposed to change for different patchlevels, so we mask it out.
# Check the specified kernel headers version actually matches the
# version in the toolchain.
#
-# $1: sysroot directory
-# $2: kernel version string, in the form: X.Y
+# $1: build directory
+# $2: sysroot directory
+# $3: kernel version string, in the form: X.Y
#
check_kernel_headers_version = \
- if ! support/scripts/check-kernel-headers.sh $(1) $(2); then \
- exit 1; \
- fi
+ support/scripts/check-kernel-headers.sh $(1) $(2) $(3)
#
# Check the specific gcc version actually matches the version in the
$$(Q)$$(call check_unusable_toolchain,$$(TOOLCHAIN_EXTERNAL_CC))
$$(Q)SYSROOT_DIR="$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC))" ; \
$$(call check_kernel_headers_version,\
+ $$(BUILD_DIR)\
$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC)),\
$$(call qstrip,$$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \
$$(call check_gcc_version,$$(TOOLCHAIN_EXTERNAL_CC),\