Peg to psa_arch_tests version with INHERIT toolchain support
Building with the psa_arch_tests external component previously
required a patch to be applied that allowed the toolchain
specified by the cmake toolchain file to be used to build the
psa_arch_tests library. These changes have now been upstreamed
so the patch has been removed and the refspec updated.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I5fffb9aea2c00cc8e251e91e8d2bac554e4fbd1f
diff --git a/external/psa_arch_tests/add_inherit_toolchain.patch b/external/psa_arch_tests/add_inherit_toolchain.patch
deleted file mode 100644
index 58b2f75..0000000
--- a/external/psa_arch_tests/add_inherit_toolchain.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-diff --git a/api-tests/CMakeLists.txt b/api-tests/CMakeLists.txt
-index e0f1dbe..0d660ea 100644
---- a/api-tests/CMakeLists.txt
-+++ b/api-tests/CMakeLists.txt
-@@ -107,12 +107,14 @@ list(APPEND PSA_TOOLCHAIN_SUPPORT
- GNUARM
- ARMCLANG
- HOST_GCC
-- GCC_LINUX
-+ GCC_LINUX
-+ INHERIT
- )
-
- # list of supported CROSS_COMPILE toolchains
- list(APPEND CROSS_COMPILE_TOOLCHAIN_SUPPORT
- GNUARM
-+ INHERIT
- )
-
- # list of suported CPU arch
-@@ -582,7 +584,7 @@ add_custom_target(
- # Check for supported toolchain/s
- if(${TOOLCHAIN} IN_LIST PSA_TOOLCHAIN_SUPPORT)
- if (DEFINED CROSS_COMPILE)
-- if(${CROSS_COMPILE} AND NOT (${TOOLCHAIN} IN_LIST CROSS_COMPILE_TOOLCHAIN_SUPPORT))
-+ if(NOT (${TOOLCHAIN} IN_LIST CROSS_COMPILE_TOOLCHAIN_SUPPORT))
- message(FATAL_ERROR "[PSA] : Error: CROSS_COMPILE not supported for this toolchain, supported toolchain are : ${CROSS_COMPILE_TOOLCHAIN_SUPPORT}")
- endif()
- endif()
-diff --git a/api-tests/tools/cmake/compiler/INHERIT.cmake b/api-tests/tools/cmake/compiler/INHERIT.cmake
-new file mode 100644
-index 0000000..b2570c8
---- /dev/null
-+++ b/api-tests/tools/cmake/compiler/INHERIT.cmake
-@@ -0,0 +1,19 @@
-+#/** @file
-+# * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
-+# * SPDX-License-Identifier : Apache-2.0
-+# *
-+# * Licensed under the Apache License, Version 2.0 (the "License");
-+# * you may not use this file except in compliance with the License.
-+# * You may obtain a copy of the License at
-+# *
-+# * http://www.apache.org/licenses/LICENSE-2.0
-+# *
-+# * Unless required by applicable law or agreed to in writing, software
-+# * distributed under the License is distributed on an "AS IS" BASIS,
-+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+# * See the License for the specific language governing permissions and
-+# * limitations under the License.
-+#**/
-+
-+# Add any external definitions from the parent build
-+add_definitions(${ARCH_TEST_EXTERNAL_DEFS})
-diff --git a/api-tests/tools/scripts/target_cfg/CMakeLists.txt b/api-tests/tools/scripts/target_cfg/CMakeLists.txt
-index 3210c5f..259eb9c 100644
---- a/api-tests/tools/scripts/target_cfg/CMakeLists.txt
-+++ b/api-tests/tools/scripts/target_cfg/CMakeLists.txt
-@@ -25,6 +25,9 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../tools/cmake)
- include("common/CMakeSettings")
- include("common/Utils")
-
-+# Causes toolchain to be re-evaluated
-+unset(ENV{CC})
-+
- # Let the CMake look for C compiler
- project(TargetConfigGen LANGUAGES C)
-
diff --git a/external/psa_arch_tests/psa_arch_tests.cmake b/external/psa_arch_tests/psa_arch_tests.cmake
index 6edf38d..e87d2da 100644
--- a/external/psa_arch_tests/psa_arch_tests.cmake
+++ b/external/psa_arch_tests/psa_arch_tests.cmake
@@ -14,7 +14,7 @@
endif()
set(PSA_ARCH_TESTS_URL "https://github.com/ARM-software/psa-arch-tests.git" CACHE STRING "psa-arch-tests repository URL")
-set(PSA_ARCH_TESTS_REFSPEC "bfc75bdbb7181e9482864803300ae56cc9dbb1b5" CACHE STRING "psa-arch-tests git refspec")
+set(PSA_ARCH_TESTS_REFSPEC "dfb944c8e9e3874d3958a456c5d1299646d99b50" CACHE STRING "psa-arch-tests git refspec")
set(PSA_ARCH_TESTS_INSTALL_PATH "${CMAKE_CURRENT_BINARY_DIR}/psa-arch-tests_install" CACHE PATH "psa-arch-tests installation directory")
set(PSA_ARCH_TESTS_PACKAGE_PATH "${PSA_ARCH_TESTS_INSTALL_PATH}/libpsa-arch-tests/cmake" CACHE PATH "psa-arch-tests CMake package directory")
@@ -32,8 +32,6 @@
GIT_REPOSITORY ${PSA_ARCH_TESTS_URL}
GIT_TAG ${PSA_ARCH_TESTS_REFSPEC}
GIT_SHALLOW TRUE
- PATCH_COMMAND git stash --include-untracked
- COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/add_inherit_toolchain.patch
)
# FetchContent_GetProperties exports psa-arch-tests_SOURCE_DIR and psa-arch-tests_BINARY_DIR variables