Skip to content

Commit

Permalink
Generalize AVR -Werror=array-bounds workaround (qmk#21798)
Browse files Browse the repository at this point in the history
GCC 13 needs the same workaround as GCC 12.
To avoid having to maintain an ever-growing list of broken versions
apply the workaround wherever it can be used.

If at some point a fixed version of GCC is released the workaround can
be disabled for those fixed versions.

See qmk#17064
  • Loading branch information
t-8ch authored and FlynnD273 committed Aug 23, 2023
1 parent a11e4c7 commit 627cc7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions platforms/avr/platform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ HEX = $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature
EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT)
BIN =

# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
ifneq ($(findstring 12.,$(shell avr-gcc --version 2>/dev/null)),)
ifeq ("$(shell echo "int main(){}" | $(CC) --param=min-pagesize=0 -x c - -o /dev/null 2>&1)", "")
COMPILEFLAGS += --param=min-pagesize=0
endif

Expand Down

0 comments on commit 627cc7b

Please sign in to comment.