From 97f6dfdd720c1ec96bf27e7bbca2bd8a264e0840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C3=85berg?= Date: Wed, 4 Nov 2020 11:57:17 +0100 Subject: [PATCH] cmake: SPARC workaround for SDK toolchain 0.11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Zephyr SDK version 0.11.3, 0.11.4 and 0.12.0-beta-1 does not have the required SPARC target support. Zephyr CI is currently using SDK 0.11.3, which causes the following build error: CMake Error at /workdir/zephyr/cmake/compiler/gcc/target.cmake:10 (message): C compiler /opt/sdk/zephyr-sdk-0.11.3//bin/-gcc not found - Please check your toolchain installation This patch adds a workaround such that the SDK target.cmake is picked up from the directory 0.11 when ARCH=sparc. Signed-off-by: Martin Ã…berg --- cmake/toolchain/zephyr/target.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/toolchain/zephyr/target.cmake b/cmake/toolchain/zephyr/target.cmake index b5b01c63f9e..86b0ce2ecdc 100644 --- a/cmake/toolchain/zephyr/target.cmake +++ b/cmake/toolchain/zephyr/target.cmake @@ -4,6 +4,9 @@ if(${SDK_VERSION} VERSION_LESS_EQUAL 0.11.2) # For backward compatibility with 0.11.1 and 0.11.2 # we need to source files from Zephyr repo include(${CMAKE_CURRENT_LIST_DIR}/${SDK_MAJOR_MINOR}/target.cmake) +elseif("${ARCH}" STREQUAL "sparc") + # SDK 0.11.3, 0.11.4 and 0.12.0-beta-1 does not have SPARC target support. + include(${CMAKE_CURRENT_LIST_DIR}/${SDK_MAJOR_MINOR}/target.cmake) else() include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/target.cmake)