cmake: toolchain: Remove deprecated 'xtools' toolchain variant
The `xtools` toolchain variant, which was originally introduced to be used with the Crosstool-NG-based Zephyr SDK toolchains and has been replaced by the `zephyr` toolchain variant, has been marked as deprecated since Zephyr v3.3.0. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
parent
90d8710955
commit
3bb5c4b264
4 changed files with 0 additions and 94 deletions
|
@ -53,16 +53,6 @@ if("CROSS_COMPILE" IN_LIST Deprecated_FIND_COMPONENTS)
|
||||||
endif()
|
endif()
|
||||||
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("SPARSE" IN_LIST Deprecated_FIND_COMPONENTS)
|
if("SPARSE" IN_LIST Deprecated_FIND_COMPONENTS)
|
||||||
list(REMOVE_ITEM Deprecated_FIND_COMPONENTS SPARSE)
|
list(REMOVE_ITEM Deprecated_FIND_COMPONENTS SPARSE)
|
||||||
# This code was deprecated after Zephyr v3.2.0
|
# This code was deprecated after Zephyr v3.2.0
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# Copyright © 2022 Keith Packard
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
config TOOLCHAIN_XTOOLS_SUPPORTS_THREAD_LOCAL_STORAGE
|
|
||||||
def_bool y
|
|
||||||
select TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE
|
|
||||||
|
|
||||||
config NEWLIB_LIBC_SUPPORTED
|
|
||||||
def_bool y
|
|
||||||
help
|
|
||||||
Crosstools is assumed to support newlib for C and C++ development.
|
|
|
@ -1,41 +0,0 @@
|
||||||
# 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")
|
|
||||||
|
|
||||||
set(TOOLCHAIN_HOME ${XTOOLS_TOOLCHAIN_PATH})
|
|
||||||
|
|
||||||
set(COMPILER gcc)
|
|
||||||
set(LINKER ld)
|
|
||||||
set(BINTOOLS gnu)
|
|
||||||
|
|
||||||
# Choose one of the toolchains in 'TOOLCHAIN_HOME' at random to use as
|
|
||||||
# a 'generic' toolchain until we know for sure which toolchain we
|
|
||||||
# should use. Note that we can't use ARCH to distinguish between
|
|
||||||
# toolchains because choosing between iamcu and non-iamcu is dependent
|
|
||||||
# on Kconfig, not ARCH.
|
|
||||||
if("${ARCH}" STREQUAL "xtensa")
|
|
||||||
file(GLOB toolchain_paths ${TOOLCHAIN_HOME}/xtensa/*/*)
|
|
||||||
else()
|
|
||||||
file(GLOB toolchain_paths ${TOOLCHAIN_HOME}/*)
|
|
||||||
endif()
|
|
||||||
list(REMOVE_ITEM toolchain_paths ${TOOLCHAIN_HOME}/sources)
|
|
||||||
list(GET toolchain_paths 0 some_toolchain_path)
|
|
||||||
|
|
||||||
get_filename_component(some_toolchain_root "${some_toolchain_path}" DIRECTORY)
|
|
||||||
get_filename_component(some_toolchain "${some_toolchain_path}" NAME)
|
|
||||||
|
|
||||||
set(CROSS_COMPILE_TARGET ${some_toolchain})
|
|
||||||
|
|
||||||
set(SYSROOT_TARGET ${CROSS_COMPILE_TARGET})
|
|
||||||
|
|
||||||
set(CROSS_COMPILE ${some_toolchain_root}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
|
|
||||||
set(SYSROOT_DIR ${some_toolchain_root}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
|
|
||||||
set(TOOLCHAIN_HAS_NEWLIB ON CACHE BOOL "True if toolchain supports newlib")
|
|
||||||
|
|
||||||
unset(some_toolchain_root)
|
|
||||||
unset(some_toolchain)
|
|
||||||
|
|
||||||
message(STATUS "Found toolchain: xtools (${XTOOLS_TOOLCHAIN_PATH})")
|
|
|
@ -1,32 +0,0 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
set(CROSS_COMPILE_TARGET_arm arm-zephyr-eabi)
|
|
||||||
set(CROSS_COMPILE_TARGET_arm64 aarch64-zephyr-elf)
|
|
||||||
set(CROSS_COMPILE_TARGET_nios2 nios2-zephyr-elf)
|
|
||||||
set(CROSS_COMPILE_TARGET_riscv riscv64-zephyr-elf)
|
|
||||||
set(CROSS_COMPILE_TARGET_mips mipsel-zephyr-elf)
|
|
||||||
set(CROSS_COMPILE_TARGET_xtensa xtensa-zephyr-elf)
|
|
||||||
set(CROSS_COMPILE_TARGET_arc arc-zephyr-elf)
|
|
||||||
set(CROSS_COMPILE_TARGET_x86 x86_64-zephyr-elf)
|
|
||||||
set(CROSS_COMPILE_TARGET_sparc sparc-zephyr-elf)
|
|
||||||
|
|
||||||
set(CROSS_COMPILE_TARGET ${CROSS_COMPILE_TARGET_${ARCH}})
|
|
||||||
set(SYSROOT_TARGET ${CROSS_COMPILE_TARGET})
|
|
||||||
|
|
||||||
if("${ARCH}" STREQUAL "xtensa")
|
|
||||||
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/xtensa/${SOC_NAME}/${SYSROOT_TARGET})
|
|
||||||
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/xtensa/${SOC_NAME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
|
|
||||||
else()
|
|
||||||
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
|
|
||||||
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("${ARCH}" STREQUAL "x86")
|
|
||||||
if(CONFIG_X86_64)
|
|
||||||
list(APPEND TOOLCHAIN_C_FLAGS -m64)
|
|
||||||
list(APPEND TOOLCHAIN_LD_FLAGS -m64)
|
|
||||||
else()
|
|
||||||
list(APPEND TOOLCHAIN_C_FLAGS -m32)
|
|
||||||
list(APPEND TOOLCHAIN_LD_FLAGS -m32)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
Loading…
Add table
Add a link
Reference in a new issue