summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/libtgvoip-disable-sse2.patch
diff options
context:
space:
mode:
authorBrett Gilio <brettg@gnu.org>2020-01-05 19:31:07 -0600
committerBrett Gilio <brettg@gnu.org>2020-01-05 19:31:07 -0600
commit1792a70655507625cbe654a0eec1428f210d2fd3 (patch)
tree2e5e7fd13775965c3bf17fd17885e00f2d4b4dc1 /gnu/packages/patches/libtgvoip-disable-sse2.patch
parent5a0d73911c93745391a687def9ba8c7d0d41be23 (diff)
downloadguix-patches-1792a70655507625cbe654a0eec1428f210d2fd3.tar
guix-patches-1792a70655507625cbe654a0eec1428f210d2fd3.tar.gz
gnu: libtgvoip: Fix failing build on i686-linux.
* gnu/local.mk (libtgvoip): Add patches for libtgvoip-disable-sse2.patch and libtgvoip-disable-webrtc.patch * gnu/packages/patches/libtgvoip-disable-sse2.patch: New file. * gnu/packages/patches/libtgvoip-disable-webrtc.patch: New file. * gnu/packages/telephony.scm (libtgvoip): Fix building on i686-linux. [source]: Reference patches for correcting failing build on i686-linux architecture. Reported-by: Diego Nicola Barbato <dnbarbato@posteo.de> Fixes <bugs.gnu.org/38944>.
Diffstat (limited to 'gnu/packages/patches/libtgvoip-disable-sse2.patch')
-rw-r--r--gnu/packages/patches/libtgvoip-disable-sse2.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/patches/libtgvoip-disable-sse2.patch b/gnu/packages/patches/libtgvoip-disable-sse2.patch
new file mode 100644
index 0000000000..0e4faeab26
--- /dev/null
+++ b/gnu/packages/patches/libtgvoip-disable-sse2.patch
@@ -0,0 +1,51 @@
+Copied from Debian.
+
+Description: Disable SSE2 code on i386
+ This patch is not complete. A high-graded solution may use automatic switching
+ between SSE2 and C++ implementations based on the results of runtime checks.
+ The webrtc code already provides for one of them inside its GetCPUInfo function.
+Bug-Debian: https://bugs.debian.org/892823
+Author: Nicholas Guriev <guriev-ns@ya.ru>
+Last-Update: Tue, 29 Jan 2019 23:26:38 +0300
+
+--- a/libtgvoip.gyp
++++ b/libtgvoip.gyp
+@@ -871,11 +871,7 @@
+ 'WEBRTC_POSIX',
+ ],
+ 'conditions': [
+- [ '"<!(uname -m)" == "i686"', {
+- 'cflags_cc': [
+- '-msse2',
+- ],
+- }], ['"<!(uname -s)" == "Linux"', {
++ [ '"<!(uname -s)" == "Linux"', {
+ 'defines': [
+ 'WEBRTC_LINUX',
+ ],
+--- a/webrtc_dsp/rtc_base/system/arch.h
++++ b/webrtc_dsp/rtc_base/system/arch.h
+@@ -28,7 +28,10 @@
+ #define WEBRTC_ARCH_64_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
+ #elif defined(_M_IX86) || defined(__i386__)
++#if defined(__SSE2__)
++// This macro is mostly used to detect SSE2 extension.
+ #define WEBRTC_ARCH_X86_FAMILY
++#endif
+ #define WEBRTC_ARCH_X86
+ #define WEBRTC_ARCH_32_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
+--- a/webrtc_dsp/typedefs.h
++++ b/webrtc_dsp/typedefs.h
+@@ -28,7 +28,10 @@
+ #define WEBRTC_ARCH_64_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
+ #elif defined(_M_IX86) || defined(__i386__)
++#if defined(__SSE2__)
++// This macro is mostly used to detect SSE2 extension.
+ #define WEBRTC_ARCH_X86_FAMILY
++#endif
+ #define WEBRTC_ARCH_X86
+ #define WEBRTC_ARCH_32_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN