Source: webkit2gtk Version: 2.24.1-2 Severity: serious Tags: patch webkit2gtk violates the baseline on i386 by using SSE.
While keeping floating point values consistent between 32bit and 64bit is nice in general, it is bad if this makes the code crash on large parts of the supported i386 hardware - most hardware with SSE2 runs the amd64 port, and at least one non-SSE i386 CPU is still in production for embedded systems (AMD Geode). Fix is attached.
diff -Nru webkit2gtk-2.24.2/debian/NEWS webkit2gtk-2.24.2/debian/NEWS --- webkit2gtk-2.24.2/debian/NEWS 2019-05-17 17:40:52.000000000 +0300 +++ webkit2gtk-2.24.2/debian/NEWS 2019-05-17 17:40:52.000000000 +0300 @@ -1,12 +1,3 @@ -webkit2gtk (2.24.1-2) unstable; urgency=high - - Since version 2.24.0, i386 builds of WebKitGTK require an SSE2-capable - CPU. This instruction set was first introduced with the Pentium 4 in - year 2000. Support for older processors was dropped in WebKitGTK - upstream and is unfortunately not expected to come back. - - -- Alberto Garcia <be...@igalia.com> Fri, 10 May 2019 15:40:28 +0300 - webkit2gtk (2.20.0-2) unstable; urgency=medium webkit2gtk 2.20.0 contains a security feature named Gigacage that diff -Nru webkit2gtk-2.24.2/debian/patches/i386-no-sse.patch webkit2gtk-2.24.2/debian/patches/i386-no-sse.patch --- webkit2gtk-2.24.2/debian/patches/i386-no-sse.patch 1970-01-01 02:00:00.000000000 +0200 +++ webkit2gtk-2.24.2/debian/patches/i386-no-sse.patch 2019-05-17 17:40:52.000000000 +0300 @@ -0,0 +1,21 @@ +Description: SSE is a baseline violation on i386 +Author: Adrian Bunk <b...@debian.org> + +--- webkit2gtk-2.24.2.orig/Source/cmake/WebKitCompilerFlags.cmake ++++ webkit2gtk-2.24.2/Source/cmake/WebKitCompilerFlags.cmake +@@ -144,15 +144,6 @@ if (COMPILER_IS_GCC_OR_CLANG) + if (CMAKE_COMPILER_IS_GNUCXX) + WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-expansion-to-defined) + 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 () + endif () + + if (COMPILER_IS_GCC_OR_CLANG AND NOT MSVC) diff -Nru webkit2gtk-2.24.2/debian/patches/series webkit2gtk-2.24.2/debian/patches/series --- webkit2gtk-2.24.2/debian/patches/series 2019-05-17 17:40:52.000000000 +0300 +++ webkit2gtk-2.24.2/debian/patches/series 2019-05-17 17:40:52.000000000 +0300 @@ -7,3 +7,4 @@ detect-woff.patch user-agent-branding.patch prefer-pthread.patch +i386-no-sse.patch diff -Nru webkit2gtk-2.24.2/debian/rules webkit2gtk-2.24.2/debian/rules --- webkit2gtk-2.24.2/debian/rules 2019-05-17 17:40:52.000000000 +0300 +++ webkit2gtk-2.24.2/debian/rules 2019-05-17 17:40:52.000000000 +0300 @@ -23,11 +23,6 @@ CFLAGS := $(CFLAGS:-g=-g1) endif -# The 32-bit x86 build requires SSE2 -ifneq (,$(filter $(DEB_HOST_ARCH),i386)) - CFLAGS += -msse2 -mfpmath=sse -endif - # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426 ifneq (,$(filter $(DEB_HOST_ARCH),armhf sh3 sh4 powerpc)) CFLAGS := $(CFLAGS:-O2=-O1)