cmake: deprecate toolchain_ld_<base|baremetal|cpp> macros
Remove the toolchain_ld_<base|baremetal|cpp> macro as all the macro handling is now done through the use of linker properties. Keep support for calling the old macros for out of tree toolchains which have not been updated to the new property approach. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
5badbfe2a2
commit
5db1f1ae8f
12 changed files with 3 additions and 64 deletions
|
@ -360,8 +360,7 @@ zephyr_compile_options(
|
|||
$<$<COMPILE_LANGUAGE:ASM>:-D_ASMLANGUAGE>
|
||||
)
|
||||
|
||||
# @Intent: Set fundamental linker specific flags
|
||||
toolchain_ld_base()
|
||||
find_package(Deprecated COMPONENTS toolchain_ld_base)
|
||||
|
||||
if(DEFINED TOOLCHAIN_LD_FLAGS)
|
||||
zephyr_ld_options(${TOOLCHAIN_LD_FLAGS})
|
||||
|
@ -383,8 +382,7 @@ toolchain_ld_force_undefined_symbols(
|
|||
)
|
||||
|
||||
if(NOT CONFIG_NATIVE_BUILD)
|
||||
# @Intent: Set linker specific flags for bare metal target
|
||||
toolchain_ld_baremetal()
|
||||
find_package(Deprecated COMPONENTS toolchain_ld_baremetal)
|
||||
|
||||
zephyr_link_libraries(PROPERTY baremetal)
|
||||
|
||||
|
@ -411,8 +409,7 @@ endif()
|
|||
|
||||
if(CONFIG_CPP)
|
||||
if(NOT CONFIG_MINIMAL_LIBCPP AND NOT CONFIG_NATIVE_LIBRARY)
|
||||
# @Intent: Set linker specific flags for C++
|
||||
toolchain_ld_cpp()
|
||||
find_package(Deprecated COMPONENTS toolchain_ld_cpp)
|
||||
endif()
|
||||
|
||||
zephyr_link_libraries(PROPERTY cpp_base)
|
||||
|
|
|
@ -6,18 +6,12 @@ find_program(CMAKE_LINKER ${CROSS_COMPILE}armlink PATHS ${TOOLCHAIN_HOME} NO_DEF
|
|||
|
||||
add_custom_target(armlink)
|
||||
|
||||
macro(toolchain_ld_base)
|
||||
endmacro()
|
||||
|
||||
function(toolchain_ld_force_undefined_symbols)
|
||||
foreach(symbol ${ARGN})
|
||||
zephyr_link_libraries(--undefined=${symbol})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
macro(toolchain_ld_baremetal)
|
||||
endmacro()
|
||||
|
||||
macro(configure_linker_script linker_script_gen linker_pass_define)
|
||||
set(STEERING_FILE)
|
||||
set(STEERING_C)
|
||||
|
@ -114,6 +108,5 @@ function(toolchain_ld_link_elf)
|
|||
)
|
||||
endfunction(toolchain_ld_link_elf)
|
||||
|
||||
include(${ZEPHYR_BASE}/cmake/linker/ld/target_cpp.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/ld/target_relocation.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/ld/target_configure.cmake)
|
||||
|
|
|
@ -146,8 +146,5 @@ function(toolchain_ld_link_elf)
|
|||
endfunction(toolchain_ld_link_elf)
|
||||
|
||||
# Load toolchain_ld-family macros
|
||||
include(${ZEPHYR_BASE}/cmake/linker/${LINKER}/target_base.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/${LINKER}/target_baremetal.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/${LINKER}/target_cpp.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/${LINKER}/target_relocation.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/${LINKER}/target_configure.cmake)
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# See root CMakeLists.txt for description and expectations of these macros
|
||||
|
||||
macro(toolchain_ld_baremetal)
|
||||
endmacro()
|
|
@ -1,6 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# See root CMakeLists.txt for description and expectations of these macros
|
||||
|
||||
macro(toolchain_ld_base)
|
||||
endmacro()
|
|
@ -1,6 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# See root CMakeLists.txt for description and expectations of these macros
|
||||
|
||||
macro(toolchain_ld_cpp)
|
||||
endmacro()
|
|
@ -107,8 +107,5 @@ endfunction(toolchain_ld_link_elf)
|
|||
|
||||
|
||||
# Load toolchain_ld-family macros
|
||||
include(${ZEPHYR_BASE}/cmake/linker/${LINKER}/target_base.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/${LINKER}/target_baremetal.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/${LINKER}/target_cpp.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/ld/target_relocation.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/ld/target_configure.cmake)
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# See root CMakeLists.txt for description and expectations of these macros
|
||||
|
||||
macro(toolchain_ld_baremetal)
|
||||
endmacro()
|
|
@ -1,6 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# See root CMakeLists.txt for description and expectations of these macros
|
||||
|
||||
macro(toolchain_ld_base)
|
||||
endmacro()
|
|
@ -1,6 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# See root CMakeLists.txt for description and expectations of these macros
|
||||
|
||||
macro(toolchain_ld_cpp)
|
||||
endmacro()
|
|
@ -139,8 +139,5 @@ endfunction(toolchain_ld_link_elf)
|
|||
|
||||
# xt-ld is Xtensa's own version of binutils' ld.
|
||||
# So we can reuse most of the ld configurations.
|
||||
include(${ZEPHYR_BASE}/cmake/linker/${LINKER}/target_base.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/ld/target_baremetal.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/ld/target_cpp.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/ld/target_relocation.cmake)
|
||||
include(${ZEPHYR_BASE}/cmake/linker/ld/target_configure.cmake)
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# See root CMakeLists.txt for description and expectations of these macros
|
||||
|
||||
macro(toolchain_ld_base)
|
||||
endmacro()
|
Loading…
Add table
Add a link
Reference in a new issue