kumquat-buildroot/toolchain
Thomas Petazzoni 96f8d0bb46 toolchain/toolchain-external: fix call to check_kernel_headers_version
The external toolchain configure step calls the
check_kernel_headers_version make function to compare the kernel
headers version declared in the configuration with the actual kernel
headers of the toolchain.

This function takes 4 arguments, but due to a missing comma what
should be the first two arguments are both passed into the first
argument. Due to this, when check_kernel_headers_version does:

	if ! support/scripts/check-kernel-headers.sh $(1) $(2) $(3) \
		$(if $(BR2_TOOLCHAIN_HEADERS_LATEST),$(4),strict); \

Then:

  $(1) contains "$(BUILD_DIR) $$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC))"
  $(2) contains "$$(call qstrip,$$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))"
  $(3) contains "$$(if $$(BR2_TOOLCHAIN_EXTERNAL_CUSTOM),loose,strict))"

So from the point of view of check-kernel-headers.sh, it already has
four arguments, and therefore the additional argument passed by:

   $(if $(BR2_TOOLCHAIN_HEADERS_LATEST),$(4),strict); \

is ignored, defeating the $(BR2_TOOLCHAIN_HEADERS_LATEST) test.

The practical consequence is that a toolchain that has 5.4 kernel
headers but declared as using 5.3 kernel headers does not abort the
build, because the check is considered "loose" while it should be
"strict".

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-03-21 15:39:24 +01:00
..
toolchain
toolchain-buildroot toolchain/toolchain-buildroot: allow ARC big endian glibc builds 2019-12-06 22:16:23 +01:00
toolchain-external toolchain/toolchain-external: fix call to check_kernel_headers_version 2020-03-21 15:39:24 +01:00
Config.in toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_93847 2020-02-26 21:56:25 +01:00
helpers.mk toolchain: allow using custom headers newer than latest known ones 2020-02-08 20:25:10 +01:00
toolchain-wrapper.c toolchain: use consistent code style for C code 2020-02-08 22:10:06 +01:00
toolchain-wrapper.mk toolchain/toolchain-wrapper: handle __{BASE_,}FILE__ macro for reproducibility 2020-01-06 23:24:52 +01:00
toolchain.mk