Bug: https://bugs.webkit.org/show_bug.cgi?id=172799
When building for x86 in a x86_64 host (e.g. with pbuilder) CMake
will set CMAKE_SYSTEM_PROCESSOR to x86_64, and WebKit will assume
that it's a 64-bit build. Let's use the C++ compiler architecture as
a temporary solution to detect x86 correctly.
===================================================================
Gbp-Pq: Name fix-ftbfs-x86.patch
set(WTF_CPU_MIPS64 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
set(WTF_CPU_MIPS 1)
+elseif (CMAKE_CXX_LIBRARY_ARCHITECTURE MATCHES "(x64|x86_64|amd64)")
+ set(WTF_CPU_X86_64 1)
+elseif (CMAKE_CXX_LIBRARY_ARCHITECTURE MATCHES "(i[3-6]86|x86)")
+ set(WTF_CPU_X86 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x64|x86_64|amd64)")
# FORCE_32BIT is set in the build script when --32-bit is passed
# on a Linux/intel 64bit host. This allows us to produce 32bit