* [Buildroot] [PATCH 1/1] support/scripts/gen-bootlin-toolchains: generate BR2_ARCH_NEEDS_GCC_AT_LEAST_X guard
@ 2023-08-13 4:59 Vincent Fazio
2023-08-13 16:09 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Fazio @ 2023-08-13 4:59 UTC (permalink / raw)
To: buildroot; +Cc: Vincent Fazio, Thomas Petazzoni
Previously, gen-bootlin-toolchains did not add a `depends` guard to
limit the available toolchains based on the minimum required GCC version
for the user selected CPU tuning.
Now, the proper BR2_ARCH_NEEDS_GCC_AT_LEAST_X guard will be added based
on the version of GCC provided by the toolchain.
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
support/scripts/gen-bootlin-toolchains | 2 ++
1 file changed, 2 insertions(+)
diff --git a/support/scripts/gen-bootlin-toolchains b/support/scripts/gen-bootlin-toolchains
index 23ebfbdce9..4344221213 100755
--- a/support/scripts/gen-bootlin-toolchains
+++ b/support/scripts/gen-bootlin-toolchains
@@ -338,6 +338,8 @@ class Toolchain:
m = re.match("^BR2_TOOLCHAIN_EXTERNAL_GCC_([0-9_]*)=y$", frag)
assert m, "Cannot get gcc version for toolchain %s" % self.fname_prefix
selects.append("BR2_TOOLCHAIN_GCC_AT_LEAST_%s" % m[1])
+ # respect the GCC requirement for the selected CPU/arch tuning
+ depends.append("!BR2_ARCH_NEEDS_GCC_AT_LEAST_%s" % str(int(m[1]) + 1))
# kernel headers version
if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HEADERS_"):
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] support/scripts/gen-bootlin-toolchains: generate BR2_ARCH_NEEDS_GCC_AT_LEAST_X guard
2023-08-13 4:59 [Buildroot] [PATCH 1/1] support/scripts/gen-bootlin-toolchains: generate BR2_ARCH_NEEDS_GCC_AT_LEAST_X guard Vincent Fazio
@ 2023-08-13 16:09 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2023-08-13 16:09 UTC (permalink / raw)
To: Vincent Fazio; +Cc: Thomas Petazzoni, buildroot
Vincent, All,
On 2023-08-12 23:59 -0500, Vincent Fazio spake thusly:
> Previously, gen-bootlin-toolchains did not add a `depends` guard to
> limit the available toolchains based on the minimum required GCC version
> for the user selected CPU tuning.
>
> Now, the proper BR2_ARCH_NEEDS_GCC_AT_LEAST_X guard will be added based
> on the version of GCC provided by the toolchain.
>
> Signed-off-by: Vincent Fazio <vfazio@gmail.com>
s for the other external toolchains, this is a fix, so I applied to
master.
I did regenerate the toolchains, after adding a litle temporary kludge
so that the latest Bootlin toolchain version was ignored.
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> support/scripts/gen-bootlin-toolchains | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/support/scripts/gen-bootlin-toolchains b/support/scripts/gen-bootlin-toolchains
> index 23ebfbdce9..4344221213 100755
> --- a/support/scripts/gen-bootlin-toolchains
> +++ b/support/scripts/gen-bootlin-toolchains
> @@ -338,6 +338,8 @@ class Toolchain:
> m = re.match("^BR2_TOOLCHAIN_EXTERNAL_GCC_([0-9_]*)=y$", frag)
> assert m, "Cannot get gcc version for toolchain %s" % self.fname_prefix
> selects.append("BR2_TOOLCHAIN_GCC_AT_LEAST_%s" % m[1])
> + # respect the GCC requirement for the selected CPU/arch tuning
> + depends.append("!BR2_ARCH_NEEDS_GCC_AT_LEAST_%s" % str(int(m[1]) + 1))
>
> # kernel headers version
> if frag.startswith("BR2_TOOLCHAIN_EXTERNAL_HEADERS_"):
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-13 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-13 4:59 [Buildroot] [PATCH 1/1] support/scripts/gen-bootlin-toolchains: generate BR2_ARCH_NEEDS_GCC_AT_LEAST_X guard Vincent Fazio
2023-08-13 16:09 ` 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