toolchain/internal: check kernel headers version for manually-specified version
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 1 Mar 2014 14:53:02 +0000 (15:53 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 1 Mar 2014 18:47:39 +0000 (19:47 +0100)
Ensure the kernel headers version matches exactly the one manually
specified by the user.

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>
package/linux-headers/linux-headers.mk

index 49fd9ca6d42a3d86d236358e6bb08d2e40d046f1..2361e40ac7dea8cb80b77e7b52f65a42744ea2a2 100644 (file)
@@ -37,4 +37,13 @@ define LINUX_HEADERS_INSTALL_STAGING_CMDS
                        headers_install)
 endef
 
+ifeq ($(BR2_KERNEL_HEADERS_VERSION),y)
+define LINUX_HEADERS_CHECK_VERSION
+       $(call check_kernel_headers_version,\
+               "$(TARGET_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)",\
+               $(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)))
+endef
+LINUX_HEADERS_POST_INSTALL_STAGING_HOOKS += LINUX_HEADERS_CHECK_VERSION
+endif
+
 $(eval $(generic-package))