toolchain/internal: check kernel headers version for manually-specified version

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>
This commit is contained in:
Yann E. MORIN 2014-03-01 15:53:02 +01:00 committed by Thomas Petazzoni
parent a5a309642a
commit 2a5cf5e723

View 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))