From cca8d68461e6b49b4751dd4134fb8d574e5192db Mon Sep 17 00:00:00 2001 From: Julien Olivain Date: Thu, 20 Mar 2025 23:35:49 +0100 Subject: [PATCH] Config.in: introduce BR2_HOST_GCC_AT_LEAST_{12..15} Fedora 42 is planned to be released on 2025-04-22 [1]. It is also planned to include the upcoming gcc 15 release. Gcc 15 is changing the default C language from -std=gnu17 to -std=gnu23 [2]. This change is expected to possibly introduce build failures [3]. In order to be prepared to fix those, this commit introduces the BR2_HOST_GCC_AT_LEAST_{12..15} symbols. [1] https://fedorapeople.org/groups/schedule/f-42/f-42-key-tasks.html [2] https://gcc.gnu.org/gcc-15/changes.html#c [3] https://savannah.gnu.org/support/?111150 Signed-off-by: Julien Olivain Signed-off-by: Thomas Petazzoni --- Config.in | 20 ++++++++++++++++++++ Makefile | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Config.in b/Config.in index a543091d4f..d730f2034b 100644 --- a/Config.in +++ b/Config.in @@ -74,6 +74,26 @@ config BR2_HOST_GCC_AT_LEAST_11 default y if BR2_HOST_GCC_VERSION = "11" select BR2_HOST_GCC_AT_LEAST_10 +config BR2_HOST_GCC_AT_LEAST_12 + bool + default y if BR2_HOST_GCC_VERSION = "12" + select BR2_HOST_GCC_AT_LEAST_11 + +config BR2_HOST_GCC_AT_LEAST_13 + bool + default y if BR2_HOST_GCC_VERSION = "13" + select BR2_HOST_GCC_AT_LEAST_12 + +config BR2_HOST_GCC_AT_LEAST_14 + bool + default y if BR2_HOST_GCC_VERSION = "14" + select BR2_HOST_GCC_AT_LEAST_13 + +config BR2_HOST_GCC_AT_LEAST_15 + bool + default y if BR2_HOST_GCC_VERSION = "15" + select BR2_HOST_GCC_AT_LEAST_14 + # When adding new entries above, be sure to update # the HOSTCC_MAX_VERSION variable in the Makefile. diff --git a/Makefile b/Makefile index 5bf5abfe3b..411e1de515 100644 --- a/Makefile +++ b/Makefile @@ -353,7 +353,7 @@ export HOSTARCH := $(shell LC_ALL=C $(HOSTCC_NOCCACHE) -v 2>&1 | \ # When adding a new host gcc version in Config.in, # update the HOSTCC_MAX_VERSION variable: -HOSTCC_MAX_VERSION := 11 +HOSTCC_MAX_VERSION := 15 HOSTCC_VERSION := $(shell V=$$($(HOSTCC_NOCCACHE) --version | \ sed -n -r 's/^.* ([0-9]*)\.([0-9]*)\.([0-9]*)[ ]*.*/\1 \2/p'); \