Skip to content

Commit 3089c9b

Browse files
authored
Merge pull request #6128 from tannewt/gcc11_stringop
Fix SAMD51 builds on GCC11.2
2 parents 03c54a9 + 4ac6ef0 commit 3089c9b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ports/atmel-samd/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@ CFLAGS += \
197197
-DSAM_D5X_E5X -DSAME51
198198
endif
199199

200-
200+
# GCC 11 adds stringop bounds checks that trigger when writing a memory region
201+
# we know is ok. It's not clear how to give the compiler the info it needs so
202+
# disable the checks for now.
203+
# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578
204+
CFLAGS += -Wno-stringop-overread -Wno-stringop-overflow
201205

202206
LDFLAGS = $(CFLAGS) -nostartfiles -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
203207
LDFLAGS += -flto=$(shell $(NPROC))

0 commit comments

Comments
 (0)