gnu: libcaca: Patch for CVE-2021-3410.
[jackhill/guix/guix.git] / gnu / packages / patches / libtgvoip-disable-sse2.patch
CommitLineData
1792a706
BG
1Copied from Debian.
2
3Description: Disable SSE2 code on i386
4 This patch is not complete. A high-graded solution may use automatic switching
5 between SSE2 and C++ implementations based on the results of runtime checks.
6 The webrtc code already provides for one of them inside its GetCPUInfo function.
7Bug-Debian: https://bugs.debian.org/892823
8Author: Nicholas Guriev <guriev-ns@ya.ru>
9Last-Update: Tue, 29 Jan 2019 23:26:38 +0300
10
11--- a/libtgvoip.gyp
12+++ b/libtgvoip.gyp
13@@ -871,11 +871,7 @@
14 'WEBRTC_POSIX',
15 ],
16 'conditions': [
17- [ '"<!(uname -m)" == "i686"', {
18- 'cflags_cc': [
19- '-msse2',
20- ],
21- }], ['"<!(uname -s)" == "Linux"', {
22+ [ '"<!(uname -s)" == "Linux"', {
23 'defines': [
24 'WEBRTC_LINUX',
25 ],
26--- a/webrtc_dsp/rtc_base/system/arch.h
27+++ b/webrtc_dsp/rtc_base/system/arch.h
28@@ -28,7 +28,10 @@
29 #define WEBRTC_ARCH_64_BITS
30 #define WEBRTC_ARCH_LITTLE_ENDIAN
31 #elif defined(_M_IX86) || defined(__i386__)
32+#if defined(__SSE2__)
33+// This macro is mostly used to detect SSE2 extension.
34 #define WEBRTC_ARCH_X86_FAMILY
35+#endif
36 #define WEBRTC_ARCH_X86
37 #define WEBRTC_ARCH_32_BITS
38 #define WEBRTC_ARCH_LITTLE_ENDIAN
39--- a/webrtc_dsp/typedefs.h
40+++ b/webrtc_dsp/typedefs.h
41@@ -28,7 +28,10 @@
42 #define WEBRTC_ARCH_64_BITS
43 #define WEBRTC_ARCH_LITTLE_ENDIAN
44 #elif defined(_M_IX86) || defined(__i386__)
45+#if defined(__SSE2__)
46+// This macro is mostly used to detect SSE2 extension.
47 #define WEBRTC_ARCH_X86_FAMILY
48+#endif
49 #define WEBRTC_ARCH_X86
50 #define WEBRTC_ARCH_32_BITS
51 #define WEBRTC_ARCH_LITTLE_ENDIAN