Use WTF_CPU_UNKNOWN when building for X32
authorAlberto Garcia <berto@igalia.com>
Tue, 5 Dec 2023 13:28:29 +0000 (14:28 +0100)
committerAlberto Garcia <berto@igalia.com>
Tue, 5 Dec 2023 13:28:29 +0000 (14:28 +0100)
Forwarded: no

WebKitGTK doesn't build on X32 even with the JIT disabled.
Treating the CPU as unknown is perhaps a bit severe, but it allows us
to get the build done until someone steps up to maintain this
properly.
===================================================================

Gbp-Pq: Name fix-ftbfs-x32.patch

Source/WTF/wtf/PlatformCPU.h
Source/cmake/WebKitCommon.cmake

index 105013ce55a60a508587be155900afa80302b57b..e31123ac78720f90e64ea3c5b54250514686b4ba 100644 (file)
 /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
 #if   defined(__x86_64__) \
     || defined(_M_X64)
+#if !defined(__ILP32__)
 #define WTF_CPU_X86_64 1
 #define WTF_CPU_X86_SSE2 1
 #define WTF_CPU_KNOWN 1
 #endif
+#endif
 
 /* CPU(ARM64) */
 #if defined(__arm64__) || defined(__aarch64__)
index d85ee1813b4b3460fede8cfa17b126e84f0fc080..53adebacd523e0fb6914dc0064ee5e0469e5359f 100644 (file)
@@ -98,6 +98,8 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
         set(WTF_CPU_MIPS64 1)
     elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
         set(WTF_CPU_MIPS 1)
+    elseif (CMAKE_CXX_LIBRARY_ARCHITECTURE STREQUAL "x86_64-linux-gnux32")
+        set(WTF_CPU_UNKNOWN 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