toolchain-external: do not pass TOOLCHAIN_EXTERNAL_CFLAGS for kernel headers check
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 1 Jun 2014 10:47:39 +0000 (12:47 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 9 Jun 2014 13:37:54 +0000 (15:37 +0200)
When getting the sysroot used for the kernel headers version check,
passing TOOLCHAIN_EXTERNAL_CFLAGS causes a problem when used with
multilib toolchains, where only the main sysroot has the header files,
and the other sysroots only have the libraries.

Since the kernel headers version used is normally the same for all
sysroots, this commit solves this problem by removing the
TOOLCHAIN_EXTERNAL_CFLAGS argument when calling
toolchain_find_sysroot, so that it returns the main sysroot, in which
<linux/version.h> can be found for the kernel headers version check.

Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
toolchain/toolchain-external/toolchain-external.mk

index 70781db0ff9dcb544b1bde621081c34b4968a7c5..6816b3ffa381a216607dee66618c7e90031dd623 100644 (file)
@@ -467,7 +467,7 @@ define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
                exit 1 ; \
        fi ; \
        $(call check_kernel_headers_version,\
-               $(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)),\
+               $(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC)),\
                $(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \
        if test "$(BR2_arm)" = "y" ; then \
                $(call check_arm_abi,\