This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Why not include GCC's link time optimization?

FormerMember
FormerMember

Greetings,

As mentioned in this blog post, GCC compiler -flto flag isn't mysteriously present since SDK 9. devzone.nordicsemi.com/.../

Any specific reason for this? Thanks.

Parents Reply
  • There was a bug in GCC version 4.9 that caused the LTO to optimize away variables even if they were defined as volatile. So we decided to remove the -flto flag from our makefiles since some of the examples in the SDK failed testing when the flag was present. Since this is almost two years ago now and people are using newer versions of GCC, the flag can most likely be reintroduced without any problems (but be aware that the SDK has not been tested with this flag present, so you should do your own tests if you decide to add it). The SDK team is now aware that the flag is missing, and they will investigate if it is possible to add it in the next release.

Children
No Data
Related