arch: ARM: set -mabi and -march in linker flags

Some toolchains are built with multilib enabled in order to provide
multiple versions of the same library, optimized for different ABI
or architecture. They require the -march= and -mabi= options to be
passed at link time. This is important for example when linking with
newlib.

We do that by passing zephyr_ld_options the same arguments than
zephyr_compile_options. The -mabi option is passed directly while the
-march option, if defined, is passed through ${ARCH_FLAG}.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Aurelien Jarno 2018-11-26 13:48:34 +01:00 committed by Anas Nashif
parent f78067e1f9
commit d941df7ea7

View File

@ -17,4 +17,9 @@ zephyr_compile_options(
${ARCH_FLAG}
)
zephyr_ld_options(
-mabi=aapcs
${ARCH_FLAG}
)
add_subdirectory(core)