summaryrefslogtreecommitdiff
path: root/toolchain/helpers.mk
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2014-03-01 15:53:01 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-03-01 19:47:22 +0100
commita5a309642a056366ee437e2bae6da7dfda4fb667 (patch)
treeba325b831269409ecafbc94e99cdc0b9914e8690 /toolchain/helpers.mk
parent88d0bca0c103f1e8f2e0006948e0cf4860a35a21 (diff)
toolchain/external: check kernel headers version for custom toolchain
Ensure the kernel headers version used in the custom external toolchain, or the manually-specified kernel headers version, matches exactly the one selected by the user. We do not care about the patch-level, since headers are not supposed to change between patchlevels. This applies only to kernels >= 3.0, but those are actually the ones we do care about; we treat all 2.6.x kernels as being a single version, since we do not support any 2.6 kernels for packages with kernel-dependant features. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'toolchain/helpers.mk')
-rw-r--r--toolchain/helpers.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 892ab4bef..64d50951b 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -163,6 +163,19 @@ copy_toolchain_sysroot = \
find $(STAGING_DIR) -type d | xargs chmod 755
#
+# Check the specified kernel headers version actually matches the
+# version in the toolchain.
+#
+# $1: cross-gcc path
+# $2: kernel version string, in the form: X.Y
+#
+check_kernel_headers_version = \
+ if ! support/scripts/check-kernel-headers.sh $(1) $(2); then \
+ echo "Incorrect selection of kernel headers"; \
+ exit 1; \
+ fi
+
+#
# Check the availability of a particular glibc feature. This function
# is used to check toolchain options that are always supported by
# glibc, so we simply check that the corresponding option is properly