Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/8] toolchain/external-custom: hide versions too old for the current arch
Date: Sat, 7 Oct 2017 11:27:32 +0200	[thread overview]
Message-ID: <8dbdd051-e288-fd2d-433b-a441a9e4e6bc@gmail.com> (raw)
In-Reply-To: <a9dc18ece6b62e3ac4ce274b708081a9d16bb6aa.1504431850.git.yann.morin.1998@free.fr>

Hi Yann, All

Le 03/09/2017 ? 11:44, Yann E. MORIN a ?crit?:
> When an architecture expresses a requirement on the gcc version, limit
> the version choice in the custom external toolchain.
> 
> The ratioanle being that there is no point in offering that version to

rationale

> the user if we know before-hand that the gcc version will not work for
> that architecture.
> 
> All versions below the minimum we support is just made conditional to
> that minimum as well, including the "older" entry.
> 
> However, this means that the "older" entry is no longer available when
> the architecture requires a minimum gcc version. A user who wants to use
> a toolchain with a gcc older than the minimum will have no choice but to
> realise the toolchain is not suitable (or lie and we would catch that

realize

> when checking the gcc version anyway).
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> ---
> Note: this implies that it is no longer possible to use a custom
> external toolchain in which a specific core has been back-ported
> Thus, this patch may cause regressions in very specific and rare
> corner cases. Do we want to support those cases? If yes, then we
> should drop this patch.

This can be a problem for Linaro toolchains [1] where the GCC support for some
new cpu are backported. (Ok this example is moot since Buildroot doesn't support
these cpu).

Also since BR2_TOOLCHAIN_EXTERNAL_GCC_XXX is an user choice, we can print a
warning instead of completely disabling the gcc version ?

Best regards,
Romain

[1] https://releases.linaro.org/components/toolchain/binaries/5.4-2017.05/

