Skip to content

Commit e7d72b1

Browse files
committed
Use libgcc from Arch on SAMD21 (it's smaller.)
Fixes #4705
1 parent eb7ddf5 commit e7d72b1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ports/atmel-samd/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ CFLAGS += \
164164
-msoft-float \
165165
-mfloat-abi=soft \
166166
-DSAMD21
167+
LIBS := libs/libgcc-12.1.0-Os-v6-m-nofp.a -lc
168+
else
169+
LIBS := -lgcc -lc
167170
endif
168171
ifeq ($(CHIP_FAMILY), samd51)
169172
CFLAGS += \
@@ -200,7 +203,6 @@ endif
200203
CFLAGS += -Wno-stringop-overread -Wno-stringop-overflow
201204

202205
LDFLAGS = $(CFLAGS) -nostartfiles -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
203-
LIBS := -lgcc -lc
204206

205207
# Use toolchain libm if we're not using our own.
206208
ifndef INTERNAL_LIBM
Binary file not shown.

0 commit comments

Comments
 (0)