From 183ad81c0a85a31edc16dd29ba486bed40d43e9a Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Mon, 17 Oct 2022 22:56:40 +0900 Subject: [PATCH] cmake: Deprecate 'xtools' toolchain variant The `xtools` toolchain variant (aka. Crosstool-NG) was originally introduced to be used with the Crosstool-NG-based Zephyr SDK toolchains (i.e. sdk-ng). This is no longer necessary because the current Zephyr SDK (sdk-ng) already has its own `zephyr` toolchain variant, which fully replaces the `xtools` toolchain variant, and the `xtools` toolchain variant serves no purpose at all. Signed-off-by: Stephanos Ioannidis --- cmake/modules/FindDeprecated.cmake | 10 ++++++++++ cmake/toolchain/xtools/generic.cmake | 2 ++ 2 files changed, 12 insertions(+) diff --git a/cmake/modules/FindDeprecated.cmake b/cmake/modules/FindDeprecated.cmake index 27f2165033c8..d593846afc78 100644 --- a/cmake/modules/FindDeprecated.cmake +++ b/cmake/modules/FindDeprecated.cmake @@ -68,6 +68,16 @@ if("CROSS_COMPILE" IN_LIST Deprecated_FIND_COMPONENTS) endif() endif() +if("XTOOLS" IN_LIST Deprecated_FIND_COMPONENTS) + list(REMOVE_ITEM Deprecated_FIND_COMPONENTS XTOOLS) + # This code was deprecated after Zephyr v3.3.0 + # When removing support for `xtools`, remember to also remove: + # cmake/toolchain/xtools (folder with files) + # doc/develop/toolchains/crosstool_ng.rst and update the index.rst file. + message(DEPRECATION "XTOOLS toolchain variant is deprecated. " + "Please set ZEPHYR_TOOLCHAIN_VARIANT to 'zephyr'") +endif() + if(NOT "${Deprecated_FIND_COMPONENTS}" STREQUAL "") message(STATUS "The following deprecated component(s) could not be found: " "${Deprecated_FIND_COMPONENTS}") diff --git a/cmake/toolchain/xtools/generic.cmake b/cmake/toolchain/xtools/generic.cmake index bec6bd09c0ec..be0075adede9 100644 --- a/cmake/toolchain/xtools/generic.cmake +++ b/cmake/toolchain/xtools/generic.cmake @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 +find_package(Deprecated COMPONENTS XTOOLS) + zephyr_get(XTOOLS_TOOLCHAIN_PATH) assert( XTOOLS_TOOLCHAIN_PATH "XTOOLS_TOOLCHAIN_PATH is not set")