blob: e43e7d25759d9aa915adc846a68e6898716167ee [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001From 03337e3a509eace9f55a46993cfaadee0e796f46 Mon Sep 17 00:00:00 2001
2From: Gyorgy Szing <Gyorgy.Szing@arm.com>
3Date: Fri, 14 Jan 2022 20:35:53 +0000
4Subject: [PATCH 1/1] Add newlib deployment
5
6This deployment allow building newlib directly and not part of SP
7builds. The resulting binary can be used as a pre-build binary for
8building SPs later.
9The intent is to help integration systems, where recursive build is
10problematic, and there is no direct support for building newlib.
11
12Change-Id: I770cdfd3c39eb7bf9764de74dfb191c321c49561
13Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
14
15Upstream-Status: Pending [In review]
16Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
17
18---
19 deployments/newlib/opteesp/CMakeLists.txt | 38 +++++++++++++++++++++++
20 tools/b-test/test_data.yaml | 4 +++
21 2 files changed, 42 insertions(+)
22 create mode 100644 deployments/newlib/opteesp/CMakeLists.txt
23
24diff --git a/deployments/newlib/opteesp/CMakeLists.txt b/deployments/newlib/opteesp/CMakeLists.txt
25new file mode 100644
26index 00000000..593e0a96
27--- /dev/null
28+++ b/deployments/newlib/opteesp/CMakeLists.txt
29@@ -0,0 +1,38 @@
30+#-------------------------------------------------------------------------------
31+# Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
32+#
33+# SPDX-License-Identifier: BSD-3-Clause
34+#
35+#-------------------------------------------------------------------------------
36+cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
37+include(../../deployment.cmake REQUIRED)
38+
39+#-------------------------------------------------------------------------------
40+# The CMakeLists.txt for building the newlib deployment for opteesp
41+#
42+# Can be used to build the newlib library, which can be used to build SPs.
43+#-------------------------------------------------------------------------------
44+include(${TS_ROOT}/environments/opteesp/env.cmake)
45+
46+project(newlib C)
47+
48+# This is a dummy library not intended to be compiled ever. It is needed
49+# to avoid opteesp specific newlib targeting files.
50+add_library(dummy EXCLUDE_FROM_ALL)
51+set(TGT dummy)
52+# Build newlib as an external component.
53+include(${TS_ROOT}/external/newlib/newlib.cmake)
54+
55+######################################## install
56+if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
57+ set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
58+endif()
59+
60+install(DIRECTORY ${NEWLIB_INSTALL_DIR} DESTINATION ${TS_ENV})
61+
62+#get_property(_tmp_lib TARGET stdlib::c PROPERTY IMPORTED_LOCATION)
63+#get_filename_component(_tmp_path ${_tmp_lib} DIRECTORY)
64+#install(DIRECTORY ${_tmp_path} DESTINATION ${TS_ENV})
65+
66+#get_property(_tmp_path TARGET stdlib::c PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
67+#install(DIRECTORY ${_tmp_path} DESTINATION ${TS_ENV})
68diff --git a/tools/b-test/test_data.yaml b/tools/b-test/test_data.yaml
69index 7caafa8b..6bfacc66 100644
70--- a/tools/b-test/test_data.yaml
71+++ b/tools/b-test/test_data.yaml
72@@ -69,6 +69,10 @@ data:
73 os_id : "GNU/Linux"
74 params:
75 - "-GUnix Makefiles"
76+ - name: "newlib-optee-arm"
77+ src: "$TS_ROOT/deployments/newlib/opteesp"
78+ params:
79+ - "-GUnix Makefiles"
80 - name: "platform-inspect-arm-linux"
81 src: "$TS_ROOT/deployments/platform-inspect/arm-linux"
82 os_id : "GNU/Linux"
83--
842.37.0
85