When SSE2 is not available on X86, make the CPU "unknown." This allows the build to complete on those machines without SSE2. https://bugs.gentoo.org/730044 diff --git a/Source/WTF/wtf/PlatformCPU.h b/Source/WTF/wtf/PlatformCPU.h index 8aac1024..e12483a0 100644 --- a/Source/WTF/wtf/PlatformCPU.h +++ b/Source/WTF/wtf/PlatformCPU.h @@ -101,11 +101,16 @@ || defined(_M_IX86) \ || defined(_X86_) \ || defined(__THW_INTEL) -#define WTF_CPU_X86 1 -#define WTF_CPU_KNOWN 1 #if defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) +#define WTF_CPU_X86 1 #define WTF_CPU_X86_SSE2 1 + +/* According to Source/cmake/WebKitCompilerFlags.cmake, SSE2 support + * is required for x86 processors. It's probably overkill, but one way + * to rescue the build is to downgrade to WTF_CPU_UNKNOWN instead of + * X86 when SSE2 is missing. */ +#define WTF_CPU_KNOWN 1 #endif #endif diff --git a/Source/cmake/WebKitCommon.cmake b/Source/cmake/WebKitCommon.cmake index 98ee788a..c826ae04 100644 --- a/Source/cmake/WebKitCommon.cmake +++ b/Source/cmake/WebKitCommon.cmake @@ -116,13 +116,7 @@ if (NOT HAS_RUN_WEBKIT_COMMON) # on a Linux/intel 64bit host. This allows us to produce 32bit # binaries without setting the build up as a crosscompilation, # which is the only way to modify CMAKE_SYSTEM_PROCESSOR. - if (FORCE_32BIT) - set(WTF_CPU_X86 1) - else () - set(WTF_CPU_X86_64 1) - endif () - elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)") - set(WTF_CPU_X86 1) + set(WTF_CPU_X86_64 1) elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(ppc|powerpc)") set(WTF_CPU_PPC 1) elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")