zephyr/cmake/linker/ld/target_cpp.cmake
Stephanos Ioannidis d927018282 cmake: Use zephyr_link_libraries in toolchain_ld_cpp.
The toolchain_ld_cpp macro currently uses zephyr_ld_options function
to link libstdc++, instead of zephyr_link_libraries which is actually
intended for this purpose.

This commit replaces the usage of zephyr_ld_options with
zephyr_link_libraries as the former may erroneously filter out
-lstdc++ and the latter ensures that this linker flag is
unconditionally forwarded to the linker.

For more details, refer to the issue #20406.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-11-07 16:37:50 +01:00

12 lines
194 B
CMake

# SPDX-License-Identifier: Apache-2.0
# See root CMakeLists.txt for description and expectations of these macros
macro(toolchain_ld_cpp)
zephyr_link_libraries(
-lstdc++
)
endmacro()