Skip to content

Commit

Permalink
[Core] Squeeze AVR some more with -mrelax and -mcall-prologues (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlK90 authored Feb 27, 2022
1 parent cb8528c commit 156f056
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion platforms/avr/platform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ COMPILEFLAGS += -ffunction-sections
COMPILEFLAGS += -fdata-sections
COMPILEFLAGS += -fpack-struct
COMPILEFLAGS += -fshort-enums
COMPILEFLAGS += -mcall-prologues

# Linker relaxation is only possible if
# link time optimizations are not enabled.
ifeq ($(strip $(LTO_ENABLE)), no)
COMPILEFLAGS += -mrelax
endif

ASFLAGS += $(AVR_ASFLAGS)

Expand All @@ -28,7 +35,7 @@ CFLAGS += -fno-strict-aliasing
CXXFLAGS += $(COMPILEFLAGS)
CXXFLAGS += -fno-exceptions -std=c++11

LDFLAGS +=-Wl,--gc-sections
LDFLAGS += -Wl,--gc-sections

OPT_DEFS += -DF_CPU=$(F_CPU)UL

Expand Down

0 comments on commit 156f056

Please sign in to comment.