Fix mmx / sse2 / ssse3 build

We never want the mmx bits, since we depend on x86-64 as a floor which
always has sse2.  We do want the sse2 bits always and we want the ssse3
bits when supported.

Change-Id: Ie5a51834f85529d714741c901f2f71b7c9b19511
diff --git a/BUILD.gn b/BUILD.gn
index ffe8896..fbb613c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -34,7 +34,17 @@
   ]
 }
 
-# This configuration is for building the pixman code.
+# Group containing the configs and deps for building the pixman library.
+group("pixman_private") {
+  visibility = [ ":*" ]
+  public_configs = [ ":pixman_private_config" ]
+  public_deps = [
+    ":pixman_config_h",
+    ":pixman_version_h",
+  ]
+}
+
+# The configuration for building the pixman code.
 config("pixman_private_config") {
   visibility = [ ":*" ]
   cflags = [
@@ -45,7 +55,11 @@
     "-Wno-tautological-constant-out-of-range-compare",
     "-Wno-unused-const-variable",
     "-Wno-unused-local-typedef",
+    "-Wno-unused-function",
   ]
+
+  defines = [ "HAVE_CONFIG_H" ]
+  include_dirs = [ target_gen_dir ]
 }
 
 # The autoconf build generates these headers after following a series of steps that will produce the
@@ -105,6 +119,7 @@
     "pixman/pixman-region16.c",
     "pixman/pixman-region32.c",
     "pixman/pixman-solid-fill.c",
+    "pixman/pixman-sse2.c",
     "pixman/pixman-timer.c",
     "pixman/pixman-trap.c",
     "pixman/pixman-utils.c",
@@ -113,13 +128,24 @@
   ]
 
   public_configs = [ ":pixman_config" ]
-  configs += [ ":pixman_private_config" ]
+  deps = [
+    ":pixman_private",
+    ":pixman_ssse3",
+  ]
+}
 
-  defines = [ "HAVE_CONFIG_H" ]
-  include_dirs = [ target_gen_dir ]
+source_set("pixman_ssse3") {
+  visibility = [ ":*" ]
+
+  sources = [
+    "pixman/pixman-ssse3.c",
+  ]
+
+  cflags = [ "-mssse3" ]
+
+  configs += [ ":pixman_config" ]
 
   deps = [
-    ":pixman_config_h",
-    ":pixman_version_h",
+    ":pixman_private",
   ]
 }
diff --git a/config.h.fuchsia b/config.h.fuchsia
index 89e6b7e..5b8dc84 100644
--- a/config.h.fuchsia
+++ b/config.h.fuchsia
@@ -156,7 +156,7 @@
 /* #undef USE_VMX */
 
 /* use x86 MMX compiler intrinsics */
-#define USE_X86_MMX 1
+/* #undef USE_X86_MMX */
 
 /* Version number of package */
 #define VERSION "0.32.6"