mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
8deb885ce3
Don’t allow the compiler to convert malloc + memset into calloc, causing a recursive call in _calloc_r. Fixes crash when building with -O2 optimization level.
25 lines
616 B
Makefile
25 lines
616 B
Makefile
|
|
ifdef CONFIG_SPIRAM_CACHE_WORKAROUND
|
|
LIBC_PATH := $(COMPONENT_PATH)/lib/libc-psram-workaround.a
|
|
LIBM_PATH := $(COMPONENT_PATH)/lib/libm-psram-workaround.a
|
|
|
|
else
|
|
|
|
ifdef CONFIG_NEWLIB_NANO_FORMAT
|
|
LIBC_PATH := $(COMPONENT_PATH)/lib/libc_nano.a
|
|
else
|
|
LIBC_PATH := $(COMPONENT_PATH)/lib/libc.a
|
|
endif # CONFIG_NEWLIB_NANO_FORMAT
|
|
|
|
LIBM_PATH := $(COMPONENT_PATH)/lib/libm.a
|
|
|
|
endif # CONFIG_SPIRAM_CACHE_WORKAROUND
|
|
|
|
COMPONENT_ADD_LDFLAGS := $(LIBC_PATH) $(LIBM_PATH) -lnewlib
|
|
|
|
COMPONENT_ADD_LINKER_DEPS := $(LIBC_PATH) $(LIBM_PATH)
|
|
|
|
COMPONENT_ADD_INCLUDEDIRS := platform_include include
|
|
|
|
syscalls.o: CFLAGS += -fno-builtin
|