> ---
>  .../toolchain-external-custom/Config.in.options           | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
> index ae343ddad5..eb7c30f171 100644
> --- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
> +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
> @@ -18,6 +18,11 @@ config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
>  
>  choice
>  	bool "External toolchain gcc version"
> +	default BR2_TOOLCHAIN_EXTERNAL_GCC_7   if BR2_ARCH_NEEDS_GCC_AT_LEAST_7
> +	default BR2_TOOLCHAIN_EXTERNAL_GCC_6   if BR2_ARCH_NEEDS_GCC_AT_LEAST_6
> +	default BR2_TOOLCHAIN_EXTERNAL_GCC_5   if BR2_ARCH_NEEDS_GCC_AT_LEAST_5
> +	default BR2_TOOLCHAIN_EXTERNAL_GCC_4_9 if BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9
> +	default BR2_TOOLCHAIN_EXTERNAL_GCC_4_8 if BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
>  	default BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
>  	help
>  	  Set to the gcc version that is used by your external
> @@ -29,42 +34,52 @@ config BR2_TOOLCHAIN_EXTERNAL_GCC_7
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GCC_6
>  	bool "6.x"
> +	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_7
>  	select BR2_TOOLCHAIN_GCC_AT_LEAST_6
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GCC_5
>  	bool "5.x"
> +	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_6
>  	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GCC_4_9
>  	bool "4.9.x"
> +	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_5
>  	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GCC_4_8
>  	bool "4.8.x"
> +	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_9
>  	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GCC_4_7
>  	bool "4.7.x"
> +	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
>  	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GCC_4_6
>  	bool "4.6.x"
> +	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
>  	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GCC_4_5
>  	bool "4.5.x"
> +	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
>  	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GCC_4_4
>  	bool "4.4.x"
> +	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
>  	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
>  	bool "4.3.x"
> +	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
>  	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GCC_OLD
>  	bool "older"
> +	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_4_8
>  	help
>  	  Use this option if your GCC version is older than any of the
>  	  above.
> 

  reply	other threads:[~2017-10-07  9:27 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-03  9:22 [Buildroot] [PATCH 0/5 v2] arch: not all have support in the internal backend Yann E. MORIN
2017-09-03  9:22 ` [Buildroot] [PATCH 1/5 v2] arch: add option to disable internal toolchain backend Yann E. MORIN
2017-09-03  9:22 ` [Buildroot] [PATCH 2/5 v2] arch/csky: internal backend not suitable Yann E. MORIN
2017-09-03  9:22 ` [Buildroot] [PATCH 3/5 v2] arch/mips: internal backend not suitable for some cores Yann E. MORIN
2017-09-03  9:22 ` [Buildroot] [PATCH 4/5 v2] arch/bfin: " Yann E. MORIN
2017-09-03  9:22 ` [Buildroot] [PATCH 5/5 v2] arc/bfin: remove 60x cores Yann E. MORIN
2017-09-03  9:44 ` [Buildroot] [PATCH 0/8] arch: some require a minimal gcc version Yann E. MORIN
2017-09-03  9:44   ` [Buildroot] [PATCH 1/8] arch: introduce minimal required " Yann E. MORIN
2017-10-07  9:59     ` Romain Naour
2017-10-07 10:26       ` Yann E. MORIN
2017-09-03  9:44   ` [Buildroot] [PATCH 2/8] package/gcc: hide versions too old for the current arch Yann E. MORIN
2017-09-03  9:44   ` [Buildroot] [PATCH 3/8] toolchain/external-custom: " Yann E. MORIN
2017-10-07  9:27     ` Romain Naour [this message]
2017-10-07 12:27       ` Yann E. MORIN
2017-09-03  9:44   ` [Buildroot] [PATCH 4/8] toolchain/external: " Yann E. MORIN
2017-10-07  9:57     ` Romain Naour
2017-10-07 12:15       ` Yann E. MORIN
2017-10-07 19:55         ` Romain Naour
2017-09-03  9:44   ` [Buildroot] [PATCH 5/8] arch/bfin: needs gcc >= 6 Yann E. MORIN
2017-09-03  9:44   ` [Buildroot] [PATCH 6/8] arch/mips: some variants need different gcc versions Yann E. MORIN
2017-09-03  9:44   ` [Buildroot] [PATCH 7/8] arch/arm: " Yann E. MORIN
2017-09-03  9:44   ` [Buildroot] [PATCH 8/8] package/gcc: slight cleanup and reorg in remaining arch depends Yann E. MORIN
2017-09-03  9:53   ` [Buildroot] [PATCH 0/3] arch: fix MIPS NaN and floating-point handling Yann E. MORIN
2017-09-03  9:53     ` [Buildroot] [PATCH 1/3] arch/mips: inverse the NaN logic Yann E. MORIN
2017-10-07 10:18       ` Romain Naour
2017-10-07 12:22         ` Yann E. MORIN
2017-10-07 18:43           ` Romain Naour
2017-09-03  9:53     ` [Buildroot] [PATCH 2/3] arch/mips: inverse the mfpxx logic Yann E. MORIN
2017-09-03  9:53     ` [Buildroot] [PATCH 3/3] toolchain/buildroot: glibc requires header >= 4.5 with NaN-2008 Yann E. MORIN
2017-09-03 13:17     ` [Buildroot] [pull request] arch/arm: add some new armv8a cores Yann E. MORIN
2017-09-03 13:17       ` [Buildroot] [PATCH 1/9] arch/arm: re-order cores choice Yann E. MORIN
2017-09-03 13:17       ` [Buildroot] [PATCH 2/9] arch/arm: simplify hiding non 64-bit cores Yann E. MORIN
2017-09-03 13:17       ` [Buildroot] [PATCH 3/9] arch/arm: armv8 is really armv8a Yann E. MORIN
2017-09-03 13:17       ` [Buildroot] [PATCH 4/9] arch/arm: do not allow soft-float for armv8a Yann E. MORIN
2017-09-04 17:21         ` Yann E. MORIN
2017-11-24 22:08           ` Thomas Petazzoni
2017-11-25 17:10             ` Arnout Vandecappelle
2017-11-26 11:12               ` Yann E. MORIN
2017-11-26 11:18                 ` Yann E. MORIN
2017-09-03 13:17       ` [Buildroot] [PATCH 5/9] arch/arm: add cortex-A32 Yann E. MORIN
2017-09-03 13:17       ` [Buildroot] [PATCH 6/9] arch/arm: add some armv8a cortex variants Yann E. MORIN
2017-09-03 13:17       ` [Buildroot] [PATCH 7/9] arch/arm: add some non-cortex armv8a cores Yann E. MORIN
2017-09-03 14:04         ` Thomas Petazzoni
2017-09-03 15:16           ` Yann E. MORIN
2017-09-03 13:17       ` [Buildroot] [PATCH 8/9] arch/arm: add armv8.1a cores Yann E. MORIN
2017-09-03 13:17       ` [Buildroot] [PATCH 9/9] [DON'T COMMIT] tests for all new arm cores Yann E. MORIN
2017-09-03 13:24       ` [Buildroot] [pull request] arch/arm: add some new armv8a cores Yann E. MORIN
2017-11-24 22:32       ` Thomas Petazzoni
2017-11-24 21:58     ` [Buildroot] [PATCH 0/3] arch: fix MIPS NaN and floating-point handling Thomas Petazzoni
2017-11-24 21:23   ` [Buildroot] [PATCH 0/8] arch: some require a minimal gcc version Thomas Petazzoni
2017-10-02 19:47 ` [Buildroot] [PATCH 0/5 v2] arch: not all have support in the internal backend Thomas Petazzoni

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=8dbdd051-e288-fd2d-433b-a441a9e4e6bc@gmail.com \
    --to=romain.naour@gmail.com \
    --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