aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMate Toth-Pal <mate.toth-pal@arm.com>2020-03-02 16:22:19 +0100
committerMate Toth-Pal <mate.toth-pal@arm.com>2020-04-03 08:36:39 +0200
commit8f17a71106dfdbdb1923014d4e4c4180371112c9 (patch)
treebf61ce338c9fa117b6cdb1b3aad024c26f1d6c37 /test
parent50373fc4aa0ff465ac9f9083ca346af9f4b0fac6 (diff)
downloadtrusted-firmware-m-8f17a71106dfdbdb1923014d4e4c4180371112c9.tar.gz
Build: Only pass -mcmse switch for secure compiles
Don't define the C macro __ARM_FEATURE_CMSE at all, as that is done by the compiler by passing the -mcmse (or equivalent) switch to the compiler command. Also don't pass command line switch -mcmse to compiler in case of NS build. Change-Id: If9ab8e879b81b63b97c6785320225537004b35b1 Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index e2cd2bf885..0ab1b6fe7c 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -159,10 +159,13 @@ if (TFM_BUILD_IN_SPE)
endif()
#Set common compiler and linker flags
+ if (DEFINED CMSE_FLAGS)
+ embedded_set_target_compile_flags(TARGET tfm_secure_tests LANGUAGE C APPEND FLAGS ${CMSE_FLAGS})
+ endif()
config_setting_shared_compiler_flags(tfm_secure_tests)
config_setting_shared_linker_flags(tfm_secure_tests)
- embedded_set_target_compile_defines(TARGET tfm_secure_tests LANGUAGE C DEFINES __thumb2__ __ARM_FEATURE_CMSE=${ARM_FEATURE_CMSE} TFM_LVL=${TFM_LVL} APPEND)
+ embedded_set_target_compile_defines(TARGET tfm_secure_tests LANGUAGE C DEFINES __thumb2__ TFM_LVL=${TFM_LVL} APPEND)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE
@@ -191,7 +194,7 @@ else ()
config_setting_shared_linker_flags(tfm_non_secure_tests)
#Set macro definitions
- set(TARGET_COMPILE_DEFINITIONS __thumb2__ __DOMAIN_NS=1 DOMAIN_NS=__DOMAIN_NS __ARM_FEATURE_CMSE=${ARM_FEATURE_CMSE} TFM_LVL=${TFM_LVL})
+ set(TARGET_COMPILE_DEFINITIONS __thumb2__ __DOMAIN_NS=1 DOMAIN_NS=__DOMAIN_NS TFM_LVL=${TFM_LVL})
embedded_set_target_compile_defines(TARGET tfm_non_secure_tests LANGUAGE C DEFINES ${TARGET_COMPILE_DEFINITIONS} APPEND)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)