Don't check for SSE2 support on i386
authorAlberto Garcia <berto@igalia.com>
Wed, 30 Oct 2024 21:57:37 +0000 (22:57 +0100)
committerAlberto Garcia <berto@igalia.com>
Wed, 30 Oct 2024 21:57:37 +0000 (22:57 +0100)
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 4163e35d23747580ca77a014d16cead88ce55895..99107dffe11fa589f2e9e6af6e3882c0711701b0 100644 (file)
@@ -550,7 +550,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 0cf5c5d3337269d81ce3a319c4db1b25ebf3139a..9747cecda7c248271fe508a9abaae6cd50ef1314 100644 (file)
@@ -219,15 +219,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)