* [Buildroot] [PATCH] toolchain/custom: hide away incompatible gcc versions
@ 2021-09-19 11:45 Yann E. MORIN
2021-09-19 12:02 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2021-09-19 11:45 UTC (permalink / raw)
To: buildroot
Cc: Thomas De Schampheleire, Romain Naour, Giulio Benetti,
Yann E. MORIN, Thomas Petazzoni
Some CPUs have a requirement on a minimal gcc version. Until now, ot was
possible to use a custom external toolchain that has a gcc older than
the requirement, which would lead to build failures (early!) during the
build.
Propagate the gcc version requirement down to the external toolchain gcc
version choice. By limiting the selection to acceptable gcc versions, we
inform the user that its toolchain is too old, and if they decide to lie
and select one of available version, we still check that when we extract
and install their toolchain.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
---
.../Config.in.options | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
index ae78c0ef9e..99d5b7df42 100644
--- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
+++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
@@ -31,60 +31,78 @@ choice
Set to the gcc version that is used by your external
toolchain.
+ If the gcc version in your toolchain is not available below,
+ then your toolchain is too old to be used in the current
+ configuration (e.g. your CPU requires a more recent gcc
+ version).
+
config BR2_TOOLCHAIN_EXTERNAL_GCC_11
bool "11.x"
select BR2_TOOLCHAIN_GCC_AT_LEAST_11
config BR2_TOOLCHAIN_EXTERNAL_GCC_10
bool "10.x"
+ depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_11
select BR2_TOOLCHAIN_GCC_AT_LEAST_10
config BR2_TOOLCHAIN_EXTERNAL_GCC_9
bool "9.x"
+ depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_10
select BR2_TOOLCHAIN_GCC_AT_LEAST_9
config BR2_TOOLCHAIN_EXTERNAL_GCC_8
bool "8.x"
+ depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_9
select BR2_TOOLCHAIN_GCC_AT_LEAST_8
config BR2_TOOLCHAIN_EXTERNAL_GCC_7
bool "7.x"
+ depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_8
select BR2_TOOLCHAIN_GCC_AT_LEAST_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
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] toolchain/custom: hide away incompatible gcc versions
2021-09-19 11:45 [Buildroot] [PATCH] toolchain/custom: hide away incompatible gcc versions Yann E. MORIN
@ 2021-09-19 12:02 ` Thomas Petazzoni
2021-09-19 12:28 ` Yann E. MORIN
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2021-09-19 12:02 UTC (permalink / raw)
To: Yann E. MORIN
Cc: Giulio Benetti, Romain Naour, Thomas De Schampheleire, buildroot
Hello,
On Sun, 19 Sep 2021 13:45:47 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> Some CPUs have a requirement on a minimal gcc version. Until now, ot was
> possible to use a custom external toolchain that has a gcc older than
> the requirement, which would lead to build failures (early!) during the
> build.
>
> Propagate the gcc version requirement down to the external toolchain gcc
> version choice. By limiting the selection to acceptable gcc versions, we
> inform the user that its toolchain is too old, and if they decide to lie
> and select one of available version, we still check that when we extract
> and install their toolchain.
I think there was a reason to not have these for external toolchains:
they can use patched gcc versions that support newer CPU cores that are
normally not supported in the same gcc upstream version. It was for
example the case I believe at some point for Linaro toolchains.
This argument is not necessarily a strong disagreement against your
patch, I'm just stating why I believe we hadn't done that in the past.
BTW, has there been some recent issue that prompted you to write/submit
this change ?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] toolchain/custom: hide away incompatible gcc versions
2021-09-19 12:02 ` Thomas Petazzoni
@ 2021-09-19 12:28 ` Yann E. MORIN
0 siblings, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2021-09-19 12:28 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Giulio Benetti, Romain Naour, Thomas De Schampheleire, buildroot
Thomas, All,
On 2021-09-19 14:02 +0200, Thomas Petazzoni spake thusly:
> On Sun, 19 Sep 2021 13:45:47 +0200
> "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > Some CPUs have a requirement on a minimal gcc version. Until now, ot was
> > possible to use a custom external toolchain that has a gcc older than
> > the requirement, which would lead to build failures (early!) during the
> > build.
> >
> > Propagate the gcc version requirement down to the external toolchain gcc
> > version choice. By limiting the selection to acceptable gcc versions, we
> > inform the user that its toolchain is too old, and if they decide to lie
> > and select one of available version, we still check that when we extract
> > and install their toolchain.
>
> I think there was a reason to not have these for external toolchains:
> they can use patched gcc versions that support newer CPU cores that are
> normally not supported in the same gcc upstream version. It was for
> example the case I believe at some point for Linaro toolchains.
>
> This argument is not necessarily a strong disagreement against your
> patch, I'm just stating why I believe we hadn't done that in the past.
OK, I see the point, and I agree.
> BTW, has there been some recent issue that prompted you to write/submit
> this change ?
No. I was looking at the mips CPUs entries, and I was just looking where
all those BR2_ARCH_NEEDS_GCC_AT_LEAST_xxx were used, and suddenly my two
neurons collided one with the other, and made me check the custom
toolchains...
But OK, as I was also one to lift some custom toolchain limitations to
account for backported features, the current situation is fine.
I'll drop my patch.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-19 12:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-19 11:45 [Buildroot] [PATCH] toolchain/custom: hide away incompatible gcc versions Yann E. MORIN
2021-09-19 12:02 ` Thomas Petazzoni
2021-09-19 12:28 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox