lamaistres wrote:Can someone give me the name of an ebuild that breaks when I compile with -ffast-math. I'm just curious.
Packages that break with -ffast-math forced are roughly 2 categories:
System libraries
Things that implement math functions in a funky way (gmp comes to mind).
Other things should not be broken by -ffast-math. I've tested it, and all audio/video encoding programs that I've tested function correctly with -ffast-math. In fact, a lot of them recommend setting it (or default to it), because of the thing it does: speed up floating-point operations at the cost of correctness in corner cases. System libraries and funky math libraries cannot stand it, because of the exact same thing. However, it doesn't mean -ffast-math shouldn't be used at all. In fact, I've used it on code that I used to calculate things for my thesis. Why? Because it sped things up, and it didn't break the code. Results were the same, just a measly 10% faster, which matters a lot if you're running the thing for about a week.
I think this thread is going a bit too far in bunking crazy CFLAGS. They have their uses sometimes, GCC authors do not implement them because they feel a need for broken flags or something. It's just that many of them have uses that a normal Gentoo user doesn't come close to, but sometimes they can be useful. Some flags considered stable by Gentoo developers are considered broken or not ready by GCC developers (-fstack-protector, -fvisibility-inlines-hidden), and vice versa.
Calling new gcc4 optimizations nuclear warheads or something isn't going to help them become stable. If you dare, test them, if you don't dare, wait for others to test them.