cmake: Toolchain abstraction: move symbol sorting into toolchain_ld_base
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
173c953e9c
commit
b14b59c9e4
2 changed files with 8 additions and 8 deletions
|
@ -376,14 +376,6 @@ if(CONFIG_USERSPACE)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Sort the common symbols and each input section by alignment
|
||||
# in descending order to minimize padding between these symbols.
|
||||
zephyr_ld_option_ifdef(
|
||||
CONFIG_LINKER_SORT_BY_ALIGNMENT
|
||||
${LINKERFLAGPREFIX},--sort-common=descending
|
||||
${LINKERFLAGPREFIX},--sort-section=alignment
|
||||
)
|
||||
|
||||
get_property(TOPT GLOBAL PROPERTY TOPT)
|
||||
set_ifndef( TOPT -Wl,-T) # clang doesn't pick -T for some reason and complains,
|
||||
# while -Wl,-T works for both, gcc and clang
|
||||
|
|
|
@ -12,4 +12,12 @@ macro(toolchain_ld_base)
|
|||
${LINKERFLAGPREFIX},--build-id=none
|
||||
)
|
||||
|
||||
# Sort the common symbols and each input section by alignment
|
||||
# in descending order to minimize padding between these symbols.
|
||||
zephyr_ld_option_ifdef(
|
||||
CONFIG_LINKER_SORT_BY_ALIGNMENT
|
||||
${LINKERFLAGPREFIX},--sort-common=descending
|
||||
${LINKERFLAGPREFIX},--sort-section=alignment
|
||||
)
|
||||
|
||||
endmacro()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue