[Bug target/55522] -funsafe-math-optimizations is unexpectedly harmful, especially w/ -shared
spathiwa at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Feb 2 21:51:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522
Craig Smith <spathiwa at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |spathiwa at gmail dot com
--- Comment #5 from Craig Smith <spathiwa at gmail dot com> ---
This issue is really, really bad, and has potential to start changing more and
more run-time behavior of downstream libraries and apps the longer this bug
persists.
For example, on RHEL 7, liblzma.so.5 is linked with -Ofast, which also triggers
crtfastmeth.o to be used, corrupting the mxcsr register at library load time.
(The bug might be specific to RedHat, because -Ofast is added in the rpm spec.)
For some reason, Open GL libraries (libglapi) depend on libselinux which
depends on liblzma.
So ANY open GL app on RHEL will now have its math/IEEE754 semantics broken.
That's terrible.
crtfastmath.o should NEVER be used when linking shared libraries, regardless of
options.
More information about the Gcc-bugs
mailing list