cpu/atmega_common: activate wrapper functions when linking

This commit is contained in:
Gunar Schorcht 2019-08-12 17:50:59 +02:00 committed by Schorcht
parent f52162bcb0
commit d84f75b4d0

View File

@ -41,6 +41,9 @@ LDSCRIPT_COMPAT = $(if $(shell $(TARGET_ARCH)-ld --verbose | grep __TEXT_REGION_
-T$(RIOTCPU)/$(CPU)/ldscripts_compat/avr_2.26.ld)
LINKFLAGS += $(LDSCRIPT_COMPAT)
# use the wrapper functions for following avr-libc functions
LINKFLAGS += -Wl,-wrap=malloc -Wl,-wrap=calloc -Wl,-wrap=realloc -Wl,-wrap=free
ifeq ($(LTO),1)
# avr-gcc <4.8.3 has a bug when using LTO which causes a warning to be printed always:
# '_vector_25' appears to be a misspelled signal handler [enabled by default]