arch/Config.in: introduce BR2_ARCH_NEEDS_GCC_AT_LEAST_16
gcc 15 was introduced in Buildroot in commit [1]. In Buildroot, a user creates a build configuration in Kconfig menus by selecting the CPU architecture and CPU first, then a toolchain that support this CPU, then packages and system configuration. To make sure those Kconfig menus and choices behave correctly in that order, we use a logic in which a CPU selects the Kconfig symbol BR2_ARCH_NEEDS_GCC_AT_LEAST_N (with N being the needed gcc version). Then, to make sure unsupported gcc version are hidden for a selected CPU, a gcc version N has in fact a "depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_(N+1)". For example, Cortex-A710 needs at least gcc 12. See [2] and [3]. This means that when we introduce the latest gcc version with this logic in place, we already need this BR2_ARCH_NEEDS_GCC_AT_LEAST_(N+1) symbol defined. Doing so is desirable to avoid forgetting to add it later. See for example commit [4], adding those missing dependencies for gcc 13 and 14. Since in Buildroot we currently keep 3 actively maintained gcc versions, adding a new gcc version N in Buildroot should: - add the BR2_ARCH_NEEDS_GCC_AT_LEAST_(N+1) symbol - add package/gcc N - switch the default gcc from N-2 to N-1 - drop package/gcc N-3 Then, once this new gcc N is added, new CPUs supported by that version can be introduced, by selecting BR2_ARCH_NEEDS_GCC_AT_LEAST_N. All this logic will be ready for future gcc versions. This was also described in commit log [5]. This commit simply adds the BR2_ARCH_NEEDS_GCC_AT_LEAST_16 symbol. It is worth mentioning that, at the time of this commit, gcc 16 is not released yet. This release number 16 is already known, though. See [6]. For reference, this was discussed in [7]. [1]75891397ab[2] https://gitlab.com/buildroot.org/buildroot/-/blob/2025.05/arch/Config.in.arm#L514 [3] https://gitlab.com/buildroot.org/buildroot/-/blob/2025.05/package/gcc/Config.in.host#L27 [4]6f231d3003[5]eab17d763c[6] https://gcc.gnu.org/gcc-16/changes.html [7] https://lore.kernel.org/buildroot/877c0v1sn1.fsf@dell.be.48ers.dk/T/#m45688e25632401029e4c0d989072e1d3e1a59854 Signed-off-by: Julien Olivain <ju.o@free.fr> Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
committed by
Romain Naour
parent
533c0aac28
commit
7724268034
@@ -311,6 +311,10 @@ config BR2_ARCH_NEEDS_GCC_AT_LEAST_15
|
||||
bool
|
||||
select BR2_ARCH_NEEDS_GCC_AT_LEAST_14
|
||||
|
||||
config BR2_ARCH_NEEDS_GCC_AT_LEAST_16
|
||||
bool
|
||||
select BR2_ARCH_NEEDS_GCC_AT_LEAST_15
|
||||
|
||||
# The following string values are defined by the individual
|
||||
# Config.in.$ARCH files
|
||||
config BR2_ARCH
|
||||
|
||||
Reference in New Issue
Block a user