scons: Use -fno-builtin-memcmp.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 12 Oct 2011 19:42:05 +0000 (20:42 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 12 Oct 2011 19:43:01 +0000 (20:43 +0100)
ipers framerate on llmvpipe improves 60%.

Issue spotted by Adam Jackson <ajax at redhat.com>.

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

scons/gallium.py

index 1c9c0ea32e46613dcc13f1e3dbc9666fdbfa774d..c3350b3ca635b3c495809a7a24ee4b9009b1e3c8 100755 (executable)
@@ -361,6 +361,9 @@ def generate(env):
             ccflags += ['-O0']
         else:
             ccflags += ['-O3']
+        # gcc's builtin memcmp is slower than glibc's
+        # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
+        ccflags += ['-fno-builtin-memcmp']
         # Work around aliasing bugs - developers should comment this out
         ccflags += ['-fno-strict-aliasing']
         ccflags += ['-g']