diff options
author | Gyorgy Szing <Gyorgy.Szing@arm.com> | 2022-10-20 08:55:52 +0000 |
---|---|---|
committer | Gyorgy Szing <Gyorgy.Szing@arm.com> | 2022-10-20 13:03:34 +0200 |
commit | 63bf16a7394ff38569363b1771d00d1f1b7aafa5 (patch) | |
tree | d587e62d600bd64b698104a877d81d499cbcb757 | |
parent | c734111452fa264e0b4a8aefbeced4aebd46b9cb (diff) | |
download | trusted-services-63bf16a7394ff38569363b1771d00d1f1b7aafa5.tar.gz |
Fix libsp/opteesp build failure
When building the mentioned deployment an error is reported
complaining SP_HEAP_SIZE being undefined. This change fixes the
issue by adding a dummy definition. This setting only affects files
not used in this deployment.
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
Change-Id: I542f9adf0fb0bb924959242a3a7873f56e890028
-rw-r--r-- | deployments/libsp/opteesp/CMakeLists.txt | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/deployments/libsp/opteesp/CMakeLists.txt b/deployments/libsp/opteesp/CMakeLists.txt index 1fc2c4d60..8495679e2 100644 --- a/deployments/libsp/opteesp/CMakeLists.txt +++ b/deployments/libsp/opteesp/CMakeLists.txt @@ -39,12 +39,20 @@ add_components(TARGET sp # Include newlib into the build, but do no add SP executable specific files to libsp. # Use a dummy target which will never be built. -add_library(dummy EXCLUDE_FROM_ALL) -add_components(TARGET dummy - BASE_DIR ${TS_ROOT} - COMPONENTS - environments/opteesp -) +function(get_newlib_compile_flags) + # Environment specific files require this variable to be set. + # Set it to a dummy value as we are not going to build these anyways. + # The namespace of the function will ensure globas setting is not affected. + set(SP_HEAP_SIZE 4096) + add_library(dummy EXCLUDE_FROM_ALL) + add_components(TARGET dummy + BASE_DIR ${TS_ROOT} + COMPONENTS + environments/opteesp + ) +endfunction() + +get_newlib_compile_flags() # Get libc specific settings from newlib. target_link_libraries(sp PRIVATE stdlib::c) |