Comment 2 for bug 1010950

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

With reference to http://forum.percona.com/index.php?t=msg&goto=9326&#msg_9326, I just tested with following: (PS 5.5.27-28.0)

export CFLAGS="-Wall -O1 -g -static-libgcc -fno-omit-frame-pointer -Wstrict-aliasing=1 -Werror=strict-aliasing -fstrict-aliasing"
export CXXFLAGS="-O1 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -Wstrict-aliasing=1 -Werror=strict-aliasing -fstrict-aliasing"

and it built fine. -Wstrict-aliasing=1 enforces strictest aliasing rules.

On a related note, a blanket -Wall -Werror won't build. There is also a certain
CMake 'issue' which may be responsible for this. During feature testing, cmake
passes the Werror flag which causes test to fail and some cmake detection to
fail. http://sprunge.us/HcgK?diff -- the right one is where Werror was passed
and many failed. The CMake 'issue' http://cmake.org/Bug/view.php?id=8246 is
mentioned here but they haven't fixed it, instead they recommend to use
CHECK_SYMBOL_EXISTS which again is not equivalent.