Integrate libc and dlmalloc to opteesp and sp environments
Replace newlib with libc and dlmalloc components in the optee and sp
environments and implement required interfaces. Using the libc component
also required the following changes:
* Fix duplicate __maybe_unused in compiler.h
* Change external/tf_a/include/cdefs.h to point to new cdefs.h
* Resolve __packed usage issues
Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: Ie798eb426378529b5d84f1708beebe85cd061fb3
diff --git a/environments/opteesp/component.cmake b/environments/opteesp/component.cmake
index 2b54682..3726e2f 100644
--- a/environments/opteesp/component.cmake
+++ b/environments/opteesp/component.cmake
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2020-2024, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -63,7 +63,12 @@
SP_HEAP_SIZE=${SP_HEAP_SIZE}
)
-include(${TS_ROOT}/external/newlib/newlib.cmake)
+add_subdirectory(${TS_ROOT}/components/common/libc ${CMAKE_BINARY_DIR}/libc_build)
+add_components(TARGET ${TGT}
+ BASE_DIR ${TS_ROOT}
+ COMPONENTS
+ "components/common/dlmalloc"
+)
target_link_libraries(${TGT} PRIVATE
stdlib::c