Use WTF_CPU_UNKNOWN when building for X32
authorAlberto Garcia <berto@igalia.com>
Thu, 19 Dec 2024 08:55:22 +0000 (09:55 +0100)
committerAlberto Garcia <berto@igalia.com>
Thu, 19 Dec 2024 08:55:22 +0000 (09:55 +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 5db894b5fcc624f0e95e2d9533b0ad53a7156bbc..c9e1952337f786925e6cf63550bb9ff1cfbb9083 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 9d7873e211f6687dc8d13511a399d3dea94a087e..e152209941373a9630422c1440e2b0bc8a675516 100644 (file)
@@ -107,6 +107,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