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/components/common/utils/include/compiler.h b/components/common/utils/include/compiler.h
index 075530b..185872e 100644
--- a/components/common/utils/include/compiler.h
+++ b/components/common/utils/include/compiler.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-2-Clause */
 /*
  * Copyright (c) 2014, STMicroelectronics International N.V.
- * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2024, Arm Limited and Contributors. All rights reserved.
  */
 
 #ifndef COMPILER_H
@@ -14,7 +14,7 @@
  * definitive owner and thus solves the problem.
  */
 #ifdef ENABLE_CDEFSH_FIX
-#include <sys/cdefs.h>
+#include <cdefs.h>
 #endif
 
 /*
@@ -56,7 +56,9 @@
 #ifndef __unused
 #define __unused	__attribute__((unused))
 #endif
+#ifndef __maybe_unused
 #define __maybe_unused	__attribute__((unused))
+#endif
 #ifndef __used
 #define __used		__attribute__((__used__))
 #endif