From 264e8529648250310c75e2dc64d535ae96f3e596 Mon Sep 17 00:00:00 2001 From: Tasos Sahanidis Date: Mon, 30 Dec 2019 22:40:30 +0200 Subject: extra/webkit2gtk: Don't force-enable SSE2 in cmake --- extra/webkit2gtk/PKGBUILD | 10 ++-- .../webkitgtk-2.24.2-no-sse2.arch32.patch | 67 ++++++++++++++++++++++ extra/webkit2gtk/webkitgtk-2.24.2-no-sse2.patch | 67 ---------------------- .../webkitgtk-2.26.2-no-sse2-cmake.arch32.patch | 23 ++++++++ 4 files changed, 95 insertions(+), 72 deletions(-) create mode 100644 extra/webkit2gtk/webkitgtk-2.24.2-no-sse2.arch32.patch delete mode 100644 extra/webkit2gtk/webkitgtk-2.24.2-no-sse2.patch create mode 100644 extra/webkit2gtk/webkitgtk-2.26.2-no-sse2-cmake.arch32.patch (limited to 'extra') diff --git a/extra/webkit2gtk/PKGBUILD b/extra/webkit2gtk/PKGBUILD index 0afeb273..b141a037 100644 --- a/extra/webkit2gtk/PKGBUILD +++ b/extra/webkit2gtk/PKGBUILD @@ -1,13 +1,13 @@ # disable SSE2 on 486 and 686 -source_i486+=('webkitgtk-2.24.2-no-sse2.patch') -source_i686+=('webkitgtk-2.24.2-no-sse2.patch') -sha256sums_i486+=('e95391eceeb29d0ebc57d6b867afd7cd95ed92683edeb28c6a7a5048b5a9b85b') -sha256sums_i686+=('e95391eceeb29d0ebc57d6b867afd7cd95ed92683edeb28c6a7a5048b5a9b85b') +source_i486+=('webkitgtk-2.24.2-no-sse2.arch32.patch' 'webkitgtk-2.26.2-no-sse2-cmake.arch32.patch') +source_i686+=('webkitgtk-2.24.2-no-sse2.arch32.patch' 'webkitgtk-2.26.2-no-sse2-cmake.arch32.patch') +sha256sums_i486+=('e95391eceeb29d0ebc57d6b867afd7cd95ed92683edeb28c6a7a5048b5a9b85b' '48f46468c54518c3ce94b73321336a1f1aaf2d121b9222bc8d861726078b3001') +sha256sums_i686+=('e95391eceeb29d0ebc57d6b867afd7cd95ed92683edeb28c6a7a5048b5a9b85b' '48f46468c54518c3ce94b73321336a1f1aaf2d121b9222bc8d861726078b3001') eval "$( declare -f prepare | \ sed ' - /cd.*/a [ "${CARCH}" = pentium4 ] || patch -p1 -i ../webkitgtk-2.24.2-no-sse2.patch + /cd.*/a for _p in \"$srcdir\"\/*.arch32.patch; do patch -p1 -i \"$_p\"; done ' )" diff --git a/extra/webkit2gtk/webkitgtk-2.24.2-no-sse2.arch32.patch b/extra/webkit2gtk/webkitgtk-2.24.2-no-sse2.arch32.patch new file mode 100644 index 00000000..5bcfb603 --- /dev/null +++ b/extra/webkit2gtk/webkitgtk-2.24.2-no-sse2.arch32.patch @@ -0,0 +1,67 @@ +diff -rauN webkitgtk-2.24.2/Source/ThirdParty/ANGLE/src/image_util/loadimage.cpp webkitgtk-2.24.2-no-sse2-patch/Source/ThirdParty/ANGLE/src/image_util/loadimage.cpp +--- webkitgtk-2.24.2/Source/ThirdParty/ANGLE/src/image_util/loadimage.cpp 2019-02-12 12:21:03.000000000 +0100 ++++ webkitgtk-2.24.2-no-sse2-patch/Source/ThirdParty/ANGLE/src/image_util/loadimage.cpp 2019-06-12 09:39:11.959999956 +0200 +@@ -12,6 +12,8 @@ + #include "common/platform.h" + #include "image_util/imageformats.h" + ++#include ++ + namespace angle + { + +@@ -28,6 +30,8 @@ + #if defined(ANGLE_USE_SSE) + if (gl::supportsSSE2()) + { ++ fprintf(stderr,"SSE2 detected but Webkit compiled without SSE2 support!\n"); ++ + __m128i zeroWide = _mm_setzero_si128(); + + for (size_t z = 0; z < depth; z++) + +diff -rauN webkitgtk-2.24.2/Source/WebCore/platform/audio/SincResampler.cpp webkitgtk-2.24.2-no-sse2-patch/Source/WebCore/platform/audio/SincResampler.cpp +--- webkitgtk-2.24.2/Source/WebCore/platform/audio/SincResampler.cpp 2019-02-12 12:21:18.000000000 +0100 ++++ webkitgtk-2.24.2-no-sse2-patch/Source/WebCore/platform/audio/SincResampler.cpp 2019-06-12 09:36:23.089999961 +0200 +@@ -36,6 +36,7 @@ + #include + + #if CPU(X86_SSE2) ++#error No SSE2 + #include + #endif + +diff -rauN webkitgtk-2.24.2/Source/WebCore/platform/audio/VectorMath.cpp webkitgtk-2.24.2-no-sse2-patch/Source/WebCore/platform/audio/VectorMath.cpp +--- webkitgtk-2.24.2/Source/WebCore/platform/audio/VectorMath.cpp 2019-02-12 12:21:18.000000000 +0100 ++++ webkitgtk-2.24.2-no-sse2-patch/Source/WebCore/platform/audio/VectorMath.cpp 2019-06-12 09:09:37.576666644 +0200 +@@ -33,6 +33,7 @@ + #endif + + #if CPU(X86_SSE2) ++#error No SSE2 + #include + #endif + +diff -rauN webkitgtk-2.24.2/Source/WTF/wtf/Platform.h webkitgtk-2.24.2-no-sse2-patch/Source/WTF/wtf/Platform.h +--- webkitgtk-2.24.2/Source/WTF/wtf/Platform.h 2019-03-05 16:32:47.000000000 +0100 ++++ webkitgtk-2.24.2-no-sse2-patch/Source/WTF/wtf/Platform.h 2019-06-12 09:47:05.889999955 +0200 +@@ -124,7 +124,7 @@ + #define WTF_CPU_KNOWN 1 + + #if defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) +-#define WTF_CPU_X86_SSE2 1 ++/* #define WTF_CPU_X86_SSE2 1 */ + #endif + + #endif +diff -rauN webkitgtk-2.24.2/Source/WTF/wtf/text/ASCIIFastPath.h webkitgtk-2.24.2-no-sse2-patch/Source/WTF/wtf/text/ASCIIFastPath.h +--- webkitgtk-2.24.2/Source/WTF/wtf/text/ASCIIFastPath.h 2019-02-12 12:21:17.000000000 +0100 ++++ webkitgtk-2.24.2-no-sse2-patch/Source/WTF/wtf/text/ASCIIFastPath.h 2019-06-12 09:35:37.626666634 +0200 +@@ -27,6 +27,7 @@ + #include + + #if CPU(X86_SSE2) ++#error No SSE2 + #include + #endif + diff --git a/extra/webkit2gtk/webkitgtk-2.24.2-no-sse2.patch b/extra/webkit2gtk/webkitgtk-2.24.2-no-sse2.patch deleted file mode 100644 index 5bcfb603..00000000 --- a/extra/webkit2gtk/webkitgtk-2.24.2-no-sse2.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff -rauN webkitgtk-2.24.2/Source/ThirdParty/ANGLE/src/image_util/loadimage.cpp webkitgtk-2.24.2-no-sse2-patch/Source/ThirdParty/ANGLE/src/image_util/loadimage.cpp ---- webkitgtk-2.24.2/Source/ThirdParty/ANGLE/src/image_util/loadimage.cpp 2019-02-12 12:21:03.000000000 +0100 -+++ webkitgtk-2.24.2-no-sse2-patch/Source/ThirdParty/ANGLE/src/image_util/loadimage.cpp 2019-06-12 09:39:11.959999956 +0200 -@@ -12,6 +12,8 @@ - #include "common/platform.h" - #include "image_util/imageformats.h" - -+#include -+ - namespace angle - { - -@@ -28,6 +30,8 @@ - #if defined(ANGLE_USE_SSE) - if (gl::supportsSSE2()) - { -+ fprintf(stderr,"SSE2 detected but Webkit compiled without SSE2 support!\n"); -+ - __m128i zeroWide = _mm_setzero_si128(); - - for (size_t z = 0; z < depth; z++) - -diff -rauN webkitgtk-2.24.2/Source/WebCore/platform/audio/SincResampler.cpp webkitgtk-2.24.2-no-sse2-patch/Source/WebCore/platform/audio/SincResampler.cpp ---- webkitgtk-2.24.2/Source/WebCore/platform/audio/SincResampler.cpp 2019-02-12 12:21:18.000000000 +0100 -+++ webkitgtk-2.24.2-no-sse2-patch/Source/WebCore/platform/audio/SincResampler.cpp 2019-06-12 09:36:23.089999961 +0200 -@@ -36,6 +36,7 @@ - #include - - #if CPU(X86_SSE2) -+#error No SSE2 - #include - #endif - -diff -rauN webkitgtk-2.24.2/Source/WebCore/platform/audio/VectorMath.cpp webkitgtk-2.24.2-no-sse2-patch/Source/WebCore/platform/audio/VectorMath.cpp ---- webkitgtk-2.24.2/Source/WebCore/platform/audio/VectorMath.cpp 2019-02-12 12:21:18.000000000 +0100 -+++ webkitgtk-2.24.2-no-sse2-patch/Source/WebCore/platform/audio/VectorMath.cpp 2019-06-12 09:09:37.576666644 +0200 -@@ -33,6 +33,7 @@ - #endif - - #if CPU(X86_SSE2) -+#error No SSE2 - #include - #endif - -diff -rauN webkitgtk-2.24.2/Source/WTF/wtf/Platform.h webkitgtk-2.24.2-no-sse2-patch/Source/WTF/wtf/Platform.h ---- webkitgtk-2.24.2/Source/WTF/wtf/Platform.h 2019-03-05 16:32:47.000000000 +0100 -+++ webkitgtk-2.24.2-no-sse2-patch/Source/WTF/wtf/Platform.h 2019-06-12 09:47:05.889999955 +0200 -@@ -124,7 +124,7 @@ - #define WTF_CPU_KNOWN 1 - - #if defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) --#define WTF_CPU_X86_SSE2 1 -+/* #define WTF_CPU_X86_SSE2 1 */ - #endif - - #endif -diff -rauN webkitgtk-2.24.2/Source/WTF/wtf/text/ASCIIFastPath.h webkitgtk-2.24.2-no-sse2-patch/Source/WTF/wtf/text/ASCIIFastPath.h ---- webkitgtk-2.24.2/Source/WTF/wtf/text/ASCIIFastPath.h 2019-02-12 12:21:17.000000000 +0100 -+++ webkitgtk-2.24.2-no-sse2-patch/Source/WTF/wtf/text/ASCIIFastPath.h 2019-06-12 09:35:37.626666634 +0200 -@@ -27,6 +27,7 @@ - #include - - #if CPU(X86_SSE2) -+#error No SSE2 - #include - #endif - diff --git a/extra/webkit2gtk/webkitgtk-2.26.2-no-sse2-cmake.arch32.patch b/extra/webkit2gtk/webkitgtk-2.26.2-no-sse2-cmake.arch32.patch new file mode 100644 index 00000000..9d4c3451 --- /dev/null +++ b/extra/webkit2gtk/webkitgtk-2.26.2-no-sse2-cmake.arch32.patch @@ -0,0 +1,23 @@ +--- webkitgtk-2.26.2/Source/cmake/WebKitCompilerFlags.cmake 2019-08-28 14:46:33.000000000 +0300 ++++ webkitgtk-2.26.2_nosse2/Source/cmake/WebKitCompilerFlags.cmake 2019-12-28 21:04:55.532144052 +0200 +@@ -139,13 +139,13 @@ + 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 () ++# 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 () + endif () + + if (COMPILER_IS_GCC_OR_CLANG AND NOT MSVC) -- cgit v1.2.3