Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | From 03337e3a509eace9f55a46993cfaadee0e796f46 Mon Sep 17 00:00:00 2001 |
| 2 | From: Gyorgy Szing <Gyorgy.Szing@arm.com> |
| 3 | Date: Fri, 14 Jan 2022 20:35:53 +0000 |
| 4 | Subject: [PATCH 1/1] Add newlib deployment |
| 5 | |
| 6 | This deployment allow building newlib directly and not part of SP |
| 7 | builds. The resulting binary can be used as a pre-build binary for |
| 8 | building SPs later. |
| 9 | The intent is to help integration systems, where recursive build is |
| 10 | problematic, and there is no direct support for building newlib. |
| 11 | |
| 12 | Change-Id: I770cdfd3c39eb7bf9764de74dfb191c321c49561 |
| 13 | Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com> |
| 14 | |
| 15 | Upstream-Status: Pending [In review] |
| 16 | Signed-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 | |
| 24 | diff --git a/deployments/newlib/opteesp/CMakeLists.txt b/deployments/newlib/opteesp/CMakeLists.txt |
| 25 | new file mode 100644 |
| 26 | index 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}) |
| 68 | diff --git a/tools/b-test/test_data.yaml b/tools/b-test/test_data.yaml |
| 69 | index 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 | -- |
| 84 | 2.37.0 |
| 85 | |