Don't check for SSE2 support on i386
authorAlberto Garcia <berto@igalia.com>
Mon, 5 May 2025 15:28:28 +0000 (17:28 +0200)
committerAlberto Garcia <berto@igalia.com>
Mon, 5 May 2025 15:28:28 +0000 (17:28 +0200)
Bug-Debian: https://bugs.debian.org/930935
Forwarded: no

===================================================================

Gbp-Pq: Name dont-detect-sse2.patch

Source/ThirdParty/ANGLE/src/common/mathutil.h
Source/cmake/WebKitCompilerFlags.cmake

index 45c00d8991d0d7f13d8159e8001ef3210b311fb0..92b5cbac4d3b9f8645a1f416666b79907e5564e6 100644 (file)
@@ -597,7 +597,7 @@ inline R roundToNearest(T input)
 {
     static_assert(std::is_floating_point<T>::value);
     static_assert(std::numeric_limits<R>::is_integer);
-#if defined(__aarch64__) || defined(_M_ARM64)
+#if defined(__aarch64__) || defined(_M_ARM64) || defined(__i386__)
     // On armv8, this expression is compiled to a dedicated round-to-nearest instruction
     return static_cast<R>(std::round(input));
 #else
index de1cb6c496ccce806010ec1da8f6a4d6d731e0c1..3381a0d3fda02384bc5e884c4781555ebee25452 100644 (file)
@@ -221,15 +221,6 @@ if (COMPILER_IS_GCC_OR_CLANG)
         WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-fmax-errors=20)
     endif ()
 
-    # Force SSE2 fp on x86 builds.
-    if (WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING)
-        WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-msse2 -mfpmath=sse)
-        include(DetectSSE2)
-        if (NOT SSE2_SUPPORT_FOUND)
-            message(FATAL_ERROR "SSE2 support is required to compile WebKit")
-        endif ()
-    endif ()
-
     # Makes builds faster. The GCC manual warns about the possibility that the assembler being
     # used may not support input from a pipe, but in practice the toolchains we support all do.
     WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-pipe)