diff --git a/CMakeLists.txt b/CMakeLists.txt index d286637203f2bc..952acccbba8fcd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -360,8 +360,7 @@ zephyr_compile_options( $<$:-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) diff --git a/cmake/linker/armlink/target.cmake b/cmake/linker/armlink/target.cmake index e8511aea244923..9aa32ad0e6f51c 100644 --- a/cmake/linker/armlink/target.cmake +++ b/cmake/linker/armlink/target.cmake @@ -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) diff --git a/cmake/linker/ld/target.cmake b/cmake/linker/ld/target.cmake index 8c0eea50297e2b..8c18fce0e9a2c6 100644 --- a/cmake/linker/ld/target.cmake +++ b/cmake/linker/ld/target.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) diff --git a/cmake/linker/ld/target_baremetal.cmake b/cmake/linker/ld/target_baremetal.cmake deleted file mode 100644 index 8d01edc53a440d..00000000000000 --- a/cmake/linker/ld/target_baremetal.cmake +++ /dev/null @@ -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() diff --git a/cmake/linker/ld/target_base.cmake b/cmake/linker/ld/target_base.cmake deleted file mode 100644 index c521d196c20564..00000000000000 --- a/cmake/linker/ld/target_base.cmake +++ /dev/null @@ -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() diff --git a/cmake/linker/ld/target_cpp.cmake b/cmake/linker/ld/target_cpp.cmake deleted file mode 100644 index f728a47834277f..00000000000000 --- a/cmake/linker/ld/target_cpp.cmake +++ /dev/null @@ -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() diff --git a/cmake/linker/lld/target.cmake b/cmake/linker/lld/target.cmake index 813c7c5f9237b4..a16529eeef79d2 100644 --- a/cmake/linker/lld/target.cmake +++ b/cmake/linker/lld/target.cmake @@ -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) diff --git a/cmake/linker/lld/target_baremetal.cmake b/cmake/linker/lld/target_baremetal.cmake deleted file mode 100644 index 8d01edc53a440d..00000000000000 --- a/cmake/linker/lld/target_baremetal.cmake +++ /dev/null @@ -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() diff --git a/cmake/linker/lld/target_base.cmake b/cmake/linker/lld/target_base.cmake deleted file mode 100644 index c521d196c20564..00000000000000 --- a/cmake/linker/lld/target_base.cmake +++ /dev/null @@ -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() diff --git a/cmake/linker/lld/target_cpp.cmake b/cmake/linker/lld/target_cpp.cmake deleted file mode 100644 index f728a47834277f..00000000000000 --- a/cmake/linker/lld/target_cpp.cmake +++ /dev/null @@ -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() diff --git a/cmake/linker/xt-ld/target.cmake b/cmake/linker/xt-ld/target.cmake index dd48eac1557c75..4f8e4fcfbdb687 100644 --- a/cmake/linker/xt-ld/target.cmake +++ b/cmake/linker/xt-ld/target.cmake @@ -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) diff --git a/cmake/linker/xt-ld/target_base.cmake b/cmake/linker/xt-ld/target_base.cmake deleted file mode 100644 index c521d196c20564..00000000000000 --- a/cmake/linker/xt-ld/target_base.cmake +++ /dev/null @@ -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()