Bug 13046 - Optimize for fast -Ofast is not compliant
Summary: Optimize for fast -Ofast is not compliant
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2020.05
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-30 08:16 UTC by Stéphane Veyret
Modified: 2020-07-18 14:08 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Veyret 2020-06-30 08:16:21 UTC
In buildroot, it is possible to select the gcc optimization flag (Build options/gcc optimization level).

The flag -Ofast in gcc creates code that is not compliant to standards. This is written in gcc documentations, and also in the help when you select “optimize for fast” in “gcc optimization level”. But for someone creating an embedded system where speed is critical, he may select this optimization without reading the help, which would build non-working packages (I spent about a whole week searching why NodeJS was not working on my system!)

I suggest to indicate the problem in the label like, for example: “optimize for fast (may break packages!)”.