blob: 516aa55f5e3a5e726c91acbcc1fd82bc531f4c72 [file] [log] [blame]
Patrick Williams2194f502022-10-16 14:26:09 -05001From 3f9b148fe3cad9f1bc6eb08ff8807c54dec5b8d9 Mon Sep 17 00:00:00 2001
2From: Anton Antonov <Anton.Antonov@arm.com>
3Date: Tue, 11 Oct 2022 16:17:15 +0100
4Subject: [PATCH] Pass Yocto build settings to psa-arch-tests native build
5
6PSA-arch-tests need to build a native executable as a part of target build.
7The patch defines correct toolchain settings for native builds.
8
9Upstream-Status: Inappropriate [Yocto build specific change]
10Signed-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
15diff --git a/api-tests/tools/scripts/target_cfg/CMakeLists.txt b/api-tests/tools/scripts/target_cfg/CMakeLists.txt
16index 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--
312.25.1
32