mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-02 17:33:00 +00:00
The LINKER variable is introduced to follow the same logic and flow as the existing COMPILER variable: That is, each TOOLCHAIN is responsible for choosing COMPILER and LINKER. Currently, Zephyr's build system is hardcoded for GNU ld. Reflect this in LINKER by letting all existing toolchains use GNU ld. No functional change expected. This is motivated by the wish to abstract Zephyr's usage of toolchains, permitting non-intrusive porting to other (commercial) toolchains. Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
20 lines
633 B
CMake
20 lines
633 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set_ifndef(ESPRESSIF_TOOLCHAIN_PATH "$ENV{ESPRESSIF_TOOLCHAIN_PATH}")
|
|
set( ESPRESSIF_TOOLCHAIN_PATH ${ESPRESSIF_TOOLCHAIN_PATH} CACHE PATH "")
|
|
assert( ESPRESSIF_TOOLCHAIN_PATH "ESPRESSIF_TOOLCHAIN_PATH is not set")
|
|
|
|
set(TOOLCHAIN_HOME ${ESPRESSIF_TOOLCHAIN_PATH})
|
|
|
|
set(COMPILER gcc)
|
|
set(LINKER ld)
|
|
|
|
set(CROSS_COMPILE_TARGET xtensa-esp32-elf)
|
|
set(SYSROOT_TARGET xtensa-esp32-elf)
|
|
|
|
set(CROSS_COMPILE ${TOOLCHAIN_HOME}/bin/${CROSS_COMPILE_TARGET}-)
|
|
set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
|
|
|
|
set(TOOLCHAIN_HAS_NEWLIB ON CACHE BOOL "True if toolchain supports newlib")
|
|
|