From 9eb3741dee16075f57ca074401a3ec3b37a89a92 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 13 Oct 2022 12:48:44 +0200 Subject: [PATCH] makefiles/arch/avr8.inc.mk: fix detection of GCC 12 --- makefiles/arch/avr8.inc.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/makefiles/arch/avr8.inc.mk b/makefiles/arch/avr8.inc.mk index f47a2e35a7..ef55b40af3 100644 --- a/makefiles/arch/avr8.inc.mk +++ b/makefiles/arch/avr8.inc.mk @@ -39,7 +39,9 @@ OPTIONAL_CFLAGS_BLACKLIST += -Wformat-overflow OPTIONAL_CFLAGS_BLACKLIST += -Wformat-truncation OPTIONAL_CFLAGS_BLACKLIST += -gz -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523 -ifneq ($(findstring 12.,$(shell $(CC) --version 2>/dev/null)),) - CFLAGS += --param=min-pagesize=0 +ifeq ($(TOOLCHAIN),gnu) + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523 + ifneq ($(findstring 12.,$(shell $(TARGET_ARCH)-gcc --version 2>/dev/null)),) + CFLAGS += --param=min-pagesize=0 + endif endif