git: c4e1afae288c - 2025Q1 - www/firefox: update to 137.0 (rc1)

From: Christoph Moench-Tegeder <cmt_at_FreeBSD.org>
Date: Tue, 25 Mar 2025 21:30:49 UTC
The branch 2025Q1 has been updated by cmt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c4e1afae288c9e8b025e7541a93c8a3a027f721e

commit c4e1afae288c9e8b025e7541a93c8a3a027f721e
Author:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
AuthorDate: 2025-03-25 21:27:52 +0000
Commit:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
CommitDate: 2025-03-25 21:30:34 +0000

    www/firefox: update to 137.0 (rc1)
    
    Release Notes (soon):
      https://www.mozilla.org/en-US/firefox/137.0/releasenotes/
    
    (cherry picked from commit 90a57ac9f29ad9df483827a5bd9d584a7c5aedcd)
---
 www/firefox/Makefile                               |    4 +-
 www/firefox/distinfo                               |    6 +-
 www/firefox/files/patch-bug1948776                 |    8 +-
 ...__processor.py => patch-build_gn__processor.py} |   20 +-
 www/firefox/files/patch-libwebrtc-generated        | 7444 +++++++++++++-------
 5 files changed, 4989 insertions(+), 2493 deletions(-)

diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index 23ab54008763..fcfa382e0307 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	firefox
-DISTVERSION=	136.0.3
+DISTVERSION=	137.0
 PORTEPOCH=	2
 CATEGORIES=	www wayland
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}${DISTVERSIONSUFFIX}/source \
@@ -11,7 +11,7 @@ COMMENT=	Web browser based on the browser portion of Mozilla
 WWW=		https://www.mozilla.com/firefox
 
 BUILD_DEPENDS=	nspr>=4.32:devel/nspr \
-		nss>=3.108:security/nss \
+		nss>=3.109:security/nss \
 		libevent>=2.1.8:devel/libevent \
 		harfbuzz>=10.1.0:print/harfbuzz \
 		graphite2>=1.3.14:graphics/graphite2 \
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index f45c0b657b35..4896cb134a74 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1742844225
-SHA256 (firefox-136.0.3.source.tar.xz) = 95304fb019d4d5a2ddf838cefd68e0b7d1c5eb098d383113fb569266f6b5c028
-SIZE (firefox-136.0.3.source.tar.xz) = 601432848
+TIMESTAMP = 1742936768
+SHA256 (firefox-137.0.source.tar.xz) = 879c6b25c9226e0f1856861e8eb9f3e0479c1c6cf4670c4b19c6317226af6fde
+SIZE (firefox-137.0.source.tar.xz) = 593477236
diff --git a/www/firefox/files/patch-bug1948776 b/www/firefox/files/patch-bug1948776
index 86953f4e4472..d969a28a0dec 100644
--- a/www/firefox/files/patch-bug1948776
+++ b/www/firefox/files/patch-bug1948776
@@ -21,9 +21,9 @@ index 61121bcbaf8d..b31f2200e8e6 100644
 -  void* memory = mmap(nullptr, aSize, PROT_NONE,
 -                      MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0);
 +#ifndef __FreeBSD__
-+  int flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE;
++  constexpr int flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE;
 +#else
