configure: Use -fno-builtin-memcmp.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 14 Oct 2011 17:28:55 +0000 (18:28 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sun, 16 Oct 2011 15:11:46 +0000 (16:11 +0100)
Issue spotted by Adam Jackson <ajax at redhat.com>.

http://lists.freedesktop.org/archives/mesa-dev/2011-June/009077.html

configure.ac

index 49e81ad17c6d9611a0094c54fc226e746e38cb2b..ae7b36b85ceb0d2378add6c65730bdbb0f3db5f9 100644 (file)
@@ -172,6 +172,10 @@ if test "x$GCC" = xyes; then
 
     # Work around aliasing bugs - developers should comment this out
     CFLAGS="$CFLAGS -fno-strict-aliasing"
+
+    # gcc's builtin memcmp is slower than glibc's
+    # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
+    CFLAGS="$CFLAGS -fno-builtin-memcmp"
 fi
 if test "x$GXX" = xyes; then
     CXXFLAGS="$CXXFLAGS -Wall"
@@ -191,6 +195,10 @@ if test "x$GXX" = xyes; then
 
     # Work around aliasing bugs - developers should comment this out
     CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
+
+    # gcc's builtin memcmp is slower than glibc's
+    # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
+    CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
 fi
 
 dnl even if the compiler appears to support it, using visibility attributes isn't