Q: So is this a mistake, or am I doing something wrong? Because after reading the flag flags, I really think they should be disabled in -O
I think Hans did a good job of finding part of the problem. This is definitely a documentation error. But none of the GCC commented on why -Os
turned them on, so you may not have all the information.
Older ARM devices were very intolerant of unrelated access. Devices with older levers included ARMv4, and I think ARMv5. If you performed unrelated access, you will receive SIGBUS
(there, done, received a T-shirt).
Modern ARM devices capture unmanaged calls such as x86 processors, so you no longer get SIGBUS
. Instead, you simply accept a performance penalty.
You should try to specify the architecture if these parameters are an artifact from older ARM device support. For example, -march=armv7
. If you find it on ARMv6 and ARMv7, this might still be a mistake. It depends on what the GCC team decided that the compromise was sufficient for ARM (code size and performance penalty).
source share