summaryrefslogtreecommitdiff
path: root/fix-armhf-webrtc-build.patch
blob: 9f45a78025de037fb66cbda24a9afeb43022fd11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--- a/third_party/libwebrtc/webrtc/system_wrappers/cpu_features_linux_gn/moz.build
+++ b/third_party/libwebrtc/webrtc/system_wrappers/cpu_features_linux_gn/moz.build
@@ -31,10 +31,6 @@ LOCAL_INCLUDES += [
     "/third_party/libwebrtc/webrtc/"
 ]
 
-UNIFIED_SOURCES += [
-    "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
-]
-
 if not CONFIG["MOZ_DEBUG"]:
 
     DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "0"
@@ -53,20 +49,36 @@ if CONFIG["CPU_ARCH"] == "aarch64":
     DEFINES["WEBRTC_ARCH_ARM64"] = True
     DEFINES["WEBRTC_HAS_NEON"] = True
 
-if CONFIG["CPU_ARCH"] == "arm":
-
-    CFLAGS += [
-        "-mfpu=neon"
+    UNIFIED_SOURCES += [
+        "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
     ]
 
+if CONFIG["CPU_ARCH"] == "arm":
+
     DEFINES["WEBRTC_ARCH_ARM"] = True
     DEFINES["WEBRTC_ARCH_ARM_V7"] = True
     DEFINES["WEBRTC_HAS_NEON"] = True
 
+if CONFIG["CPU_ARCH"] == "ppc64":
+
+    UNIFIED_SOURCES += [
+        "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
+    ]
+
 if CONFIG["CPU_ARCH"] == "x86":
 
     CFLAGS += [
         "-msse2"
     ]
 
+    UNIFIED_SOURCES += [
+        "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
+    ]
+
+if CONFIG["CPU_ARCH"] == "x86_64":
+
+    UNIFIED_SOURCES += [
+        "/third_party/libwebrtc/webrtc/system_wrappers/source/cpu_features_linux.c"
+    ]
+
 Library("cpu_features_linux_gn")
--- a/third_party/libwebrtc/webrtc/system_wrappers/BUILD.gn
+++ b/third_party/libwebrtc/webrtc/system_wrappers/BUILD.gn
@@ -187,7 +187,7 @@ if (is_android && !build_with_mozilla) {
   }
 }
 
-if (is_linux) {
+if (is_linux && target_cpu != "arm") {
   rtc_static_library("cpu_features_linux") {
     sources = [
       "source/cpu_features_linux.c",
bgstack15