From 53892f862148d5454007965e60f4f68ba395adee Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 25 Apr 2019 00:48:21 +0300 Subject: [PATCH] jerry.cmake: Disable LTO for JerryScript build With LTO compiling enabled, and Zephyr SDK 0.10.0, during final Zephyr link (which isn't done with LTO option), for armv7m targets, weird errors are thrown: zephyr-sdk-0.10.0/arm-zephyr-eabi/.../arm-zephyr-eabi/bin/ld: error: zephyr_prebuilt.elf uses VFP register arguments, /tmp/ccTrD4ap.ltrans1.ltrans.o does not Note that both JerryScript and Zephyr seem to be built with correct and consistent target options, which enable VFP usage. Disabling LTO option for JerryScript build fixes this issue. Signed-off-by: Paul Sokolovsky --- cmake/jerry.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/jerry.cmake b/cmake/jerry.cmake index 22c9a6478..20ae4c3a9 100644 --- a/cmake/jerry.cmake +++ b/cmake/jerry.cmake @@ -45,7 +45,7 @@ set(CMAKE_ARGS -DCMAKE_C_COMPILER_WORKS=TRUE -DCMAKE_SYSTEM_NAME=Zephyr -DENABLE_ALL_IN_ONE=OFF - -DENABLE_LTO=ON + -DENABLE_LTO=OFF -DEXTERNAL_COMPILE_FLAGS=${external_project_cflags} -DFEATURE_ERROR_MESSAGES=ON -DFEATURE_DEBUGGER=${DEBUGGER}