The constructors of static objects are stored in ".ctors" section. In case of MWDT toolchain we have incompatible ".ctors" section format with GNU toolchain. So let's use initialization code provided by MWDT instead of Zephyr one in case of MWDT toolchain usage. As it is done for GNU toolchain We call constructors of static objects but we don't call destructors for them. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
25 lines
452 B
CMake
25 lines
452 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
zephyr_sources(cpp_init.c)
|
|
|
|
zephyr_sources_ifdef(CONFIG_CPP_STATIC_INIT_GNU
|
|
cpp_init_array.c
|
|
cpp_ctors.c
|
|
cpp_dtors.c
|
|
)
|
|
|
|
if (NOT CONFIG_LIB_CPLUSPLUS)
|
|
zephyr_system_include_directories(
|
|
include
|
|
)
|
|
endif()
|
|
|
|
if (NOT CONFIG_LIB_CPLUSPLUS AND
|
|
(NOT CONFIG_MINIMAL_LIBC OR
|
|
(CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE GREATER 0)))
|
|
zephyr_sources(
|
|
cpp_virtual.c
|
|
cpp_vtable.cpp
|
|
cpp_new.cpp
|
|
)
|
|
endif()
|