blob: 7d07fca8716172620cd9222067eb29cf47e8a58b [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001From 1ce8fcde17a6d2c5cb2e00901d485c91eda776fd Mon Sep 17 00:00:00 2001
2From: Anton Antonov <Anton.Antonov@arm.com>
3Date: Wed, 31 Aug 2022 17:09:17 +0100
4Subject: [PATCH 4/4] 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 .../psa_arch_tests/modify_attest_config.patch | 15 +++++++++++++++
13 1 file changed, 15 insertions(+)
14
15diff --git a/external/psa_arch_tests/modify_attest_config.patch b/external/psa_arch_tests/modify_attest_config.patch
16index 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--
392.25.1
40