diff -urN blender-2.78a.orig/extern/sdlew/include/SDL2/SDL_stdinc.h blender-2.78a/extern/sdlew/include/SDL2/SDL_stdinc.h
--- blender-2.78a.orig/extern/sdlew/include/SDL2/SDL_stdinc.h	2017-01-21 23:15:35.942200500 +0000
+++ blender-2.78a/extern/sdlew/include/SDL2/SDL_stdinc.h	2017-01-21 23:16:13.040308500 +0000
@@ -181,7 +181,7 @@
 
 SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords)
 {
-#if defined(__GNUC__) && defined(i386)
+#if defined(__GNUC__) && defined(__i386__)
     int u0, u1, u2;
     __asm__ __volatile__ (
         "cld \n\t"
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp	2017-01-21 23:15:38.437603200 +0000
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp	2017-01-21 23:16:39.527894100 +0000
@@ -19,7 +19,7 @@
 #  define KERNEL_STUB
 #else
 /* SSE optimization disabled for now on 32 bit, see bug T36316. */
-#  if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
+#  if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
 #    define __KERNEL_SSE__
 #    define __KERNEL_SSE2__
 #    define __KERNEL_SSE3__
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp	2017-01-21 23:15:38.442605600 +0000
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp	2017-01-21 23:16:45.798993000 +0000
@@ -19,7 +19,7 @@
 #  define KERNEL_STUB
 #else
 /* SSE optimization disabled for now on 32 bit, see bug T36316. */
-#  if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
+#  if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
 #    define __KERNEL_SSE__
 #    define __KERNEL_SSE2__
 #    define __KERNEL_SSE3__
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp	2017-01-21 23:15:38.466624100 +0000
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp	2017-01-21 23:16:55.150783300 +0000
@@ -19,7 +19,7 @@
 #  define KERNEL_STUB
 #else
 /* SSE optimization disabled for now on 32 bit, see bug T36316. */
-#  if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
+#  if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
 #    define __KERNEL_SSE2__
 #  endif
 #endif /* WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 */
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp	2017-01-21 23:15:38.471623800 +0000
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp	2017-01-21 23:17:01.336263900 +0000
@@ -19,7 +19,7 @@
 #  define KERNEL_STUB
 #else
 /* SSE optimization disabled for now on 32 bit, see bug T36316. */
-#  if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
+#  if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
 #    define __KERNEL_SSE2__
 #    define __KERNEL_SSE3__
 #    define __KERNEL_SSSE3__
diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp
--- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp	2017-01-21 23:15:38.457118700 +0000
+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp	2017-01-21 23:17:06.789600800 +0000
@@ -19,7 +19,7 @@
 #  define KERNEL_STUB
 #else
 /* SSE optimization disabled for now on 32 bit, see bug T36316. */
-#  if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
+#  if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86)))
 #    define __KERNEL_SSE2__
 #    define __KERNEL_SSE3__
 #    define __KERNEL_SSSE3__
diff -urN blender-2.78a.orig/intern/cycles/util/util_optimization.h blender-2.78a/intern/cycles/util/util_optimization.h
--- blender-2.78a.orig/intern/cycles/util/util_optimization.h	2017-01-21 23:15:39.999924200 +0000
+++ blender-2.78a/intern/cycles/util/util_optimization.h	2017-01-21 23:17:18.261111800 +0000
@@ -23,7 +23,7 @@
  *
  * Compile a regular, SSE2 and SSE3 kernel. */
 
-#  if defined(i386) || defined(_M_IX86)
+#  if defined(__i386__) || defined(_M_IX86)
 
 /* We require minimum SSE2 support on x86, so auto enable. */
 #    define __KERNEL_SSE2__
@@ -36,7 +36,7 @@
 #      define WITH_CYCLES_OPTIMIZED_KERNEL_SSE3
 #    endif
 
-#  endif /* defined(i386) || defined(_M_IX86) */
+#  endif  /* defined(__i386__) || defined(_M_IX86) */
 
 /* x86-64
  *
diff -urN blender-2.78a.orig/intern/cycles/util/util_system.cpp blender-2.78a/intern/cycles/util/util_system.cpp
--- blender-2.78a.orig/intern/cycles/util/util_system.cpp	2017-01-21 23:15:39.901904700 +0000
+++ blender-2.78a/intern/cycles/util/util_system.cpp	2017-01-21 23:17:47.886798500 +0000
@@ -135,7 +135,7 @@
 	return (sizeof(void*)*8);
 }
 
-#if defined(__x86_64__) || defined(_M_X64) || defined(i386) || defined(_M_IX86)
+#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)
 
 struct CPUCapabilities {
 	bool x64;
diff -urN blender-2.78a.orig/source/blender/blenlib/intern/system.c blender-2.78a/source/blender/blenlib/intern/system.c
--- blender-2.78a.orig/source/blender/blenlib/intern/system.c	2017-01-21 23:15:56.216596800 +0000
+++ blender-2.78a/source/blender/blenlib/intern/system.c	2017-01-21 23:19:07.797217100 +0000
@@ -47,7 +47,7 @@
 #if defined(__x86_64__) || defined(_M_X64)
   /* x86_64 always has SSE2 instructions */
   return 1;
-#elif defined(__GNUC__) && defined(i386)
+#elif defined(__GNUC__) && defined(__i386__)
   /* for GCC x86 we check cpuid */
   unsigned int d;
   __asm__(
