Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame^] | 1 | From 3f9b148fe3cad9f1bc6eb08ff8807c54dec5b8d9 Mon Sep 17 00:00:00 2001 |
| 2 | From: Anton Antonov <Anton.Antonov@arm.com> |
| 3 | Date: Tue, 11 Oct 2022 16:17:15 +0100 |
| 4 | Subject: [PATCH] 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 | api-tests/tools/scripts/target_cfg/CMakeLists.txt | 4 +++- |
| 13 | 1 file changed, 3 insertions(+), 1 deletion(-) |
| 14 | |
| 15 | diff --git a/api-tests/tools/scripts/target_cfg/CMakeLists.txt b/api-tests/tools/scripts/target_cfg/CMakeLists.txt |
| 16 | index 259eb9c..fec1fb8 100644 |
| 17 | --- a/api-tests/tools/scripts/target_cfg/CMakeLists.txt |
| 18 | +++ b/api-tests/tools/scripts/target_cfg/CMakeLists.txt |
| 19 | @@ -26,7 +26,9 @@ include("common/CMakeSettings") |
| 20 | include("common/Utils") |
| 21 | |
| 22 | # Causes toolchain to be re-evaluated |
| 23 | -unset(ENV{CC}) |
| 24 | +set(ENV{CC} $ENV{BUILD_CC}) |
| 25 | +set(ENV{CFLAGS} $ENV{BUILD_CFLAGS}) |
| 26 | +set(ENV{LDFLAGS} $ENV{BUILD_LDFLAGS}) |
| 27 | |
| 28 | # Let the CMake look for C compiler |
| 29 | project(TargetConfigGen LANGUAGES C) |
| 30 | -- |
| 31 | 2.25.1 |
| 32 | |