mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
newlib: disable some optimizations for syscalls.c
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.
This commit is contained in:
parent
0d7f2d77c2
commit
8deb885ce3
@ -30,3 +30,5 @@ register_component()
|
||||
|
||||
target_link_libraries(newlib "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib")
|
||||
target_link_libraries(newlib ${LIBC} ${LIBM})
|
||||
|
||||
set_source_files_properties(syscalls.c PROPERTIES COMPILE_FLAGS -fno-builtin)
|
||||
|
@ -20,3 +20,5 @@ 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user