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

Reason for -fno-builtin introduced in SDK 7 ?

Hello,

I was surprised that gcc did not optimized my strlen("FOO") construct (worse, in a code review, I argued that the compiler would do the optimization…)

It seems that -fno-builtin (in example Makefiles) prevent it to use __builtin_strlen() and compute the string size at compile-time.

This setting has been added between SDK6.1.0 and SDK7.0.0 but without mention in the release note. So my question is:

- why this has been added (what problem was "solved" by adding this flag)

- could I remove it to it to enjoy the gcc optimizations

- (i.e. what's your advise regarding this feature; should we activate it only for a few builtin…)

Thanks,

Marc.

Parents Reply Children
Related