From d941df7ea77d1644b07c909ad614e9ec00e30f9b Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Mon, 26 Nov 2018 13:48:34 +0100 Subject: [PATCH] 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 --- arch/arm/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/CMakeLists.txt b/arch/arm/CMakeLists.txt index daaa198e980..1d734722e8c 100644 --- a/arch/arm/CMakeLists.txt +++ b/arch/arm/CMakeLists.txt @@ -17,4 +17,9 @@ zephyr_compile_options( ${ARCH_FLAG} ) +zephyr_ld_options( + -mabi=aapcs + ${ARCH_FLAG} + ) + add_subdirectory(core)