mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(tools): do not use builtin memcpy/memset/strcpy on xtensa chips
Closes https://github.com/espressif/esp-idf/issues/13228
This commit is contained in:
parent
35630f5e52
commit
df5d0be767
@ -7,10 +7,15 @@ set(CMAKE_CXX_COMPILER xtensa-esp32-elf-g++)
|
|||||||
set(CMAKE_ASM_COMPILER xtensa-esp32-elf-gcc)
|
set(CMAKE_ASM_COMPILER xtensa-esp32-elf-gcc)
|
||||||
set(_CMAKE_TOOLCHAIN_PREFIX xtensa-esp32-elf-)
|
set(_CMAKE_TOOLCHAIN_PREFIX xtensa-esp32-elf-)
|
||||||
|
|
||||||
|
remove_duplicated_flags("-mlongcalls -Wno-frame-address \
|
||||||
remove_duplicated_flags("-mlongcalls -Wno-frame-address ${CMAKE_C_FLAGS}" UNIQ_CMAKE_C_FLAGS)
|
-fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero \
|
||||||
|
-fno-builtin-stpcpy -fno-builtin-strncpy \
|
||||||
|
${CMAKE_C_FLAGS}" UNIQ_CMAKE_C_FLAGS)
|
||||||
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}" CACHE STRING "C Compiler Base Flags" FORCE)
|
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}" CACHE STRING "C Compiler Base Flags" FORCE)
|
||||||
remove_duplicated_flags("-mlongcalls -Wno-frame-address ${CMAKE_CXX_FLAGS}" UNIQ_CMAKE_CXX_FLAGS)
|
remove_duplicated_flags("-mlongcalls -Wno-frame-address \
|
||||||
|
-fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero \
|
||||||
|
-fno-builtin-stpcpy -fno-builtin-strncpy \
|
||||||
|
${CMAKE_CXX_FLAGS}" UNIQ_CMAKE_CXX_FLAGS)
|
||||||
set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}" CACHE STRING "C++ Compiler Base Flags" FORCE)
|
set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}" CACHE STRING "C++ Compiler Base Flags" FORCE)
|
||||||
remove_duplicated_flags("-mlongcalls ${CMAKE_ASM_FLAGS}" UNIQ_CMAKE_ASM_FLAGS)
|
remove_duplicated_flags("-mlongcalls ${CMAKE_ASM_FLAGS}" UNIQ_CMAKE_ASM_FLAGS)
|
||||||
set(CMAKE_ASM_FLAGS "${UNIQ_CMAKE_ASM_FLAGS}" CACHE STRING "ASM Compiler Base Flags" FORCE)
|
set(CMAKE_ASM_FLAGS "${UNIQ_CMAKE_ASM_FLAGS}" CACHE STRING "ASM Compiler Base Flags" FORCE)
|
||||||
|
@ -7,9 +7,15 @@ set(CMAKE_CXX_COMPILER xtensa-esp32s2-elf-g++)
|
|||||||
set(CMAKE_ASM_COMPILER xtensa-esp32s2-elf-gcc)
|
set(CMAKE_ASM_COMPILER xtensa-esp32s2-elf-gcc)
|
||||||
set(_CMAKE_TOOLCHAIN_PREFIX xtensa-esp32s2-elf-)
|
set(_CMAKE_TOOLCHAIN_PREFIX xtensa-esp32s2-elf-)
|
||||||
|
|
||||||
remove_duplicated_flags("-mlongcalls ${CMAKE_C_FLAGS}" UNIQ_CMAKE_C_FLAGS)
|
remove_duplicated_flags("-mlongcalls \
|
||||||
|
-fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero \
|
||||||
|
-fno-builtin-stpcpy -fno-builtin-strncpy \
|
||||||
|
${CMAKE_C_FLAGS}" UNIQ_CMAKE_C_FLAGS)
|
||||||
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}" CACHE STRING "C Compiler Base Flags" FORCE)
|
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}" CACHE STRING "C Compiler Base Flags" FORCE)
|
||||||
remove_duplicated_flags("-mlongcalls ${CMAKE_CXX_FLAGS}" UNIQ_CMAKE_CXX_FLAGS)
|
remove_duplicated_flags("-mlongcalls \
|
||||||
|
-fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero \
|
||||||
|
-fno-builtin-stpcpy -fno-builtin-strncpy \
|
||||||
|
${CMAKE_CXX_FLAGS}" UNIQ_CMAKE_CXX_FLAGS)
|
||||||
set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}" CACHE STRING "C++ Compiler Base Flags" FORCE)
|
set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}" CACHE STRING "C++ Compiler Base Flags" FORCE)
|
||||||
remove_duplicated_flags("-mlongcalls ${CMAKE_ASM_FLAGS}" UNIQ_CMAKE_ASM_FLAGS)
|
remove_duplicated_flags("-mlongcalls ${CMAKE_ASM_FLAGS}" UNIQ_CMAKE_ASM_FLAGS)
|
||||||
set(CMAKE_ASM_FLAGS "${UNIQ_CMAKE_ASM_FLAGS}" CACHE STRING "ASM Compiler Base Flags" FORCE)
|
set(CMAKE_ASM_FLAGS "${UNIQ_CMAKE_ASM_FLAGS}" CACHE STRING "ASM Compiler Base Flags" FORCE)
|
||||||
|
@ -7,9 +7,15 @@ set(CMAKE_CXX_COMPILER xtensa-esp32s3-elf-g++)
|
|||||||
set(CMAKE_ASM_COMPILER xtensa-esp32s3-elf-gcc)
|
set(CMAKE_ASM_COMPILER xtensa-esp32s3-elf-gcc)
|
||||||
set(_CMAKE_TOOLCHAIN_PREFIX xtensa-esp32s3-elf-)
|
set(_CMAKE_TOOLCHAIN_PREFIX xtensa-esp32s3-elf-)
|
||||||
|
|
||||||
remove_duplicated_flags("-mlongcalls ${CMAKE_C_FLAGS}" UNIQ_CMAKE_C_FLAGS)
|
remove_duplicated_flags("-mlongcalls \
|
||||||
|
-fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero \
|
||||||
|
-fno-builtin-stpcpy -fno-builtin-strncpy \
|
||||||
|
${CMAKE_C_FLAGS}" UNIQ_CMAKE_C_FLAGS)
|
||||||
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}" CACHE STRING "C Compiler Base Flags" FORCE)
|
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}" CACHE STRING "C Compiler Base Flags" FORCE)
|
||||||
remove_duplicated_flags("-mlongcalls ${CMAKE_CXX_FLAGS}" UNIQ_CMAKE_CXX_FLAGS)
|
remove_duplicated_flags("-mlongcalls \
|
||||||
|
-fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero \
|
||||||
|
-fno-builtin-stpcpy -fno-builtin-strncpy \
|
||||||
|
${CMAKE_CXX_FLAGS}" UNIQ_CMAKE_CXX_FLAGS)
|
||||||
set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}" CACHE STRING "C++ Compiler Base Flags" FORCE)
|
set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}" CACHE STRING "C++ Compiler Base Flags" FORCE)
|
||||||
remove_duplicated_flags("-mlongcalls ${CMAKE_ASM_FLAGS}" UNIQ_CMAKE_ASM_FLAGS)
|
remove_duplicated_flags("-mlongcalls ${CMAKE_ASM_FLAGS}" UNIQ_CMAKE_ASM_FLAGS)
|
||||||
set(CMAKE_ASM_FLAGS "${UNIQ_CMAKE_ASM_FLAGS}" CACHE STRING "ASM Compiler Base Flags" FORCE)
|
set(CMAKE_ASM_FLAGS "${UNIQ_CMAKE_ASM_FLAGS}" CACHE STRING "ASM Compiler Base Flags" FORCE)
|
||||||
|
Loading…
Reference in New Issue
Block a user