Commit 5db1f1ae authored by Torsten Rasmussen's avatar Torsten Rasmussen Committed by Carles Cufi
Browse files

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: default avatarTorsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
parent 5badbfe2
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -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)
+0 −7
Original line number Diff line number Diff line
@@ -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)
+0 −3
Original line number Diff line number Diff line
@@ -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)
+0 −6
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

# See root CMakeLists.txt for description and expectations of these macros

macro(toolchain_ld_baremetal)
endmacro()

cmake/linker/ld/target_base.cmake

deleted100644 → 0
+0 −6
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

# See root CMakeLists.txt for description and expectations of these macros

macro(toolchain_ld_base)
endmacro()
Loading