CMakeLists.txt: add -fno-lto
authorOleksij Rempel <linux@rempel-privat.de>
Sat, 1 Oct 2016 14:24:32 +0000 (16:24 +0200)
committerOleksij Rempel <linux@rempel-privat.de>
Sun, 2 Oct 2016 17:16:33 +0000 (19:16 +0200)
this option is needed to make compile work with cross-toolchain properly.
We are not using LTO any way, but for some reasons if cross-tolachain
is compailed without LTO, then FW compilation will fail.

With and without this option FW has same md5sum - So it should be save
to use this option.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
target_firmware/CMakeLists.txt

index 3710617905ed965ab08a7f7843d981cfc1bccaff..78961be066cd0ff2514a22918a36628193d13dfa 100644 (file)
@@ -101,6 +101,7 @@ ADD_CUSTOM_COMMAND(
        DEPENDS firmware
        COMMAND ${CMAKE_C_COMPILER}
                -nostdlib
+               -fno-lto
                -Wl,--start-group
                ${CMAKE_BINARY_DIR}/libfirmware.a
                -Wl,--end-group