Skip to content

Commit 04f3b5d

Browse files
committed
toolchain/arcmwdt: Support SDK 0.18 directory layout
The arcmwdt toolchain uses some tools from the Zephyr SDK. With version 0.18, the path to the GNU generic.cmake file has moved. Adapt to that by checking for the new location and using that if available. Signed-off-by: Keith Packard <keithp@keithp.com>
1 parent 2c78ed6 commit 04f3b5d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/toolchain/arcmwdt/generic.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ set(TOOLCHAIN_HOME ${ZEPHYR_SDK_INSTALL_DIR})
3030
# but in hew HWMv2 model ARCH variable will be initialized more later.
3131
# This workaround uses any (first awailable, independent on ARCH) toolchain from SDK for DTC preprocessing only.
3232
# For other build stages ARCMWDT will be used.
33-
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/generic.cmake)
33+
if(EXISTS ${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/gnu/generic.cmake)
34+
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/gnu/generic.cmake)
35+
else()
36+
include(${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/generic.cmake)
37+
endif()
3438
unset(TOOLCHAIN_HAS_NEWLIB CACHE)
3539
unset(TOOLCHAIN_HAS_PICOLIBC CACHE)
3640

0 commit comments

Comments
 (0)