Skip to content

Fix SAMD51 builds on GCC11.2 #6128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ports/atmel-samd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ CFLAGS += \
-DSAM_D5X_E5X -DSAME51
endif


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

LDFLAGS = $(CFLAGS) -nostartfiles -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,[email protected] -Wl,-cref -Wl,-gc-sections -specs=nano.specs
LDFLAGS += -flto=$(shell $(NPROC))
Expand Down