From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] toolchain/toolchain-external: fix call to check_kernel_headers_version
Date: Sat, 21 Mar 2020 15:47:26 +0100 [thread overview]
Message-ID: <20200321144726.GA4290@scaer> (raw)
In-Reply-To: <20200321135220.341529-1-thomas.petazzoni@bootlin.com>
Thomas, All,
On 2020-03-21 14:52 +0100, Thomas Petazzoni spake thusly:
> 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>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
> index b01082aadd..8667d7ddf6 100644
> --- a/toolchain/toolchain-external/pkg-toolchain-external.mk
> +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
> @@ -540,7 +540,7 @@ define $(2)_CONFIGURE_CMDS
> $$(Q)$$(call check_unusable_toolchain,$$(TOOLCHAIN_EXTERNAL_CC))
> $$(Q)SYSROOT_DIR="$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC))" ; \
> $$(call check_kernel_headers_version,\
> - $$(BUILD_DIR)\
> + $$(BUILD_DIR),\
> $$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC)),\
> $$(call qstrip,$$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)),\
> $$(if $$(BR2_TOOLCHAIN_EXTERNAL_CUSTOM),loose,strict)); \
> --
> 2.25.1
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2020-03-21 14:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-21 13:52 [Buildroot] [PATCH] toolchain/toolchain-external: fix call to check_kernel_headers_version Thomas Petazzoni
2020-03-21 13:52 ` [Buildroot] [PATCH] support/scripts/check-kernel-headers.sh: do not print error for loose checks Thomas Petazzoni
2020-03-21 14:48 ` Yann E. MORIN
2020-04-06 15:19 ` Peter Korsgaard
2020-03-21 14:47 ` Yann E. MORIN [this message]
2020-04-06 15:16 ` [Buildroot] [PATCH] toolchain/toolchain-external: fix call to check_kernel_headers_version Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200321144726.GA4290@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox