2024-08-31 04:15:40 +08:00
|
|
|
# Copyright (c) 2024 Nordic Semiconductor
|
|
|
|
#
|
2024-05-17 20:53:06 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2024-08-31 04:15:40 +08:00
|
|
|
check_set_linker_property(TARGET linker PROPERTY base
|
|
|
|
${LINKERFLAGPREFIX},--gc-sections
|
|
|
|
${LINKERFLAGPREFIX},--build-id=none
|
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT CONFIG_MINIMAL_LIBCPP AND NOT CONFIG_NATIVE_LIBRARY AND NOT CONFIG_EXTERNAL_MODULE_LIBCPP)
|
|
|
|
set_property(TARGET linker PROPERTY cpp_base -lstdc++)
|
|
|
|
endif()
|
|
|
|
|
2024-09-02 19:14:43 +08:00
|
|
|
check_set_linker_property(TARGET linker PROPERTY baremetal
|
|
|
|
-nostdlib
|
|
|
|
-static
|
|
|
|
${LINKERFLAGPREFIX},-X
|
|
|
|
${LINKERFLAGPREFIX},-N
|
|
|
|
)
|
|
|
|
|
|
|
|
check_set_linker_property(TARGET linker PROPERTY orphan_warning
|
|
|
|
${LINKERFLAGPREFIX},--orphan-handling=warn
|
|
|
|
)
|
|
|
|
|
|
|
|
check_set_linker_property(TARGET linker PROPERTY orphan_error
|
|
|
|
${LINKERFLAGPREFIX},--orphan-handling=error
|
|
|
|
)
|
|
|
|
|
2024-05-17 20:53:06 +08:00
|
|
|
set_property(TARGET linker PROPERTY partial_linking "-r")
|
2024-08-31 04:15:40 +08:00
|
|
|
|
|
|
|
check_set_linker_property(TARGET linker PROPERTY no_relax ${LINKERFLAGPREFIX},--no-relax)
|
2024-09-05 07:33:29 +08:00
|
|
|
|
2024-08-31 04:15:40 +08:00
|
|
|
check_set_linker_property(TARGET linker PROPERTY sort_alignment
|
|
|
|
${LINKERFLAGPREFIX},--sort-common=descending
|
|
|
|
${LINKERFLAGPREFIX},--sort-section=alignment
|
|
|
|
)
|