Skip to content

Commit

Permalink
avr: Fix compiling with GCC 13
Browse files Browse the repository at this point in the history
Apply the CFLAGS workaround for GCC 13.

The issue is fixed in GCC 14, so only 12 and 13 are affected.

Ref: 84fe76c ("avr: Fix compiling with GCC 12")
Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
Signed-off-by: Tim Crawford <[email protected]>
  • Loading branch information
crawfxrd committed Oct 6, 2023
1 parent 166e039 commit a3fb9e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/arch/avr/toolchain.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ CFLAGS += -MMD -Os -fstack-usage -Wall -Werror \
-Wl,--gc-sections -Wl,-u,vfprintf -lprintf_flt

# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
ifneq ($(findstring 12.,$(shell avr-gcc --version 2>/dev/null)),)
_gcc_version = $(shell avr-gcc --version 2>/dev/null)
ifneq ($(findstring 12.,$(_gcc_version)),)
CFLAGS += --param=min-pagesize=0
else ifneq ($(findstring 13.,$(_gcc_version)),)
CFLAGS += --param=min-pagesize=0
endif

Expand Down

0 comments on commit a3fb9e1

Please sign in to comment.