Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 1 | From 1ce8fcde17a6d2c5cb2e00901d485c91eda776fd Mon Sep 17 00:00:00 2001 |
| 2 | From: Anton Antonov <Anton.Antonov@arm.com> |
| 3 | Date: Wed, 31 Aug 2022 17:09:17 +0100 |
| 4 | Subject: [PATCH 4/4] Pass Yocto build settings to psa-arch-tests native build |
| 5 | |
| 6 | PSA-arch-tests need to build a native executable as a part of target build. |
| 7 | The patch defines correct toolchain settings for native builds. |
| 8 | |
| 9 | Upstream-Status: Inappropriate [Yocto build specific change] |
| 10 | Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> |
| 11 | --- |
| 12 | .../psa_arch_tests/modify_attest_config.patch | 15 +++++++++++++++ |
| 13 | 1 file changed, 15 insertions(+) |
| 14 | |
| 15 | diff --git a/external/psa_arch_tests/modify_attest_config.patch b/external/psa_arch_tests/modify_attest_config.patch |
| 16 | index ebe8c44..b5d5e88 100644 |
| 17 | --- a/external/psa_arch_tests/modify_attest_config.patch |
| 18 | +++ b/external/psa_arch_tests/modify_attest_config.patch |
| 19 | @@ -11,3 +11,18 @@ index 6112ba7..1cdf581 100755 |
| 20 | |
| 21 | /* |
| 22 | * Include of PSA defined Header files |
| 23 | +diff --git a/api-tests/tools/scripts/target_cfg/CMakeLists.txt b/api-tests/tools/scripts/target_cfg/CMakeLists.txt |
| 24 | +index 259eb9c..fec1fb8 100644 |
| 25 | +--- a/api-tests/tools/scripts/target_cfg/CMakeLists.txt |
| 26 | ++++ b/api-tests/tools/scripts/target_cfg/CMakeLists.txt |
| 27 | +@@ -26,7 +26,9 @@ include("common/CMakeSettings") |
| 28 | + include("common/Utils") |
| 29 | + |
| 30 | + # Causes toolchain to be re-evaluated |
| 31 | +-unset(ENV{CC}) |
| 32 | ++set(ENV{CC} $ENV{BUILD_CC}) |
| 33 | ++set(ENV{CFLAGS} $ENV{BUILD_CFLAGS}) |
| 34 | ++set(ENV{LDFLAGS} $ENV{BUILD_LDFLAGS}) |
| 35 | + |
| 36 | + # Let the CMake look for C compiler |
| 37 | + project(TargetConfigGen LANGUAGES C) |
| 38 | -- |
| 39 | 2.25.1 |
| 40 | |