cmake: Toolchain abstraction: introduce toolchain_ld_cpp
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>
This commit is contained in:
parent
a872911cbb
commit
3db09aa610
3 changed files with 14 additions and 3 deletions
|
@ -230,9 +230,8 @@ if(NOT CONFIG_NATIVE_APPLICATION)
|
|||
endif()
|
||||
|
||||
if(CONFIG_LIB_CPLUSPLUS)
|
||||
zephyr_ld_options(
|
||||
-lstdc++
|
||||
)
|
||||
# @Intent: Set linker specific flags for C++
|
||||
toolchain_ld_cpp()
|
||||
endif()
|
||||
|
||||
# ==========================================================================
|
||||
|
|
|
@ -7,3 +7,4 @@ set_ifndef(LINKERFLAGPREFIX -Wl)
|
|||
# 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)
|
||||
|
|
11
cmake/linker/ld/target_cpp.cmake
Normal file
11
cmake/linker/ld/target_cpp.cmake
Normal file
|
@ -0,0 +1,11 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# See root CMakeLists.txt for description and expectations of these macros
|
||||
|
||||
macro(toolchain_ld_cpp)
|
||||
|
||||
zephyr_ld_options(
|
||||
-lstdc++
|
||||
)
|
||||
|
||||
endmacro()
|
Loading…
Add table
Add a link
Reference in a new issue