Merge pull request #14529 from LDong-Arm/cmake_MULADDC

CMake: Fix Mbed TLS compilation on Cortex-M0/0+/1/M23
pull/14553/head
Martin Kojtal 2021-04-15 14:29:27 +02:00 committed by GitHub
commit 7f42511673
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -102,3 +102,20 @@ target_compile_definitions(mbed-mbedtls
INTERFACE
MBED_CONF_MBEDTLS_PRESENT=1
)
# Workaround for https://github.com/ARMmbed/mbedtls/issues/1077
# which affects cores without __thumb2__ set by the compiler
# due to the lack of full Thumb-2 support
set(partial-thumb2-cores
Cortex-M0
Cortex-M0+
Cortex-M1
Cortex-M23
Cortex-M23-NS
)
if(MBED_CPU_CORE IN_LIST partial-thumb2-cores)
target_compile_definitions(mbed-mbedtls
INTERFACE
MULADDC_CANNOT_USE_R7
)
endif()

View File

@ -78,7 +78,6 @@ function(mbed_set_profile_options target mbed_toolchain)
target_compile_definitions(${target}
INTERFACE
__ASSERT_MSG
MULADDC_CANNOT_USE_R7
)
endif()