-+  int flags = MAP_ANONYMOUS | MAP_PRIVATE;
++  constexpr int flags = MAP_ANONYMOUS | MAP_PRIVATE;
 +#endif
 +  void* memory = mmap(nullptr, aSize, PROT_NONE, flags, -1, 0);
    if (memory == MAP_FAILED) {
@@ -40,9 +40,9 @@ index da279f469237..9ed83af4b1f2 100644
 -  void* memory = mmap(nullptr, size, PROT_NONE,
 -                      MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0);
 +#ifndef __FreeBSD__
-+  int flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE;
++  constexpr int flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE;
 +#else
-+  int flags = MAP_ANONYMOUS | MAP_PRIVATE;
++  constexpr int flags = MAP_ANONYMOUS | MAP_PRIVATE;
 +#endif
 +  void* memory = mmap(nullptr, size, PROT_NONE, flags, -1, 0);
    if (memory == MAP_FAILED) {
diff --git a/www/firefox/files/patch-python_mozbuild_mozbuild_gn__processor.py b/www/firefox/files/patch-build_gn__processor.py
similarity index 76%
rename from www/firefox/files/patch-python_mozbuild_mozbuild_gn__processor.py
rename to www/firefox/files/patch-build_gn__processor.py
index 94584d8b160b..be5e10347483 100644
--- a/www/firefox/files/patch-python_mozbuild_mozbuild_gn__processor.py
+++ b/www/firefox/files/patch-build_gn__processor.py
@@ -1,13 +1,13 @@
-commit 6bfdff4afcc9e3843b9c3a5d7e884e281a305398
+commit 0e5bcbefae64b35a5c8df360e3980258a565fa72
 Author: Christoph Moench-Tegeder <cmt@burggraben.net>
 
-    chase gn_processor.py changes
+    chase gn_processor.py move
 
-diff --git python/mozbuild/mozbuild/gn_processor.py python/mozbuild/mozbuild/gn_processor.py
-index a77b6c7759f1..e5498ac5e9df 100644
---- python/mozbuild/mozbuild/gn_processor.py
-+++ python/mozbuild/mozbuild/gn_processor.py
-@@ -185,6 +185,7 @@ def filter_gn_config(path, gn_result, sandbox_vars, input_vars, gn_target):
+diff --git build/gn_processor.py build/gn_processor.py
+index 2ba8b92c2751..91170efb9a5d 100644
+--- build/gn_processor.py
++++ build/gn_processor.py
+@@ -186,6 +186,7 @@ def filter_gn_config(path, gn_result, sandbox_vars, input_vars, gn_target):
      }
      oses = {
          "android": "Android",
@@ -15,7 +15,7 @@ index a77b6c7759f1..e5498ac5e9df 100644
          "linux": "Linux",
          "mac": "Darwin",
          "openbsd": "OpenBSD",
-@@ -742,17 +743,17 @@ def main():
+@@ -780,17 +781,17 @@ def main():
  
      vars_set = []
      for is_debug in (True, False):
@@ -35,10 +35,10 @@ index a77b6c7759f1..e5498ac5e9df 100644
                  target_cpus.append("riscv64")
 -            if target_os == "linux":
 +            if target_os in ("freebsd", "linux"):
-                 target_cpus.extend(["ppc64", "mipsel", "mips64el"])
+                 target_cpus.extend(["loong64", "ppc64", "mipsel", "mips64el"])
              for target_cpu in target_cpus:
                  vars = {
-@@ -761,7 +762,7 @@ def main():
+@@ -799,7 +800,7 @@ def main():
                      "target_cpu": target_cpu,
                      "target_os": target_os,
                  }
diff --git a/www/firefox/files/patch-libwebrtc-generated b/www/firefox/files/patch-libwebrtc-generated
index 7cc3320ba596..9158e070322c 100644
--- a/www/firefox/files/patch-libwebrtc-generated
+++ b/www/firefox/files/patch-libwebrtc-generated
@@ -1,10 +1,10 @@
-commit 05e619ebbe49c70dab8273ff9769da63ea1d8631
+commit 03ad892364d95687b41b0eabd6031c4d3e081db4
 Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
 
-    regenerate FreeBSD libwebrtc patch for Firefox 136
+    regenerate FreeBSD libwebrtc patch for Firefox 137
 
 diff --git third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build
-index 31e5e0cb14be..d54f6dbed565 100644
+index 655ef59cba4b..d54f6dbed565 100644
 --- third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build
 +++ third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
@@ -28,7 +28,7 @@ index 31e5e0cb14be..d54f6dbed565 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -129,6 +129,10 @@ index 31e5e0cb14be..d54f6dbed565 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -211,7 +215,7 @@ index 31e5e0cb14be..d54f6dbed565 100644
  
  Library("resource_adaptation_api_gn")
 diff --git third_party/libwebrtc/api/array_view_gn/moz.build third_party/libwebrtc/api/array_view_gn/moz.build
-index 84878ba9f99f..0a1c7b839dda 100644
+index d4382d1df1cc..0a1c7b839dda 100644
 --- third_party/libwebrtc/api/array_view_gn/moz.build
 +++ third_party/libwebrtc/api/array_view_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
@@ -235,7 +239,7 @@ index 84878ba9f99f..0a1c7b839dda 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,108 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,112 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -332,6 +336,10 @@ index 84878ba9f99f..0a1c7b839dda 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -345,7 +353,7 @@ index 84878ba9f99f..0a1c7b839dda 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -150,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -154,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -398,7 +406,7 @@ index 84878ba9f99f..0a1c7b839dda 100644
 -
  Library("array_view_gn")
 diff --git third_party/libwebrtc/api/async_dns_resolver_gn/moz.build third_party/libwebrtc/api/async_dns_resolver_gn/moz.build
-index f8804e882e6e..b6efeac78e76 100644
+index e935019626ad..b6efeac78e76 100644
 --- third_party/libwebrtc/api/async_dns_resolver_gn/moz.build
 +++ third_party/libwebrtc/api/async_dns_resolver_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
@@ -422,7 +430,7 @@ index f8804e882e6e..b6efeac78e76 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,116 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,120 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -527,6 +535,10 @@ index f8804e882e6e..b6efeac78e76 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -540,7 +552,7 @@ index f8804e882e6e..b6efeac78e76 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -158,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -162,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -593,7 +605,7 @@ index f8804e882e6e..b6efeac78e76 100644
 -
  Library("async_dns_resolver_gn")
 diff --git third_party/libwebrtc/api/audio/aec3_config_gn/moz.build third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
-index f79ef5c75c4d..daf2b9c13beb 100644
+index cfb3b6961c8e..daf2b9c13beb 100644
 --- third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
 +++ third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
@@ -617,7 +629,7 @@ index f79ef5c75c4d..daf2b9c13beb 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -718,6 +730,10 @@ index f79ef5c75c4d..daf2b9c13beb 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -800,7 +816,7 @@ index f79ef5c75c4d..daf2b9c13beb 100644
  
  Library("aec3_config_gn")
 diff --git third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
-index 4f58b0dfae3e..9311473ef1a8 100644
+index 589d5a72ef9b..9311473ef1a8 100644
 --- third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
 +++ third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
 @@ -12,12 +12,21 @@ AllowCompilerWarnings()
@@ -825,7 +841,7 @@ index 4f58b0dfae3e..9311473ef1a8 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -44,186 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -937,6 +953,10 @@ index 4f58b0dfae3e..9311473ef1a8 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -1019,7 +1039,7 @@ index 4f58b0dfae3e..9311473ef1a8 100644
  
  Library("aec3_factory_gn")
 diff --git third_party/libwebrtc/api/audio/audio_device_gn/moz.build third_party/libwebrtc/api/audio/audio_device_gn/moz.build
-index acf6fe8822f4..956114463750 100644
+index a727e70ec91d..956114463750 100644
 --- third_party/libwebrtc/api/audio/audio_device_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_device_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
@@ -1043,7 +1063,7 @@ index acf6fe8822f4..956114463750 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,108 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,112 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -1140,6 +1160,10 @@ index acf6fe8822f4..956114463750 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -1153,7 +1177,7 @@ index acf6fe8822f4..956114463750 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -150,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -154,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -1206,7 +1230,7 @@ index acf6fe8822f4..956114463750 100644
 -
  Library("audio_device_gn")
 diff --git third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
-index 5506b2b799c0..f121290ac495 100644
+index 0cf70f6a0a66..f121290ac495 100644
 --- third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
@@ -1230,7 +1254,7 @@ index 5506b2b799c0..f121290ac495 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -44,182 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -44,186 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -1338,6 +1362,10 @@ index 5506b2b799c0..f121290ac495 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -1420,7 +1448,7 @@ index 5506b2b799c0..f121290ac495 100644
  
  Library("audio_frame_api_gn")
 diff --git third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build
-index 3b9b2a2dd8f1..f34df50bef47 100644
+index d9e237b4c753..f34df50bef47 100644
 --- third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
@@ -1444,7 +1472,7 @@ index 3b9b2a2dd8f1..f34df50bef47 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,104 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,108 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -1537,6 +1565,10 @@ index 3b9b2a2dd8f1..f34df50bef47 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -1550,7 +1582,7 @@ index 3b9b2a2dd8f1..f34df50bef47 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -146,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -150,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -1603,7 +1635,7 @@ index 3b9b2a2dd8f1..f34df50bef47 100644
 -
  Library("audio_frame_processor_gn")
 diff --git third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build
-index 13f69cf28328..aca2a4d6a37f 100644
+index 9576084c2bfb..aca2a4d6a37f 100644
 --- third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
@@ -1627,7 +1659,7 @@ index 13f69cf28328..aca2a4d6a37f 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,115 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,119 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -1731,6 +1763,10 @@ index 13f69cf28328..aca2a4d6a37f 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -1744,7 +1780,7 @@ index 13f69cf28328..aca2a4d6a37f 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -157,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -161,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -1797,7 +1833,7 @@ index 13f69cf28328..aca2a4d6a37f 100644
 -
  Library("audio_mixer_api_gn")
 diff --git third_party/libwebrtc/api/audio/audio_processing_gn/moz.build third_party/libwebrtc/api/audio/audio_processing_gn/moz.build
-index c7c012a9aa21..fb9329509240 100644
+index 2e7d38d911f4..fb9329509240 100644
 --- third_party/libwebrtc/api/audio/audio_processing_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_processing_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
@@ -1821,7 +1857,7 @@ index c7c012a9aa21..fb9329509240 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,179 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -1922,6 +1958,10 @@ index c7c012a9aa21..fb9329509240 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -2004,7 +2044,7 @@ index c7c012a9aa21..fb9329509240 100644
  
  Library("audio_processing_gn")
 diff --git third_party/libwebrtc/api/audio/audio_processing_statistics_gn/moz.build third_party/libwebrtc/api/audio/audio_processing_statistics_gn/moz.build
-index 064122654c6f..9275b9e39050 100644
+index 0400bcf1bdfc..9275b9e39050 100644
 --- third_party/libwebrtc/api/audio/audio_processing_statistics_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_processing_statistics_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
@@ -2028,7 +2068,7 @@ index 064122654c6f..9275b9e39050 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,171 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -2125,6 +2165,10 @@ index 064122654c6f..9275b9e39050 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -2206,16 +2250,17 @@ index 064122654c6f..9275b9e39050 100644
 +    DEFINES["USE_X11"] = "1"
  
  Library("audio_processing_statistics_gn")
-diff --git third_party/libwebrtc/api/audio/echo_control_gn/moz.build third_party/libwebrtc/api/audio/echo_control_gn/moz.build
-index 67e90d93f334..9bb9eff44ed7 100644
---- third_party/libwebrtc/api/audio/echo_control_gn/moz.build
-+++ third_party/libwebrtc/api/audio/echo_control_gn/moz.build
-@@ -12,11 +12,20 @@ AllowCompilerWarnings()
+diff --git third_party/libwebrtc/api/audio/builtin_audio_processing_builder_gn/moz.build third_party/libwebrtc/api/audio/builtin_audio_processing_builder_gn/moz.build
+index af681d4d0d28..dd6059825208 100644
+--- third_party/libwebrtc/api/audio/builtin_audio_processing_builder_gn/moz.build
++++ third_party/libwebrtc/api/audio/builtin_audio_processing_builder_gn/moz.build
+@@ -12,12 +12,21 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
+ DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
@@ -2231,7 +2276,7 @@ index 67e90d93f334..9bb9eff44ed7 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,108 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -2277,6 +2322,10 @@ index 67e90d93f334..9bb9eff44ed7 100644
 -    DEFINES["__STDC_CONSTANT_MACROS"] = True
 -    DEFINES["__STDC_FORMAT_MACROS"] = True
 -
+-    OS_LIBS += [
+-        "rt"
+-    ]
+-
 -if CONFIG["OS_TARGET"] == "OpenBSD":
 -
 -    DEFINES["USE_GLIB"] = "1"
@@ -2316,6 +2365,13 @@ index 67e90d93f334..9bb9eff44ed7 100644
 -    DEFINES["_WIN32_WINNT"] = "0x0A00"
 -    DEFINES["_WINDOWS"] = True
 -    DEFINES["__STD_C"] = True
+-
+-    OS_LIBS += [
+-        "crypt32",
+-        "iphlpapi",
+-        "secur32",
+-        "winmm"
+-    ]
 +    DEFINES["_DEBUG"] = True
  
  if CONFIG["TARGET_CPU"] == "aarch64":
@@ -2325,9 +2381,17 @@ index 67e90d93f334..9bb9eff44ed7 100644
  
 -if CONFIG["TARGET_CPU"] == "arm":
 -
+-    CXXFLAGS += [
+-        "-mfpu=neon"
+-    ]
+-
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -2341,10 +2405,12 @@ index 67e90d93f334..9bb9eff44ed7 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -150,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
- 
-     DEFINES["WEBRTC_ENABLE_AVX2"] = True
- 
+-    DEFINES["WEBRTC_ENABLE_AVX2"] = True
+-
+-if CONFIG["TARGET_CPU"] == "x86_64":
+-
+-    DEFINES["WEBRTC_ENABLE_AVX2"] = True
+-
 -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android":
 -
 -    DEFINES["_DEBUG"] = True
@@ -2366,16 +2432,21 @@ index 67e90d93f334..9bb9eff44ed7 100644
 -    DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
 -
 -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
-+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
- 
-     DEFINES["USE_X11"] = "1"
- 
+-
+-    DEFINES["USE_X11"] = "1"
+-
 -if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
 -
 -    OS_LIBS += [
 -        "unwind"
 -    ]
 -
+-if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
+-
+     CXXFLAGS += [
+         "-msse2"
+     ]
+ 
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
 -
 -    DEFINES["_GNU_SOURCE"] = True
@@ -2385,18 +2456,27 @@ index 67e90d93f334..9bb9eff44ed7 100644
 -    DEFINES["_GNU_SOURCE"] = True
 -
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
--
++    DEFINES["WEBRTC_ENABLE_AVX2"] = True
+ 
+-    CXXFLAGS += [
+-        "-msse2"
+-    ]
++if CONFIG["TARGET_CPU"] == "x86_64":
+ 
 -    DEFINES["_GNU_SOURCE"] = True
--
++    DEFINES["WEBRTC_ENABLE_AVX2"] = True
+ 
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64":
--
++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
+ 
 -    DEFINES["_GNU_SOURCE"] = True
--
- Library("echo_control_gn")
-diff --git third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build
-index f639c8e6aa50..b7d03e2fb268 100644
---- third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build
-+++ third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build
++    DEFINES["USE_X11"] = "1"
+ 
+ Library("builtin_audio_processing_builder_gn")
+diff --git third_party/libwebrtc/api/audio/echo_control_gn/moz.build third_party/libwebrtc/api/audio/echo_control_gn/moz.build
+index 904a224b5a88..9bb9eff44ed7 100644
+--- third_party/libwebrtc/api/audio/echo_control_gn/moz.build
++++ third_party/libwebrtc/api/audio/echo_control_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
@@ -2418,7 +2498,7 @@ index f639c8e6aa50..b7d03e2fb268 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,182 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,112 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -2503,13 +2583,6 @@ index f639c8e6aa50..b7d03e2fb268 100644
 -    DEFINES["_WIN32_WINNT"] = "0x0A00"
 -    DEFINES["_WINDOWS"] = True
 -    DEFINES["__STD_C"] = True
--
--    OS_LIBS += [
--        "crypt32",
--        "iphlpapi",
--        "secur32",
--        "winmm"
--    ]
 +    DEFINES["_DEBUG"] = True
  
  if CONFIG["TARGET_CPU"] == "aarch64":
@@ -2519,13 +2592,13 @@ index f639c8e6aa50..b7d03e2fb268 100644
  
 -if CONFIG["TARGET_CPU"] == "arm":
 -
--    CXXFLAGS += [
--        "-mfpu=neon"
--    ]
--
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -2539,12 +2612,10 @@ index f639c8e6aa50..b7d03e2fb268 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
--    DEFINES["WEBRTC_ENABLE_AVX2"] = True
--
--if CONFIG["TARGET_CPU"] == "x86_64":
--
--    DEFINES["WEBRTC_ENABLE_AVX2"] = True
--
+@@ -154,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+ 
+     DEFINES["WEBRTC_ENABLE_AVX2"] = True
+ 
 -if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Android":
 -
 -    DEFINES["_DEBUG"] = True
@@ -2566,21 +2637,16 @@ index f639c8e6aa50..b7d03e2fb268 100644
 -    DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0"
 -
 -if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux":
--
--    DEFINES["USE_X11"] = "1"
--
++if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
+ 
+     DEFINES["USE_X11"] = "1"
+ 
 -if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "arm":
 -
 -    OS_LIBS += [
 -        "unwind"
 -    ]
 -
--if CONFIG["OS_TARGET"] == "Android" and CONFIG["TARGET_CPU"] == "x86":
--
-     CXXFLAGS += [
-         "-msse2"
-     ]
- 
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "aarch64":
 -
 -    DEFINES["_GNU_SOURCE"] = True
@@ -2590,27 +2656,18 @@ index f639c8e6aa50..b7d03e2fb268 100644
 -    DEFINES["_GNU_SOURCE"] = True
 -
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86":
-+    DEFINES["WEBRTC_ENABLE_AVX2"] = True
- 
--    CXXFLAGS += [
--        "-msse2"
--    ]
-+if CONFIG["TARGET_CPU"] == "x86_64":
- 
+-
 -    DEFINES["_GNU_SOURCE"] = True
-+    DEFINES["WEBRTC_ENABLE_AVX2"] = True
- 
+-
 -if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "x86_64":
-+if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD":
- 
+-
 -    DEFINES["_GNU_SOURCE"] = True
-+    DEFINES["USE_X11"] = "1"
- 
- Library("audio_decoder_L16_gn")
-diff --git third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build
-index 38eb1e438940..5c76a4bbb10f 100644
---- third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build
-+++ third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build
+-
+ Library("echo_control_gn")
+diff --git third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build
+index ae4047c15bad..b7d03e2fb268 100644
+--- third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build
++++ third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
@@ -2632,7 +2689,7 @@ index 38eb1e438940..5c76a4bbb10f 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,182 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,186 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -2740,6 +2797,10 @@ index 38eb1e438940..5c76a4bbb10f 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -2820,11 +2881,11 @@ index 38eb1e438940..5c76a4bbb10f 100644
 -    DEFINES["_GNU_SOURCE"] = True
 +    DEFINES["USE_X11"] = "1"
  
- Library("audio_encoder_L16_gn")
-diff --git third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build
-index 3b733727d4f6..475c29ae92d2 100644
---- third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build
-+++ third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build
+ Library("audio_decoder_L16_gn")
+diff --git third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build
+index 9007bea06a57..5c76a4bbb10f 100644
+--- third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build
++++ third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build
 @@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
@@ -2846,7 +2907,7 @@ index 3b733727d4f6..475c29ae92d2 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -46,182 +55,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,186 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -2954,6 +3015,10 @@ index 3b733727d4f6..475c29ae92d2 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -3034,12 +3099,12 @@ index 3b733727d4f6..475c29ae92d2 100644
 -    DEFINES["_GNU_SOURCE"] = True
 +    DEFINES["USE_X11"] = "1"
  
- Library("audio_codecs_api_gn")
-diff --git third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build
-index 23378fd83171..517b3b57ed6b 100644
---- third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build
-+++ third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build
-@@ -12,12 +12,21 @@ AllowCompilerWarnings()
+ Library("audio_encoder_L16_gn")
+diff --git third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build
+index 1de066daa01e..475c29ae92d2 100644
+--- third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build
++++ third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
@@ -3052,7 +3117,6 @@ index 23378fd83171..517b3b57ed6b 100644
  DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0"
 +DEFINES["WEBRTC_POSIX"] = True
  DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0"
- DEFINES["WEBRTC_USE_BUILTIN_OPUS"] = "1"
 +DEFINES["_FILE_OFFSET_BITS"] = "64"
 +DEFINES["_LARGEFILE64_SOURCE"] = True
 +DEFINES["_LARGEFILE_SOURCE"] = True
@@ -3061,7 +3125,7 @@ index 23378fd83171..517b3b57ed6b 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -44,186 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -46,186 +55,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -3107,10 +3171,6 @@ index 23378fd83171..517b3b57ed6b 100644
 -    DEFINES["__STDC_CONSTANT_MACROS"] = True
 -    DEFINES["__STDC_FORMAT_MACROS"] = True
 -
--    OS_LIBS += [
--        "rt"
--    ]
--
 -if CONFIG["OS_TARGET"] == "OpenBSD":
 -
 -    DEFINES["USE_GLIB"] = "1"
@@ -3173,6 +3233,10 @@ index 23378fd83171..517b3b57ed6b 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -3253,11 +3317,11 @@ index 23378fd83171..517b3b57ed6b 100644
 -    DEFINES["_GNU_SOURCE"] = True
 +    DEFINES["USE_X11"] = "1"
  
- Library("builtin_audio_decoder_factory_gn")
-diff --git third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build
-index f58bac277b45..4c5f8099504f 100644
---- third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build
-+++ third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build
+ Library("audio_codecs_api_gn")
+diff --git third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build
+index be74a5a11b8d..517b3b57ed6b 100644
+--- third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build
++++ third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build
 @@ -12,12 +12,21 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
@@ -3280,7 +3344,7 @@ index f58bac277b45..4c5f8099504f 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -44,186 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -3392,6 +3456,10 @@ index f58bac277b45..4c5f8099504f 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
+-if CONFIG["TARGET_CPU"] == "loongarch64":
+-
+-    DEFINES["_GNU_SOURCE"] = True
 -
  if CONFIG["TARGET_CPU"] == "mips32":
  
@@ -3472,12 +3540,12 @@ index f58bac277b45..4c5f8099504f 100644
 -    DEFINES["_GNU_SOURCE"] = True
 +    DEFINES["USE_X11"] = "1"
  
- Library("builtin_audio_encoder_factory_gn")
-diff --git third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build
-index cb227d9c44a9..c883304f6928 100644
---- third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build
-+++ third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build
-@@ -12,11 +12,20 @@ AllowCompilerWarnings()
+ Library("builtin_audio_decoder_factory_gn")
+diff --git third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build
+index f6a0d16b0b5c..4c5f8099504f 100644
+--- third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build
++++ third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build
+@@ -12,12 +12,21 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
@@ -3490,6 +3558,7 @@ index cb227d9c44a9..c883304f6928 100644
  DEFINES["WEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS"] = "0"
 +DEFINES["WEBRTC_POSIX"] = True
  DEFINES["WEBRTC_STRICT_FIELD_TRIALS"] = "0"
+ DEFINES["WEBRTC_USE_BUILTIN_OPUS"] = "1"
 +DEFINES["_FILE_OFFSET_BITS"] = "64"
 +DEFINES["_LARGEFILE64_SOURCE"] = True
 +DEFINES["_LARGEFILE_SOURCE"] = True
@@ -3498,7 +3567,7 @@ index cb227d9c44a9..c883304f6928 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,182 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -44,190 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -3544,6 +3613,10 @@ index cb227d9c44a9..c883304f6928 100644
 -    DEFINES["__STDC_CONSTANT_MACROS"] = True
 -    DEFINES["__STDC_FORMAT_MACROS"] = True
 -
+-    OS_LIBS += [
+-        "rt"
+-    ]
+-
 -if CONFIG["OS_TARGET"] == "OpenBSD":
 -
 -    DEFINES["USE_GLIB"] = "1"
@@ -3606,6 +3679,10 @@ index cb227d9c44a9..c883304f6928 100644
 -    DEFINES["WEBRTC_ARCH_ARM"] = True
 -    DEFINES["WEBRTC_ARCH_ARM_V7"] = True
 -    DEFINES["WEBRTC_HAS_NEON"] = True
+-
*** 18885 LINES SKIPPED ***