summaryrefslogtreecommitdiff
path: root/www/firefox102
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2022-07-21 23:56:38 +0000
committernia <nia@pkgsrc.org>2022-07-21 23:56:38 +0000
commit7699015c95235436b3652f3ac97ac3d6ed703b95 (patch)
tree0c523e05978d3ddd4eede056864d4935db852fa6 /www/firefox102
parentf868fa6212b215d7cb468932ef621d4e7e7942f4 (diff)
downloadpkgsrc-7699015c95235436b3652f3ac97ac3d6ed703b95.tar.gz
Add a package for Firefox 102 ESR
Diffstat (limited to 'www/firefox102')
-rw-r--r--www/firefox102/DESCR14
-rw-r--r--www/firefox102/Makefile175
-rw-r--r--www/firefox102/PLIST44
-rw-r--r--www/firefox102/PLIST.Linux2
-rw-r--r--www/firefox102/distinfo47
-rw-r--r--www/firefox102/files/desktop.in191
-rwxr-xr-xwww/firefox102/files/node-wrapper.sh9
-rw-r--r--www/firefox102/mozilla-common.mk231
-rw-r--r--www/firefox102/options.mk94
-rw-r--r--www/firefox102/patches/patch-browser_app_profile_firefox.js28
-rw-r--r--www/firefox102/patches/patch-build_moz.configure_rust.configure15
-rw-r--r--www/firefox102/patches/patch-config_gcc-stl-wrapper.template.h31
-rw-r--r--www/firefox102/patches/patch-config_makefiles_rust.mk30
-rw-r--r--www/firefox102/patches/patch-dom_base_nsAttrName.h18
-rw-r--r--www/firefox102/patches/patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp17
-rw-r--r--www/firefox102/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h16
-rw-r--r--www/firefox102/patches/patch-gfx_skia_skia_src_core_SkCpu.cpp15
-rw-r--r--www/firefox102/patches/patch-gfx_skia_skia_src_core_SkVM.cpp19
-rw-r--r--www/firefox102/patches/patch-gfx_wr_swgl_build.rs27
-rw-r--r--www/firefox102/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc22
-rw-r--r--www/firefox102/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc18
-rw-r--r--www/firefox102/patches/patch-ipc_glue_GeckoChildProcessHost.cpp21
-rw-r--r--www/firefox102/patches/patch-js_src_jit_ProcessExecutableMemory.cpp38
-rw-r--r--www/firefox102/patches/patch-js_src_jit_arm64_vixl_MozCpu-vixl.cpp38
-rw-r--r--www/firefox102/patches/patch-js_src_util_NativeStack.cpp32
-rw-r--r--www/firefox102/patches/patch-js_src_vm_ArrayBufferObject.cpp24
-rw-r--r--www/firefox102/patches/patch-libwebrtc.diff20339
-rw-r--r--www/firefox102/patches/patch-media_ffvpx_libavutil_arm_bswap.h22
-rw-r--r--www/firefox102/patches/patch-media_libcubeb_src_cubeb__alsa.c12
-rw-r--r--www/firefox102/patches/patch-media_libcubeb_src_cubeb__jack.cpp15
-rw-r--r--www/firefox102/patches/patch-media_libcubeb_src_moz.build19
-rw-r--r--www/firefox102/patches/patch-media_libpng_pngpriv.h17
-rw-r--r--www/firefox102/patches/patch-media_libtheora_lib_info.c19
-rw-r--r--www/firefox102/patches/patch-modules_fdlibm_src_math__private.h18
-rw-r--r--www/firefox102/patches/patch-mozglue_misc_Uptime.cpp15
-rw-r--r--www/firefox102/patches/patch-nsprpub_pr_src_pthreads_ptsynch.c110
-rw-r--r--www/firefox102/patches/patch-security_nss_lib_freebl_mpi_mpi.c35
-rw-r--r--www/firefox102/patches/patch-third__party_js_cfworker_build.sh20
-rw-r--r--www/firefox102/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc63
-rw-r--r--www/firefox102/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc25
-rw-r--r--www/firefox102/patches/patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c27
-rw-r--r--www/firefox102/patches/patch-toolkit_components_terminator_nsTerminator.cpp27
-rw-r--r--www/firefox102/patches/patch-toolkit_modules_subprocess_subprocess__shared__unix.js26
-rw-r--r--www/firefox102/patches/patch-toolkit_moz.configure57
-rw-r--r--www/firefox102/patches/patch-toolkit_mozapps_installer_packager.mk15
-rw-r--r--www/firefox102/patches/patch-widget_gtk_DMABufSurface.cpp32
-rw-r--r--www/firefox102/patches/patch-xpcom_base_nscore.h15
-rw-r--r--www/firefox102/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build15
48 files changed, 22159 insertions, 0 deletions
diff --git a/www/firefox102/DESCR b/www/firefox102/DESCR
new file mode 100644
index 00000000000..a6331e4c2bb
--- /dev/null
+++ b/www/firefox102/DESCR
@@ -0,0 +1,14 @@
+Mozilla Firefox is a free, open-source and cross-platform web browser
+for Windows, Linux, MacOS X and many other operating systems.
+
+It is fast and easy to use, and offers many advantages over other web
+browsers, such as tabbed browsing and the ability to block pop-up
+windows.
+
+Firefox also offers excellent bookmark and history management, and it
+can be extended by developers using industry standards such as XML,
+CSS, JavaScript, C++, etc. Many extensions are available.
+
+This package provides Firefox 91 ESR.
+
+This package has working WebRTC support on x86.
diff --git a/www/firefox102/Makefile b/www/firefox102/Makefile
new file mode 100644
index 00000000000..c552b83afa0
--- /dev/null
+++ b/www/firefox102/Makefile
@@ -0,0 +1,175 @@
+# $NetBSD: Makefile,v 1.1 2022/07/21 23:56:38 nia Exp $
+
+FIREFOX_VER= ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
+MOZ_BRANCH= 102
+MOZ_BRANCH_MINOR= .0esr
+
+DISTNAME= firefox-${FIREFOX_VER}.source
+PKGNAME= ${DISTNAME:S/.source//:S/b/beta/:S/esr//:S/firefox-/firefox102-/g}
+CATEGORIES= www
+MASTER_SITES+= ${MASTER_SITE_MOZILLA:=firefox/releases/${FIREFOX_VER}/source/}
+EXTRACT_SUFX= .tar.xz
+
+NODEJSKIT= nodejs-output-95.0.tgz
+DISTFILES= ${DEFAULT_DISTFILES} ${NODEJSKIT}
+SITES.${NODEJSKIT}= ${MASTER_SITE_LOCAL}
+
+MAINTAINER= ryoon@NetBSD.org
+HOMEPAGE= https://www.mozilla.org/en-US/firefox/
+COMMENT= Web browser with support for extensions (version ${FIREFOX_VER:tu:C/\\.[[:digit:]\.]*//})
+LICENSE= mpl-1.1
+
+# -------- BEFORE UPDATING THIS PACKAGE PLEASE READ & UNDERSTAND: -------
+#
+# This package works around a (stupid) build time dependency on nodejs
+# (which is not available for all architectures and unnecessary for the
+# real build). To do this, it places some additional burden on the
+# maintainer.
+#
+# While working on the package, please make sure you have
+#
+# FIREFOX_MAINTAINER=yes
+#
+# set in your build environment.
+# When the package is ready for commit (but before commit), do:
+#
+# make maintainer-files
+#
+# This will do another round (depending on state of your work dir at this
+# moment) of one or two builds and generate a cache of all output that
+# nodejs generates during a build.
+#
+# When this is done, just commit the results (they will be in the files/
+# directory).
+#
+# -----------------------------------------------------------------------
+
+UNLIMIT_RESOURCES+= datasize virtualsize
+
+WRKSRC= ${WRKDIR}/firefox-${PKGVERSION_NOREV}
+
+MOZILLA_DIR= # empty
+
+# Note: In --enable-chrome-format=flat case,
+# when updating remember to conditionalise about-background.png in PLIST
+CONFIGURE_ARGS+= --enable-application=browser
+
+
+ALL_ENV+= MOZ_APP_NAME=${MOZILLA}
+
+#CFLAGS+= -I${PREFIX}/include/nspr
+# for lang/gcc6
+CFLAGS+= -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS
+CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS
+
+LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/${PKGBASE}
+LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib
+LDFLAGS.DragonFly+= -lplc4 -lnspr4
+LDFLAGS.FreeBSD+= -lplc4 -lnspr4
+LDFLAGS.Linux+= -lnspr4
+LDFLAGS.SunOS+= -lm
+
+# XXX not sure how to test this! likely unnecessary
+NOT_PAX_MPROTECT_SAFE+= lib/${PKGBASE}/plugin-container
+
+# Avoid ld "invalid section index" errors.
+BUILDLINK_TRANSFORM.SunOS+= rm:-fdata-sections
+BUILDLINK_TRANSFORM.SunOS+= rm:-ffunction-sections
+BUILDLINK_TRANSFORM.SunOS+= rm:-pie
+
+# Workaround for https://bugs.llvm.org/show_bug.cgi?id=46366
+BUILDLINK_TRANSFORM.NetBSD+= rm:-fexperimental-new-pass-manager
+
+SUBST_CLASSES+= dfly_malloc_h
+SUBST_STAGE.dfly_malloc_h= pre-configure
+SUBST_MESSAGE.dfly_malloc_h= Dont include malloc.h on dragonflybsd
+SUBST_SED.dfly_malloc_h= -e 's,HAVE_MALLOC_H,HAVE_MALLOC_H \&\& !defined(__DragonFly__),g'
+SUBST_FILES.dfly_malloc_h+= media/ffvpx/libavutil/mem.c
+
+.include "mozilla-common.mk"
+.include "options.mk"
+
+CHECK_INTERPRETER_SKIP+= lib/firefox-sdk/sdk/bin/header.py
+CHECK_INTERPRETER_SKIP+= lib/firefox-sdk/sdk/bin/typelib.py
+CHECK_INTERPRETER_SKIP+= lib/firefox-sdk/sdk/bin/xpidl.py
+CHECK_INTERPRETER_SKIP+= lib/firefox-sdk/sdk/bin/xpt.py
+
+CHECK_WRKREF_SKIP+= lib/${MOZILLA}/omni.ja
+
+MOZILLA= ${PKGBASE}
+
+.if !empty(PKG_OPTIONS:Mofficial-mozilla-branding)
+MOZILLA_NAME= Firefox
+MOZILLA_BRANDING= official
+.else
+MOZILLA_NAME= Browser
+MOZILLA_BRANDING= unofficial
+.endif
+
+pre-configure:
+ cd ${WRKSRC} && autoconf
+ cd ${WRKSRC}/js/src && autoconf
+ cd ${WRKSRC} && mkdir ${OBJDIR}
+ cd ${WRKSRC}/${OBJDIR} && touch old-configure.vars
+# Do not fetch Rust Cargo file via network during build
+.if !defined(FIREFOX_MAINTAINER)
+ mv ${WRKDIR}/dist ${WRKSRC}/${OBJDIR}
+.endif
+
+.if defined(FIREFOX_MAINTAINER)
+# Create files needed only by the firefox maintainer when updating
+# the package
+# XXX - manually removing the .*_done files is wrong!
+.PHONY: build-list
+build-list:
+ cd ${WRKSRC}/${OBJDIR}/dist/bin/browser/chrome && \
+ find . -type f | sort > ${OUT:Q}
+
+NODE_LIST= "${WRKDIR}/node.list"
+NO_NODE_LIST= "${WRKDIR}/no-node.list"
+NODE_FILES= "${WRKDIR}/node.flist"
+
+.PHONY: maintainer-files
+maintainer-files:
+ rm -f ${FILESDIR}/node-wrapper.sh
+ V=$$( node -v ) && \
+ printf '#! /bin/sh\n\nVERS=%s\n\nif [ "$$1" = "-v" ] || [ "$$1" = "--version" ]; then\n\tprintf "$${VERS}\\n"\nfi\n\nexit 0\n' $$V \
+ > ${FILESDIR}/node-wrapper.sh && \
+ chmod 0755 ${FILESDIR}/node-wrapper.sh
+ rm -f ${WRKDIR}/.build_done ${WRKDIR}/.configure_done
+ ${MAKE} MAINTAINER_INTERNAL=yes build
+ ${MAKE} MAINTAINER_INTERNAL=yes OUT="${NO_NODE_LIST}" build-list
+ ${MAKE} OUT="${NODE_LIST}" build-list
+ ${DIFF} -u "${NO_NODE_LIST}" "${NODE_LIST}" | \
+ ${AWK} \
+ '/^\+\.\//{ printf("dist/bin/browser/chrome/%s\n", gensub(/^\+\.\//, "", "")) }' \
+ > "${NODE_FILES}"
+ cd ${WRKSRC}/${OBJDIR} && tar -c -T "${NODE_FILES}" -z \
+ -f ${FILESDIR}/nodejs-output-${PKGVERSION_NOREV}.tgz
+.endif
+
+post-build:
+ ${SED} -e 's|@MOZILLA@|${MOZILLA}|g' \
+ -e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|g' \
+ -e 's|@FIREFOX_ICON@|${MOZILLA}|g' \
+ < ${FILESDIR}/desktop.in \
+ > ${WRKDIR}/desktop
+
+INSTALLATION_DIRS+= share/applications
+
+post-install:
+ ${ECHO} '#! /bin/sh' > ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+ ${ECHO} '${PREFIX}/lib/${MOZILLA}/${MOZILLA} "$$@"' >> \
+ ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+ ${CHMOD} 755 ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+ ${INSTALL_DATA} ${WRKDIR}/desktop \
+ ${DESTDIR}${PREFIX}/share/applications/${MOZILLA}.desktop
+.for i in 16 22 24 32 48 64 128 256
+ ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/icons/hicolor/${i}x${i}/apps
+ ${INSTALL_DATA} ${WRKSRC}/browser/branding/${MOZILLA_BRANDING}/default${i}.png \
+ ${DESTDIR}${PREFIX}/share/icons/hicolor/${i}x${i}/apps/${MOZILLA}.png
+.endfor
+
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/www/firefox102/PLIST b/www/firefox102/PLIST
new file mode 100644
index 00000000000..9ff89af4819
--- /dev/null
+++ b/www/firefox102/PLIST
@@ -0,0 +1,44 @@
+@comment $NetBSD: PLIST,v 1.1 2022/07/21 23:56:38 nia Exp $
+bin/firefox102
+lib/firefox102/application.ini
+lib/firefox102/browser/chrome/icons/default/default128.png
+lib/firefox102/browser/chrome/icons/default/default16.png
+lib/firefox102/browser/chrome/icons/default/default32.png
+lib/firefox102/browser/chrome/icons/default/default48.png
+lib/firefox102/browser/chrome/icons/default/default64.png
+lib/firefox102/browser/features/doh-rollout@mozilla.org.xpi
+lib/firefox102/browser/features/formautofill@mozilla.org.xpi
+lib/firefox102/browser/features/pictureinpicture@mozilla.org.xpi
+lib/firefox102/browser/features/screenshots@mozilla.org.xpi
+lib/firefox102/browser/features/webcompat-reporter@mozilla.org.xpi
+lib/firefox102/browser/features/webcompat@mozilla.org.xpi
+lib/firefox102/browser/omni.ja
+lib/firefox102/defaults/pref/channel-prefs.js
+lib/firefox102/dependentlibs.list
+lib/firefox102/firefox102
+lib/firefox102/firefox102-bin
+lib/firefox102/fonts/TwemojiMozilla.ttf
+lib/firefox102/gmp-clearkey/0.1/libclearkey.so
+lib/firefox102/gmp-clearkey/0.1/manifest.json
+lib/firefox102/libipcclientcerts.so
+lib/firefox102/liblgpllibs.so
+${PLIST.ffvpx}lib/firefox102/libmozavcodec.so
+${PLIST.ffvpx}lib/firefox102/libmozavutil.so
+lib/firefox102/libmozgtk.so
+lib/firefox102/libmozsqlite3.so
+${PLIST.wayland}lib/firefox102/libmozwayland.so
+lib/firefox102/libxul.so
+lib/firefox102/omni.ja
+lib/firefox102/pingsender
+lib/firefox102/platform.ini
+lib/firefox102/plugin-container
+lib/firefox102/removed-files
+share/applications/firefox102.desktop
+share/icons/hicolor/128x128/apps/firefox102.png
+share/icons/hicolor/16x16/apps/firefox102.png
+share/icons/hicolor/22x22/apps/firefox102.png
+share/icons/hicolor/24x24/apps/firefox102.png
+share/icons/hicolor/256x256/apps/firefox102.png
+share/icons/hicolor/32x32/apps/firefox102.png
+share/icons/hicolor/48x48/apps/firefox102.png
+share/icons/hicolor/64x64/apps/firefox102.png
diff --git a/www/firefox102/PLIST.Linux b/www/firefox102/PLIST.Linux
new file mode 100644
index 00000000000..be7819d1680
--- /dev/null
+++ b/www/firefox102/PLIST.Linux
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST.Linux,v 1.1 2022/07/21 23:56:38 nia Exp $
+lib/firefox/libmozsandbox.so
diff --git a/www/firefox102/distinfo b/www/firefox102/distinfo
new file mode 100644
index 00000000000..9bbac38a33d
--- /dev/null
+++ b/www/firefox102/distinfo
@@ -0,0 +1,47 @@
+$NetBSD: distinfo,v 1.1 2022/07/21 23:56:38 nia Exp $
+
+BLAKE2s (firefox-102.0esr.source.tar.xz) = 877546ff9e5632e1b1e930ddafb156890b7c7730eeef77b78c21e38e04cd5ed2
+SHA512 (firefox-102.0esr.source.tar.xz) = 76494363ffdbd33b61912ac72b5cc15450e4b2936898c84fcf3980ccfa6d7ecc05524a63a60827d6caba999ada5cfd6f121e893ba0587778ce11654d0daf21d7
+Size (firefox-102.0esr.source.tar.xz) = 486474876 bytes
+BLAKE2s (nodejs-output-95.0.tgz) = c44b37d3605524a49157002f01c29f568f04194b0e635bc312de7ffdeb9a74c9
+SHA512 (nodejs-output-95.0.tgz) = 2faf326f4e100b66f8597c365cc2eb5d0eee26aae92a7e2446891f2178041aa71ba16eae37000acacd43a657025ec11c18db73b112f5c49cc21cdb882da6d798
+Size (nodejs-output-95.0.tgz) = 200627 bytes
+SHA1 (patch-browser_app_profile_firefox.js) = 7f6b4361fe62ccc2d1c092a5ace97ea2085727bf
+SHA1 (patch-build_moz.configure_rust.configure) = 25ddfacd29cebbc6db005dbe61a2a7446d480678
+SHA1 (patch-config_gcc-stl-wrapper.template.h) = 9d1f15ff487efa9202114d19ed5668b4e7aa032a
+SHA1 (patch-config_makefiles_rust.mk) = 188178b184d79737247ed3770cc8f4370cd7f6c0
+SHA1 (patch-dom_base_nsAttrName.h) = ac7ba441a3b27df2855cf2673eea36b1cb44ad49
+SHA1 (patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp) = e458c9c8dc66edc69c1874734af28a77fc5e3993
+SHA1 (patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h) = b2adce9e65662283a11b6dcff40e95523e940045
+SHA1 (patch-gfx_skia_skia_src_core_SkCpu.cpp) = 36218819254f3681b9c717d652ea78c9f20d49ad
+SHA1 (patch-gfx_skia_skia_src_core_SkVM.cpp) = cdb2c2b0d512c0eb8403abba9b74c218d3a306ea
+SHA1 (patch-gfx_wr_swgl_build.rs) = df6ebfaabb4d27994e59a9d0eaf12c7cf08415fb
+SHA1 (patch-ipc_chromium_src_base_message__pump__libevent.cc) = 298642a3527804115b398fb7904a3596962932e3
+SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = 35d20981d33ccdb1d8ffb8039e48798777f11658
+SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = 6cdd0fe60455eab8f9846257c2bfea207f19478b
+SHA1 (patch-js_src_jit_ProcessExecutableMemory.cpp) = fad103cc698f9828ad58f742231984ec2bc27605
+SHA1 (patch-js_src_jit_arm64_vixl_MozCpu-vixl.cpp) = fdc522e3fb626b1b8a2ebf19ad60bfc25dfa4183
+SHA1 (patch-js_src_util_NativeStack.cpp) = a0a16d8d8d78d3cc3f4d2a508586f1a7821f7dba
+SHA1 (patch-js_src_vm_ArrayBufferObject.cpp) = 0501fdcae11568ae4ea78e0d2f6b3750b7a67d47
+SHA1 (patch-libwebrtc.diff) = 0506b1e8fc0bc42e24f45d13194536aa7ad7eeba
+SHA1 (patch-media_ffvpx_libavutil_arm_bswap.h) = de58daa0fd23d4fec50426602b65c9ea5862558a
+SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = 2ef11da83c90c41490db4c0d9809c3e1826b488a
+SHA1 (patch-media_libcubeb_src_cubeb__jack.cpp) = fc546c5e6582fd5eda64ba83287dfbbb3c9e229f
+SHA1 (patch-media_libcubeb_src_moz.build) = e027285ea24f2626b1328d4c6e9a31ed55445f99
+SHA1 (patch-media_libpng_pngpriv.h) = c8084332560017cd7c9b519b61d125fa28af0dbc
+SHA1 (patch-media_libtheora_lib_info.c) = f6dbf536d73859a1ff78304c2e9f6a6f74dac01f
+SHA1 (patch-modules_fdlibm_src_math__private.h) = 6ae3b0077b4a8c6088c35769fa1972cfc44ea9c1
+SHA1 (patch-mozglue_misc_Uptime.cpp) = daefe25ef1ebc8e4d3735017b9e8ac68c4710a00
+SHA1 (patch-nsprpub_pr_src_pthreads_ptsynch.c) = 13e512c7ee9fa1e14ba415d62fa853e5fbfc91c0
+SHA1 (patch-security_nss_lib_freebl_mpi_mpi.c) = a7cd867916524770609d1c307a65b315b88456f4
+SHA1 (patch-third__party_js_cfworker_build.sh) = 46cdf97b99cf01080f290ae8d9a33b5f869fc3e4
+SHA1 (patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc) = 2e951d7d91934751608e99628fc144632d8a3b5c
+SHA1 (patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc) = b90e22b50879f7adcc1da3a993f52c0701b720f8
+SHA1 (patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c) = ba423726a4859f19aa627bb127e5597eac323016
+SHA1 (patch-toolkit_components_terminator_nsTerminator.cpp) = bd7b2a0f2407c3ab95515b2f143c41c3ca6fb0c4
+SHA1 (patch-toolkit_modules_subprocess_subprocess__shared__unix.js) = 2303b753066298305ccae80d72765dbc4da5e0dc
+SHA1 (patch-toolkit_moz.configure) = 8de54693dc47b0993f220cc5a04af98925de1fb5
+SHA1 (patch-toolkit_mozapps_installer_packager.mk) = 706635b76a7b525794aba95e95544f09e18bb662
+SHA1 (patch-widget_gtk_DMABufSurface.cpp) = 72bc9554f075734df12e1748fb8965dce8318de5
+SHA1 (patch-xpcom_base_nscore.h) = 1ac4d34d3c9e80bc1ac966c6c84cb320bc0fa1ec
+SHA1 (patch-xpcom_reflect_xptcall_md_unix_moz.build) = f7e491c7b62a5332066473bfc815e0050672a372
diff --git a/www/firefox102/files/desktop.in b/www/firefox102/files/desktop.in
new file mode 100644
index 00000000000..d72090e1aab
--- /dev/null
+++ b/www/firefox102/files/desktop.in
@@ -0,0 +1,191 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=@MOZILLA_NAME@ Web Browser
+Name[am]=
+Name[ar]=
+Name[az]=@MOZILLA_NAME@ Veb Səyyahı
+Name[be]=
+Name[bg]=Интернет браузър @MOZILLA_NAME@
+Name[bn]=
+Name[bs]=@MOZILLA_NAME@ web preglednik
+Name[ca]=Navegador web @MOZILLA_NAME@
+Name[cs]=Prohlížeč WWW @MOZILLA_NAME@
+Name[cy]=Y Porwr Gwe @MOZILLA_NAME@
+Name[da]=@MOZILLA_NAME@ - internetsurfning
+Name[de]=@MOZILLA_NAME@ Webbrowser
+Name[el]=Περιηγητής Διαδικτύου @MOZILLA_NAME@
+Name[en_CA]=@MOZILLA_NAME@ Web Browser
+Name[en_GB]=@MOZILLA_NAME@ Web Browser
+Name[es]=Navegador Web @MOZILLA_NAME@
+Name[et]=@MOZILLA_NAME@ veebibrauser
+Name[eu]=@MOZILLA_NAME@ web arakatzailea
+Name[fi]=@MOZILLA_NAME@, WWW-selain
+Name[fr]=Navigateur Web @MOZILLA_NAME@
+Name[ga]=Brabhsálaí Lín @MOZILLA_NAME@
+Name[gu]=એપીફની વૅબ બ્રાઉઝર
+Name[he]=דפדפן @MOZILLA_NAME@
+Name[hi]=
+Name[hr]=@MOZILLA_NAME@ Web preglednik
+Name[hu]=@MOZILLA_NAME@ webböngésző
+Name[id]=Web Browser @MOZILLA_NAME@
+Name[it]=Browser web @MOZILLA_NAME@
+Name[ja]=@MOZILLA_NAME@ ウェブ・ブラウザ
+Name[ko]=@MOZILLA_NAME@ 웹 브라우저
+Name[li]=@MOZILLA_NAME@ Web Browser
+Name[lt]=@MOZILLA_NAME@ web naršyklė
+Name[mk]=@MOZILLA_NAME@ веб прелистувач
+Name[ml]=എപ്പിഫാനി വെബ്ബ് ബ്രൌസ‌ര്
+Name[mn]=@MOZILLA_NAME@ веб хөтөч
+Name[ms]=Pelungsur Web @MOZILLA_NAME@
+Name[nb]=@MOZILLA_NAME@ nettleser
+Name[nl]=@MOZILLA_NAME@ Webbrowser
+Name[nn]=@MOZILLA_NAME@ nettlesar
+Name[no]=@MOZILLA_NAME@ nettleser
+Name[pa]=ਏਪੀਫਾਨੀ ਵੈੱਬ ਬਰਾਊਜ਼ਰ
+Name[pl]=Przeglądarka WWW @MOZILLA_NAME@
+Name[pt]=Navegador Web @MOZILLA_NAME@
+Name[pt_BR]=Navegador Web @MOZILLA_NAME@
+Name[ro]=Navigatorul @MOZILLA_NAME@
+Name[ru]=Веб-браузер @MOZILLA_NAME@
+Name[sk]=
+Name[sl]=Spletni brskalnik @MOZILLA_NAME@
+Name[sq]=@MOZILLA_NAME@ - Shfletuesi Web
+Name[sr]=
+Name[sr@Latn]=Veb čitač Spoznaja
+Name[sv]=Webbläsaren @MOZILLA_NAME@
+Name[ta]=எபிபனி வலை உலாவி
+Name[tk]=@MOZILLA_NAME@ Web Ahtarçisi
+Name[tr]=@MOZILLA_NAME@ Web Tarayıcı
+Name[uk]=Переглядач web @MOZILLA_NAME@
+Name[vi]=Trình Duyệt Web @MOZILLA_NAME@
+Name[wa]=Betchteu waibe epiphany
+Name[zh_CN]=@MOZILLA_NAME@ Web 浏览器
+Name[zh_TW]=@MOZILLA_NAME@ 網頁瀏覽器
+GenericName=Web Browser
+GenericName[ar]=متصفّح الانترنت
+GenericName[az]=Veb Səyyahı
+GenericName[be]=Вандроўнік па павуціньню
+GenericName[bg]=Браузър
+GenericName[bn]=ওয়েব ব্রাউজার
+GenericName[bs]=Web preglednik
+GenericName[ca]=Navegador web
+GenericName[cs]=Prohlížeč WWW
+GenericName[cy]=Porwr Gwe
+GenericName[da]=Internetsurfning
+GenericName[de]=Webbrowser
+GenericName[el]=Περιηγητής Ιστοσελίδων
+GenericName[en_CA]=Web Browser
+GenericName[en_GB]=Web Browser
+GenericName[es]=Navegador web
+GenericName[et]=Veebilehitseja
+GenericName[eu]=Web arakatzailea
+GenericName[fi]=WWW-selain
+GenericName[fr]=Navigateur Web @MOZILLA_NAME@
+GenericName[ga]=Brabhsálaí Lín
+GenericName[gu]=વેબ બ્રાઉઝર
+GenericName[he]=דפדפן אינטרנט
+GenericName[hi]=वेब ब्राउज़र
+GenericName[hr]=Web preglednik
+GenericName[hu]=Webböngésző
+GenericName[id]=Browser Web
+GenericName[it]=Browser web
+GenericName[ja]=GNOME ウェブ・ブラウザ
+GenericName[ko]=웹 브라우저
+GenericName[li]=Wèb Browser
+GenericName[lt]=Web naršyklė
+GenericName[mk]=Веб прелистувач
+GenericName[mn]=Веб хөтөч
+GenericName[ms]=Pelungsur Web
+GenericName[nb]=Nettleser
+GenericName[nl]=Web-browser
+GenericName[nn]=Nettlesar
+GenericName[no]=Nettleser
+GenericName[pa]=ਵੈਬ ਬਰਾਊਜ਼
+GenericName[pl]=Przeglądarka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador Web
+GenericName[ro]=Navigator Internet
+GenericName[ru]=Веб-браузер
+GenericName[sk]=WWW prehliadač
+GenericName[sl]=Spletni brskalnik
+GenericName[sq]=Shfletuesi Web
+GenericName[sr]=Веб читач
+GenericName[sr@Latn]=Veb čitač
+GenericName[sv]=Webbläsare
+GenericName[ta]=வலை உலாவி
+GenericName[th]=เว็บบราวเซอร์
+GenericName[tk]=Web Ahtarçysy
+GenericName[tr]=Web Tarayıcı
+GenericName[uk]=Переглядач web-сторінок
+GenericName[vi]=Trình duyệt Web
+GenericName[wa]=Betchteu waibe
+GenericName[zh_CN]=Web 浏览器
+GenericName[zh_TW]=網頁瀏覽器
+Comment=Browse the web
+Comment[ar]=تصفح الانترنت
+Comment[az]=Vebi gəzin
+Comment[be]=Вандраваць па павуціньню
+Comment[bg]=Сърфиране в интернет
+Comment[bn]=ওয়েব ব্রাউজ করুন
+Comment[bs]=Pregledaj na internetu
+Comment[ca]=Navegueu per la web
+Comment[cs]=Prohlížet WWW
+Comment[cy]=Pori'r we
+Comment[da]=Surf på internettet
+Comment[de]=Im Web surfen
+Comment[el]=Περιήγηση στον παγκόσμιο ιστό
+Comment[en_CA]=Browse the web
+Comment[en_GB]=Browse the web
+Comment[es]=Navegar por la web
+Comment[et]=Sirvi veebi
+Comment[eu]=Arakatu web-a
+Comment[fi]=Selaa WWW:tä
+Comment[fr]=Naviguer sur Internet
+Comment[ga]=Brabhsáil an Líon
+Comment[gu]=વેબમાં શોધો
+Comment[he]=גלוש ברשת
+Comment[hi]=वेब ब्राउज़ करें
+Comment[hr]=Pregledaj Web
+Comment[hu]=A világháló böngészése
+Comment[id]=Jelajah web
+Comment[it]=Esplora il web
+Comment[ja]=ウェブを閲覧します
+Comment[ko]=웹을 돌아 다닙니다
+Comment[li]=Blajere op internet
+Comment[lt]=Naršyti internete
+Comment[mk]=Прелистувајте на веб
+Comment[ml]=വലക്കെട്ട് തിരയുക
+Comment[mn]=Веб броузе хийх
+Comment[ms]=Layari web
+Comment[nb]=Surf på nettet
+Comment[nl]=Websurfen
+Comment[nn]=Surf på nettet
+Comment[no]=Surf på nettet
+Comment[pa]=ਵੈਬ ਬਰਾਊਜ਼
+Comment[pl]=Przeglądanie stron WWW
+Comment[pt]=Navegar na web
+Comment[pt_BR]=Navegar na web
+Comment[ro]=Navigare Internet
+Comment[ru]=Веб-браузер
+Comment[sk]=Prehliadať internet
+Comment[sl]=Brskaj po spletu
+Comment[sq]=Eksploro web-in
+Comment[sr]=Прегледај веб
+Comment[sr@Latn]=Pregledaj veb
+Comment[sv]=Surfa på nätet
+Comment[ta]=வலையில் உலாவு
+Comment[th]=ใช้งานเว็บบราวเซอร์ @MOZILLA_NAME@
+Comment[tk]=Webi Ahtar
+Comment[tr]=Web'e Gözat
+Comment[uk]=Програма перегляду web-сторінок
+Comment[vi]=Duyệt web
+Comment[wa]=Naivyî avå les waibes
+Comment[zh_CN]=浏览 Web
+Comment[zh_TW]=瀏覽網頁
+Exec=@MOZILLA@ %u
+Icon=@FIREFOX_ICON@
+StartupNotify=false
+Terminal=false
+Type=Application
+Categories=Application;Network;
+MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
diff --git a/www/firefox102/files/node-wrapper.sh b/www/firefox102/files/node-wrapper.sh
new file mode 100755
index 00000000000..2f6b52bdd6a
--- /dev/null
+++ b/www/firefox102/files/node-wrapper.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+VERS=v14.18.1
+
+if [ "$1" = "-v" ] || [ "$1" = "--version" ]; then
+ printf "${VERS}\n"
+fi
+
+exit 0
diff --git a/www/firefox102/mozilla-common.mk b/www/firefox102/mozilla-common.mk
new file mode 100644
index 00000000000..3bb776bb5d0
--- /dev/null
+++ b/www/firefox102/mozilla-common.mk
@@ -0,0 +1,231 @@
+# $NetBSD: mozilla-common.mk,v 1.1 2022/07/21 23:56:38 nia Exp $
+#
+# common Makefile fragment for mozilla packages based on gecko 2.0.
+#
+# used by www/firefox/Makefile
+
+.include "../../mk/bsd.prefs.mk"
+
+PYTHON_VERSIONS_INCOMPATIBLE= 27
+PYTHON_FOR_BUILD_ONLY= tool
+ALL_ENV+= PYTHON3=${PYTHONBIN}
+
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS+= --prefix=${PREFIX}
+USE_TOOLS+= pkg-config perl gmake autoconf213 gm4 unzip zip
+UNLIMIT_RESOURCES+= datasize virtualsize
+
+USE_LANGUAGES+= c c++
+
+# ERROR: Only GCC 7.1 or newer is supported (found version 5.5.0).
+GCC_REQD+= 7
+
+TOOL_DEPENDS+= cbindgen>=0.23.0:../../devel/cbindgen
+
+.if defined(FIREFOX_MAINTAINER) && !defined(MAINTAINER_INTERNAL)
+TOOL_DEPENDS+= nodejs-[0-9]*:../../lang/nodejs
+USE_TOOLS+= diff
+.else
+CONFIGURE_ENV+= NODEJS="${FILESDIR}/node-wrapper.sh"
+.endif
+
+TOOL_DEPENDS+= ${PYPKGPREFIX}-sqlite3-[0-9]*:../../databases/py-sqlite3
+TOOL_DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
+
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+TOOL_DEPENDS+= nasm>=2.14:../../devel/nasm
+TOOL_DEPENDS+= yasm>=1.1:../../devel/yasm
+.endif
+
+# This is to work around build failures where an upstream configuration script
+# is confused by having more than one approximate match to MACHINE_GNU_PLATFORM
+# "i486" when attempting to select the Rust compiler target.
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386)
+CONFIGURE_ARGS+= --target=i586-unknown-netbsd
+CONFIGURE_ARGS+= --host=i586-unknown-netbsd
+.else
+CONFIGURE_ARGS+= --target=${MACHINE_GNU_PLATFORM}
+CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM}
+.endif
+
+CONFIGURE_ENV+= BINDGEN_CFLAGS="-isystem${PREFIX}/include/nspr \
+ -isystem${X11BASE}/include/pixman-1"
+
+do-test:
+ cd ${WRKSRC}/${OBJDIR}/dist/bin && \
+ ./run-mozilla.sh ${WRKSRC}/mach check-spidermonkey
+
+# tar(1) of OpenBSD 5.5 has no --exclude command line option.
+.if ${OPSYS} == "OpenBSD"
+TOOLS_PLATFORM.tar= ${TOOLS_PATH.bsdtar}
+USE_TOOLS+= bsdtar
+.else
+USE_TOOLS+= tar
+.endif
+
+.if ${MACHINE_ARCH} == "i386"
+# This is required for SSE2 code under i386.
+CXXFLAGS+= -mstackrealign
+.endif
+
+CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}security/nss/tests/*/*.sh
+CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}js/src/tests/update-test262.sh
+CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}intl/icu/source/configure
+CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}browser/components/loop/run-all-loop-tests.sh
+CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}browser/extensions/loop/run-all-loop-tests.sh
+#CHECK_PORTABILITY_SKIP+= ${MOZILLA_DIR}modules/pdfium/update.sh
+
+CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk3
+CONFIGURE_ARGS+= --enable-release
+# Disable Rust SIMD option to fix build with lang/rust-1.33.0
+# This should be enabled later again.
+#CONFIGURE_ARGS+= --enable-rust-simd
+CONFIGURE_ARGS+= --disable-tests
+# Mozilla Bug 1432751
+#CONFIGURE_ARGS+= --enable-system-cairo
+CONFIGURE_ARGS+= --enable-system-pixman
+# webrtc option requires internal libvpx
+#CONFIGURE_ARGS+= --with-system-libvpx
+CONFIGURE_ARGS+= --enable-system-ffi
+CONFIGURE_ARGS+= --with-system-icu
+CONFIGURE_ARGS+= --with-system-nss
+CONFIGURE_ARGS+= --with-system-nspr
+#CONFIGURE_ARGS+= --with-system-jpeg
+CONFIGURE_ARGS+= --with-system-zlib
+CONFIGURE_ARGS+= --with-system-libevent
+CONFIGURE_ARGS+= --disable-crashreporter
+CONFIGURE_ARGS+= --enable-chrome-format=omni
+CONFIGURE_ARGS+= --with-system-webp
+
+#CONFIGURE_ARGS+= --enable-readline
+CONFIGURE_ARGS+= --disable-icf
+CONFIGURE_ARGS+= --disable-updater
+
+.include "../../mk/compiler.mk"
+
+.if empty(PKGSRC_COMPILER:Mclang)
+# Set path to "clang for cbindgen" when target compiler is not clang.
+CONFIGURE_ARGS+= --with-clang-path=${PREFIX}/bin/clang
+.endif
+CONFIGURE_ARGS+= --with-libclang-path=${PREFIX}/lib
+
+# RLBox WASM sandbox
+.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
+# For wasm-ld command
+BUILD_DEPENDS+= lld-[0-9]*:../../devel/lld
+.include "../../lang/wasi-libc/buildlink3.mk"
+.include "../../lang/wasi-libcxx/buildlink3.mk"
+# NB the exact versions of the clang and wasi-compiler-rt dependencies must
+# be kept in sync, or build failures will occur due to path mismatches.
+.include "../../lang/wasi-compiler-rt/buildlink3.mk"
+CONFIGURE_ARGS+= --with-wasi-sysroot=${PREFIX}/wasi
+CONFIGURE_ENV+= WASM_CC=${PREFIX}/bin/clang
+CONFIGURE_ENV+= WASM_CXX=${PREFIX}/bin/clang++
+.else
+CONFIGURE_ARGS+= --without-wasm-sandboxed-libraries
+.endif
+
+SUBST_CLASSES+= fix-paths
+SUBST_STAGE.fix-paths= pre-configure
+SUBST_MESSAGE.fix-paths= Fixing absolute paths.
+SUBST_FILES.fix-paths+= ${MOZILLA_DIR}xpcom/io/nsAppFileLocationProvider.cpp
+SUBST_SED.fix-paths+= -e 's,/usr/lib/mozilla/plugins,${PREFIX}/lib/netscape/plugins,g'
+
+.include "../../sysutils/pciutils/libname.mk"
+SUBST_CLASSES+= fix-libpci-soname
+SUBST_STAGE.fix-libpci-soname= pre-configure
+SUBST_MESSAGE.fix-libpci-soname= Fixing libpci soname
+SUBST_FILES.fix-libpci-soname+= ${MOZILLA_DIR}toolkit/xre/glxtest.cpp
+SUBST_SED.fix-libpci-soname+= -e 's,"libpci.so, "lib${PCIUTILS_LIBNAME}.so,'
+
+# Workaround for link of libxul.so as of 96.0.
+# There are too many -ldl under third_paty/libwebrtc.
+BUILDLINK_TRANSFORM.NetBSD+= rm:-ldl
+
+CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}build/autoconf/config.guess
+CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}js/src/build/autoconf/config.guess
+CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}nsprpub/build/autoconf/config.guess
+CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}/js/ctypes/libffi/config.guess
+CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}build/autoconf/config.sub
+CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}js/src/build/autoconf/config.sub
+CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}nsprpub/build/autoconf/config.sub
+CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}/js/ctypes/libffi/config.sub
+
+CONFIGURE_ENV+= CPP=${CPP:Q}
+ALL_ENV+= SHELL=${CONFIG_SHELL:Q}
+
+# Build outside ${WRKSRC}
+# Try to avoid conflict with config/makefiles/xpidl/Makefile.in
+.if ${MAINTAINER_INTERNAL:Uno} == "yes"
+OBJDIR= ../no-node-build
+.else
+OBJDIR= ../build
+.endif
+CONFIGURE_DIRS= ${OBJDIR}
+CONFIGURE_SCRIPT= ${WRKSRC}/configure
+
+PLIST_VARS+= ffvpx
+
+.if ${MACHINE_ARCH} == "aarch64" || \
+ ${MACHINE_ARCH:M*arm*} || \
+ ${MACHINE_ARCH} == "i386" || \
+ ${MACHINE_ARCH} == "x86_64"
+PLIST.ffvpx= yes # see media/ffvpx/ffvpxcommon.mozbuild
+.endif
+
+# See ${WRKSRC}/security/sandbox/mac/Sandbox.mm: On Darwin, sandboxing
+# support is only available when the toolkit is cairo-cocoa.
+CONFIGURE_ARGS.Darwin+= --disable-sandbox
+
+# Makefiles sometimes call "rm -f" without more arguments. Kludge around ...
+.PHONY: create-rm-wrapper
+pre-configure: create-rm-wrapper
+create-rm-wrapper:
+ printf '#!/bin/sh\n[ "$$*" = "-f" ] && exit 0\nexec /bin/rm $$@\n' > \
+ ${WRAPPER_DIR}/bin/rm
+ chmod +x ${WRAPPER_DIR}/bin/rm
+
+# The configure test for __thread succeeds, but later we end up with:
+# dist/bin/libxul.so: undefined reference to `__tls_get_addr'
+CONFIGURE_ENV.NetBSD+= ac_cv_thread_keyword=no
+# In unspecified case, clock_gettime(CLOCK_MONOTONIC, ...) fails.
+CONFIGURE_ENV.NetBSD+= ac_cv_clock_monotonic=
+
+.include "../../sysutils/pciutils/buildlink3.mk"
+.include "../../mk/atomic64.mk"
+BUILDLINK_API_DEPENDS.libevent+= libevent>=1.1
+.include "../../devel/libevent/buildlink3.mk"
+.include "../../devel/libffi/buildlink3.mk"
+BUILDLINK_API_DEPENDS.nspr+= nspr>=4.34
+.include "../../devel/nspr/buildlink3.mk"
+.include "../../textproc/icu/buildlink3.mk"
+BUILDLINK_API_DEPENDS.nss+= nss>=3.79
+.include "../../devel/nss/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+#.include "../../mk/jpeg.buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
+#BUILDLINK_API_DEPENDS.cairo+= cairo>=1.10.2nb4
+#.include "../../graphics/cairo/buildlink3.mk"
+BUILDLINK_API_DEPENDS.libwebp+= libwebp>=1.0.2
+.include "../../graphics/libwebp/buildlink3.mk"
+BUILDLINK_DEPMETHOD.clang= build
+.include "../../lang/clang/buildlink3.mk"
+RUST_REQ= 1.59.0
+.include "../../lang/rust/rust.mk"
+# webrtc option requires internal libvpx
+#BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.3.0
+#.include "../../multimedia/libvpx/buildlink3.mk"
+.include "../../net/libIDL/buildlink3.mk"
+# textproc/hunspell 1.3 is too old
+#.include "../../textproc/hunspell/buildlink3.mk"
+.include "../../multimedia/ffmpeg5/buildlink3.mk"
+.include "../../x11/libXt/buildlink3.mk"
+.include "../../x11/libXtst/buildlink3.mk"
+BUILDLINK_API_DEPENDS.pixman+= pixman>=0.25.2
+.include "../../x11/pixman/buildlink3.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+PLIST_VARS+= wayland
+.if ${PKG_BUILD_OPTIONS.gtk3:Mwayland}
+PLIST.wayland= yes
+.endif
+.include "../../lang/python/pyversion.mk"
diff --git a/www/firefox102/options.mk b/www/firefox102/options.mk
new file mode 100644
index 00000000000..b87fc4b61f7
--- /dev/null
+++ b/www/firefox102/options.mk
@@ -0,0 +1,94 @@
+# $NetBSD: options.mk,v 1.1 2022/07/21 23:56:38 nia Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.firefox
+
+PKG_SUPPORTED_OPTIONS= official-mozilla-branding
+PKG_SUPPORTED_OPTIONS+= debug debug-info mozilla-jemalloc webrtc
+PKG_SUPPORTED_OPTIONS+= dbus
+PKG_SUPPORTED_OPTIONS+= alsa pulseaudio sunaudio jack
+
+PKG_SUGGESTED_OPTIONS+= dbus
+
+.if ${OPSYS} == "Linux"
+PKG_SUGGESTED_OPTIONS+= pulseaudio mozilla-jemalloc webrtc
+.endif
+
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS"
+PKG_SUGGESTED_OPTIONS+= sunaudio
+.endif
+
+.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} >= 090000 && (!empty(MACHINE_ARCH:Mx86_64) || !empty(MACHINE_ARCH:Mi386))
+PKG_SUGGESTED_OPTIONS+= webrtc
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+AUDIO_BACKENDS+= alsa
+.include "../../audio/alsa-lib/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mmozilla-jemalloc)
+CONFIGURE_ARGS+= --enable-jemalloc
+CONFIGURE_ARGS+= --enable-replace-malloc
+.else
+CONFIGURE_ARGS+= --disable-jemalloc
+.endif
+
+.if !empty(PKG_OPTIONS:Mdebug)
+CONFIGURE_ARGS+= --enable-debug="-g -Og"
+CONFIGURE_ARGS+= --disable-optimize
+CONFIGURE_ARGS+= --enable-debug-js-modules
+CONFIGURE_ARGS+= --disable-install-strip
+.else
+. if !empty(PKG_OPTIONS:Mdebug-info)
+CONFIGURE_ARGS+= --enable-debug-symbols
+CONFIGURE_ARGS+= --enable-optimize=-O2
+CONFIGURE_ARGS+= --disable-install-strip
+. else
+CONFIGURE_ARGS+= --disable-debug-symbols
+CONFIGURE_ARGS+= --enable-optimize=-O2
+CONFIGURE_ARGS+= --enable-install-strip
+. endif
+CONFIGURE_ARGS+= --disable-debug
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+AUDIO_BACKENDS+= pulseaudio
+.include "../../audio/pulseaudio/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mdbus)
+.include "../../sysutils/dbus-glib/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-dbus
+.else
+CONFIGURE_ARGS+= --disable-dbus
+.endif
+
+.if !empty(PKG_OPTIONS:Mofficial-mozilla-branding)
+CONFIGURE_ARGS+= --enable-official-branding
+LICENSE= mozilla-trademark-license
+RESTRICTED= Trademark holder prohibits distribution of modified versions.
+NO_BIN_ON_CDROM= ${RESTRICTED}
+NO_BIN_ON_FTP= ${RESTRICTED}
+.else
+CONFIGURE_ARGS+= --with-branding=browser/branding/unofficial
+.endif
+
+.if !empty(PKG_OPTIONS:Msunaudio)
+AUDIO_BACKENDS+= sunaudio
+.endif
+
+.if !empty(PKG_OPTIONS:Mjack)
+AUDIO_BACKENDS+= jack
+.include "../../audio/jack/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mwebrtc)
+.include "../../graphics/libv4l/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-webrtc
+.else
+CONFIGURE_ARGS+= --disable-webrtc
+.endif
+
+CONFIGURE_ARGS+= --audio-backends=${AUDIO_BACKENDS:ts,}
diff --git a/www/firefox102/patches/patch-browser_app_profile_firefox.js b/www/firefox102/patches/patch-browser_app_profile_firefox.js
new file mode 100644
index 00000000000..d271479ffac
--- /dev/null
+++ b/www/firefox102/patches/patch-browser_app_profile_firefox.js
@@ -0,0 +1,28 @@
+$NetBSD: patch-browser_app_profile_firefox.js,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+This patch modifies default Firefox settings - see the comments above
+each one.
+
+--- browser/app/profile/firefox.js.orig 2022-04-28 23:01:46.000000000 +0000
++++ browser/app/profile/firefox.js
+@@ -2205,6 +2205,20 @@ pref("fission.frontend.simulate-messages
+ pref("toolkit.coverage.enabled", false);
+ pref("toolkit.coverage.endpoint.base", "https://coverage.mozilla.org");
+
++// Select UI locale from LANG/LC_MESSAGE environmental variables
++pref("intl.locale.requested", "");
++
++// Enable system addons, for example langpacks from www/firefox-l10n
++pref("extensions.autoDisableScopes", 11);
++
++// Firefox includes a complex mechanism for "blacklisting" GPUs that
++// appears to fail on a NetBSD system where the only available OpenGL
++// implementations are all from Mesa. WebRender was supposed to be
++// enabled by default from Firefox 91 onwards and appears to greatly
++// improve performance even with acceleration disabled at the kernel
++// level.
++pref("gfx.webrender.all", true);
++
+ // Discovery prefs
+ pref("browser.discovery.enabled", true);
+ pref("browser.discovery.containers.enabled", true);
diff --git a/www/firefox102/patches/patch-build_moz.configure_rust.configure b/www/firefox102/patches/patch-build_moz.configure_rust.configure
new file mode 100644
index 00000000000..3a03dd4f3c3
--- /dev/null
+++ b/www/firefox102/patches/patch-build_moz.configure_rust.configure
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_moz.configure_rust.configure,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Do not match rumprun toolchain for NetBSD,
+ narrowed should be one not two.
+
+--- build/moz.configure/rust.configure.orig 2020-12-03 23:12:39.000000000 +0000
++++ build/moz.configure/rust.configure
+@@ -371,6 +371,7 @@ def detect_rustc_target(
+ for c in candidates
+ if c.target.raw_os == host_or_target.raw_os
+ and c.target.raw_cpu == host_or_target.raw_cpu
++ and not c.rust_target.endswith("-rumprun-netbsd")
+ ]
+ if len(narrowed) == 1:
+ return narrowed[0].rust_target
diff --git a/www/firefox102/patches/patch-config_gcc-stl-wrapper.template.h b/www/firefox102/patches/patch-config_gcc-stl-wrapper.template.h
new file mode 100644
index 00000000000..8a095e73816
--- /dev/null
+++ b/www/firefox102/patches/patch-config_gcc-stl-wrapper.template.h
@@ -0,0 +1,31 @@
+$NetBSD: patch-config_gcc-stl-wrapper.template.h,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+--- config/gcc-stl-wrapper.template.h.orig 2021-09-04 13:24:51.000000000 +0000
++++ config/gcc-stl-wrapper.template.h
+@@ -32,8 +32,8 @@
+ // limits) and bug 1694575 (iosfwd).
+ // Please be careful when adding more exceptions, especially regarding
+ // the header not directly or indirectly including <new>.
+-#ifndef moz_dont_include_mozalloc_for_cstdlib
+-# define moz_dont_include_mozalloc_for_cstdlib
++#ifndef moz_dont_include_mozalloc_for_${HEADER}
++# define moz_dont_include_mozalloc_for_${HEADER}
+ #endif
+
+ #ifndef moz_dont_include_mozalloc_for_cmath
+@@ -55,7 +55,7 @@
+ // Include mozalloc after the STL header and all other headers it includes
+ // have been preprocessed.
+ #if !defined(MOZ_INCLUDE_MOZALLOC_H) && \
+- !defined(moz_dont_include_mozalloc_for_${HEADER})
++ !defined(moz_dont_include_mozalloc_for_cstdlib)
+ # define MOZ_INCLUDE_MOZALLOC_H
+ # define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER}
+ #endif
+@@ -84,4 +84,6 @@
+ # include "mozilla/throw_gcc.h"
+ #endif
+
++#undef moz_dont_include_mzalloc_for_${HEADER}
++
+ #endif // if mozilla_${HEADER}_h
diff --git a/www/firefox102/patches/patch-config_makefiles_rust.mk b/www/firefox102/patches/patch-config_makefiles_rust.mk
new file mode 100644
index 00000000000..fc815195dae
--- /dev/null
+++ b/www/firefox102/patches/patch-config_makefiles_rust.mk
@@ -0,0 +1,30 @@
+$NetBSD: patch-config_makefiles_rust.mk,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+NetBSD doesn't get along with parallel rust builds (it causes issues
+with ld.so) which are the default. Force -j1.
+
+Use less memory to fix build under NetBSD/i386.
+From: https://bugzilla.mozilla.org/show_bug.cgi?id=1644409
+
+--- config/makefiles/rust.mk.orig 2022-06-08 14:10:19.000000000 +0000
++++ config/makefiles/rust.mk
+@@ -58,6 +58,9 @@ ifdef MOZ_TSAN
+ cargo_build_flags += -Zbuild-std=std,panic_abort
+ RUSTFLAGS += -Zsanitizer=thread
+ endif
++ifeq ($(OS_ARCH),NetBSD)
++cargo_build_flags += -j1
++endif
+
+ rustflags_sancov =
+ ifdef LIBFUZZER
+@@ -90,7 +93,8 @@ ifndef rustflags_sancov
+ # Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
+ ifndef MOZ_CODE_COVERAGE
+ ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
+-cargo_rustc_flags += -Clto
++cargo_rustc_flags += -Clto=thin
++export CARGO_PROFILE_RELEASE_LTO=thin
+ endif
+ # We need -Cembed-bitcode=yes for all crates when using -Clto.
+ RUSTFLAGS += -Cembed-bitcode=yes
diff --git a/www/firefox102/patches/patch-dom_base_nsAttrName.h b/www/firefox102/patches/patch-dom_base_nsAttrName.h
new file mode 100644
index 00000000000..9c488fb6afc
--- /dev/null
+++ b/www/firefox102/patches/patch-dom_base_nsAttrName.h
@@ -0,0 +1,18 @@
+$NetBSD: patch-dom_base_nsAttrName.h,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+cbindgen gets confused by NetBSD's types being macros too
+https://mail-index.netbsd.org/tech-pkg/2018/10/25/msg020395.html
+
+--- dom/base/nsAttrName.h.orig 2019-01-18 00:20:23.000000000 +0000
++++ dom/base/nsAttrName.h
+@@ -16,6 +16,10 @@
+ #include "mozilla/dom/NodeInfo.h"
+ #include "nsAtom.h"
+ #include "nsDOMString.h"
++#ifdef __NetBSD__
++/* This is also a macro which causes problems with cbindgen */
++#undef uintptr_t
++#endif
+
+ #define NS_ATTRNAME_NODEINFO_BIT 1
+ class nsAttrName {
diff --git a/www/firefox102/patches/patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp b/www/firefox102/patches/patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp
new file mode 100644
index 00000000000..414bb0c1d73
--- /dev/null
+++ b/www/firefox102/patches/patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Fix build where _LITTLE_ENDIAN is not an integer.
+
+--- gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp.orig 2019-07-06 01:48:31.000000000 +0000
++++ gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp
+@@ -91,8 +91,8 @@ on big endian machines, or a byte-by-byt
+ /* gcc 'may' define __LITTLE_ENDIAN__ or __BIG_ENDIAN__ to 1 (Note the trailing __),
+ * or even _LITTLE_ENDIAN or _BIG_ENDIAN (Note the single _ prefix) */
+ #if !defined(__BYTE_ORDER)
+-# if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__ == 1 || \
+- defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN == 1
++# if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__-0 == 1 || \
++ defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN-0 == 1
+ # define __BYTE_ORDER __LITTLE_ENDIAN
+ # elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__ == 1 || defined(_BIG_ENDIAN) && _BIG_ENDIAN == 1
+ # define __BYTE_ORDER __BIG_ENDIAN
diff --git a/www/firefox102/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h b/www/firefox102/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h
new file mode 100644
index 00000000000..67b25d4c834
--- /dev/null
+++ b/www/firefox102/patches/patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* isinf/isnan in make.h is defined as macro. Use non-macro version
+ to fix build.
+
+--- gfx/angle/checkout/src/compiler/translator/InfoSink.h.orig 2021-10-28 18:03:11.000000000 +0000
++++ gfx/angle/checkout/src/compiler/translator/InfoSink.h
+@@ -7,7 +7,7 @@
+ #ifndef COMPILER_TRANSLATOR_INFOSINK_H_
+ #define COMPILER_TRANSLATOR_INFOSINK_H_
+
+-#include <math.h>
++#include <cmath>
+ #include <stdlib.h>
+ #include "GLSLANG/ShaderLang.h"
+ #include "compiler/translator/Common.h"
diff --git a/www/firefox102/patches/patch-gfx_skia_skia_src_core_SkCpu.cpp b/www/firefox102/patches/patch-gfx_skia_skia_src_core_SkCpu.cpp
new file mode 100644
index 00000000000..5dd27e8c4db
--- /dev/null
+++ b/www/firefox102/patches/patch-gfx_skia_skia_src_core_SkCpu.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-gfx_skia_skia_src_core_SkCpu.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+NetBSD/aarch64 doesn't have <sys/auxv.h>.
+
+--- gfx/skia/skia/src/core/SkCpu.cpp.orig 2019-03-05 00:32:47.658232017 +0900
++++ gfx/skia/skia/src/core/SkCpu.cpp 2019-03-05 00:33:10.203589997 +0900
+@@ -70,7 +70,7 @@
+ return features;
+ }
+
+-#elif defined(SK_CPU_ARM64) && __has_include(<sys/auxv.h>)
++#elif defined(SK_CPU_ARM64) && __has_include(<sys/auxv.h>) && !defined(__NetBSD__)
+ #include <sys/auxv.h>
+
+ static uint32_t read_cpu_features() {
diff --git a/www/firefox102/patches/patch-gfx_skia_skia_src_core_SkVM.cpp b/www/firefox102/patches/patch-gfx_skia_skia_src_core_SkVM.cpp
new file mode 100644
index 00000000000..d6990abd2ed
--- /dev/null
+++ b/www/firefox102/patches/patch-gfx_skia_skia_src_core_SkVM.cpp
@@ -0,0 +1,19 @@
+$NetBSD: patch-gfx_skia_skia_src_core_SkVM.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Work with PaX MPROTECT on NetBSD by stating that we will later make this memory
+block executable.
+
+--- gfx/skia/skia/src/core/SkVM.cpp.orig 2022-07-05 12:21:05.000000000 +0000
++++ gfx/skia/skia/src/core/SkVM.cpp
+@@ -2076,7 +2076,11 @@ namespace skvm {
+ // Allocate space that we can remap as executable.
+ const size_t page = sysconf(_SC_PAGESIZE);
+ fJITSize = ((a.size() + page - 1) / page) * page; // mprotect works at page granularity.
++#ifdef PROT_MPROTECT
++ fJITBuf = mmap(nullptr,fJITSize, PROT_READ|PROT_WRITE|PROT_MPROTECT(PROT_WRITE), MAP_ANONYMOUS|MAP_PRIVATE, -1,0);
++#else
+ fJITBuf = mmap(nullptr,fJITSize, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1,0);
++#endif
+
+ // Assemble the program for real.
+ a = Assembler{fJITBuf};
diff --git a/www/firefox102/patches/patch-gfx_wr_swgl_build.rs b/www/firefox102/patches/patch-gfx_wr_swgl_build.rs
new file mode 100644
index 00000000000..269e5341d1c
--- /dev/null
+++ b/www/firefox102/patches/patch-gfx_wr_swgl_build.rs
@@ -0,0 +1,27 @@
+$NetBSD: patch-gfx_wr_swgl_build.rs,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Work around an internal compiler error on i386 when optimization is enabled:
+
+ cargo:warning=In file included from src/gl.cc:2637:0:
+ cargo:warning=src/rasterize.h: In function 'void draw_quad_spans(int, Point2D*, uint32_t, glsl::Interpolants*, Texture&, Texture&, const ClipRect&) [with P = unsigned char]':
+ cargo:warning=src/rasterize.h:782:20: internal compiler error: in convert_move, at expr.c:231
+ cargo:warning= static inline void draw_quad_spans(int nump, Point2D p[4], uint32_t z,
+ cargo:warning= ^~~~~~~~~~~~~~~
+
+
+--- gfx/wr/swgl/build.rs.orig 2021-08-23 14:57:16.000000000 +0000
++++ gfx/wr/swgl/build.rs
+@@ -196,6 +196,13 @@ fn main() {
+ }
+ }
+
++ // Work around a compiler bug
++ let target_triple = std::env::var("TARGET").expect("The TARGET environment variable must be set");
++ let target_name = target_triple.split('-').next().unwrap();
++ if ["i386", "i586", "i686"].contains(&target_name) {
++ build.flag("-O0");
++ }
++
+ build.file("src/gl.cc")
+ .define("_GLIBCXX_USE_CXX11_ABI", Some("0"))
+ .include(shader_dir)
diff --git a/www/firefox102/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc b/www/firefox102/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc
new file mode 100644
index 00000000000..57976e9e93d
--- /dev/null
+++ b/www/firefox102/patches/patch-ipc_chromium_src_base_message__pump__libevent.cc
@@ -0,0 +1,22 @@
+$NetBSD: patch-ipc_chromium_src_base_message__pump__libevent.cc,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Allow older libevent
+
+--- ipc/chromium/src/base/message_pump_libevent.cc.orig 2022-06-16 21:32:07.000000000 +0000
++++ ipc/chromium/src/base/message_pump_libevent.cc
+@@ -24,6 +24,7 @@
+
+ // This macro checks that the _EVENT_SIZEOF_* constants defined in
+ // ipc/chromiume/src/third_party/<platform>/event2/event-config.h are correct.
++#if 0
+ #if defined(_EVENT_SIZEOF_SHORT)
+ # define CHECK_EVENT_SIZEOF(TYPE, type) \
+ static_assert(_EVENT_SIZEOF_##TYPE == sizeof(type), \
+@@ -44,6 +45,7 @@ CHECK_EVENT_SIZEOF(SHORT, short);
+ CHECK_EVENT_SIZEOF(SIZE_T, size_t);
+ CHECK_EVENT_SIZEOF(TIME_T, time_t);
+ CHECK_EVENT_SIZEOF(VOID_P, void*);
++#endif
+
+ // Lifecycle of struct event
+ // Libevent uses two main data structures:
diff --git a/www/firefox102/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc b/www/firefox102/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
new file mode 100644
index 00000000000..ffda1165166
--- /dev/null
+++ b/www/firefox102/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
@@ -0,0 +1,18 @@
+$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Support NetBSD
+* Support Solaris (we can't rely on pthread_setname_np so ignore it).
+
+--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2019-03-07 16:53:35.000000000 +0000
++++ ipc/chromium/src/base/platform_thread_posix.cc
+@@ -12,7 +12,9 @@
+ #if defined(OS_MACOSX)
+ # include <mach/mach.h>
+ #elif defined(OS_NETBSD)
+-# include <lwp.h>
++_Pragma("GCC visibility push(default)")
++#include <lwp.h>
++_Pragma("GCC visibility pop")
+ #elif defined(OS_LINUX)
+ # include <sys/syscall.h>
+ # include <sys/prctl.h>
diff --git a/www/firefox102/patches/patch-ipc_glue_GeckoChildProcessHost.cpp b/www/firefox102/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
new file mode 100644
index 00000000000..107035be92f
--- /dev/null
+++ b/www/firefox102/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
@@ -0,0 +1,21 @@
+$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Support Solaris
+* Fix NetBSD linking
+
+--- ipc/glue/GeckoChildProcessHost.cpp.orig 2022-01-08 15:41:40.900244448 +0000
++++ ipc/glue/GeckoChildProcessHost.cpp
+@@ -4,7 +4,13 @@
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
++#if defined(__NetBSD__)
++_Pragma("GCC visibility push(default)")
++#endif
+ #include "GeckoChildProcessHost.h"
++#if defined(__NetBSD__)
++_Pragma("GCC visibility pop")
++#endif
+
+ #include "base/command_line.h"
+ #include "base/process_util.h"
diff --git a/www/firefox102/patches/patch-js_src_jit_ProcessExecutableMemory.cpp b/www/firefox102/patches/patch-js_src_jit_ProcessExecutableMemory.cpp
new file mode 100644
index 00000000000..b7de109716f
--- /dev/null
+++ b/www/firefox102/patches/patch-js_src_jit_ProcessExecutableMemory.cpp
@@ -0,0 +1,38 @@
+$NetBSD: patch-js_src_jit_ProcessExecutableMemory.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+PaX MPROTECT safety for NetBSD.
+
+--- js/src/jit/ProcessExecutableMemory.cpp.orig 2021-02-11 21:17:13.000000000 +0000
++++ js/src/jit/ProcessExecutableMemory.cpp
+@@ -362,9 +362,16 @@ static void* ReserveProcessExecutableMem
+ // Note that randomAddr is just a hint: if the address is not available
+ // mmap will pick a different address.
+ void* randomAddr = ComputeRandomAllocationAddress();
++#ifdef PROT_MPROTECT
++ void* p = MozTaggedAnonymousMmap(randomAddr, bytes,
++ PROT_MPROTECT(PROT_EXEC | PROT_WRITE | PROT_READ),
++ MAP_PRIVATE | MAP_ANON, -1, 0,
++ "js-executable-memory");
++#else
+ void* p = MozTaggedAnonymousMmap(randomAddr, bytes, PROT_NONE,
+ MAP_NORESERVE | MAP_PRIVATE | MAP_ANON, -1,
+ 0, "js-executable-memory");
++#endif
+ if (p == MAP_FAILED) {
+ return nullptr;
+ }
+@@ -409,8 +416,12 @@ static unsigned ProtectionSettingToFlags
+
+ [[nodiscard]] static bool CommitPages(void* addr, size_t bytes,
+ ProtectionSetting protection) {
+- void* p = MozTaggedAnonymousMmap(
+- addr, bytes, ProtectionSettingToFlags(protection),
++ void* p = MozTaggedAnonymousMmap(addr, bytes,
++#ifdef PROT_MPROTECT
++ ProtectionSettingToFlags(protection) | PROT_MPROTECT(PROT_EXEC | PROT_WRITE | PROT_READ),
++#else
++ ProtectionSettingToFlags(protection),
++#endif
+ MAP_FIXED | MAP_PRIVATE | MAP_ANON, -1, 0, "js-executable-memory");
+ if (p == MAP_FAILED) {
+ return false;
diff --git a/www/firefox102/patches/patch-js_src_jit_arm64_vixl_MozCpu-vixl.cpp b/www/firefox102/patches/patch-js_src_jit_arm64_vixl_MozCpu-vixl.cpp
new file mode 100644
index 00000000000..5b29973ed33
--- /dev/null
+++ b/www/firefox102/patches/patch-js_src_jit_arm64_vixl_MozCpu-vixl.cpp
@@ -0,0 +1,38 @@
+$NetBSD: patch-js_src_jit_arm64_vixl_MozCpu-vixl.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+NetBSD/aarch64 does not have the Linux-specific membarrier(2) syscall.
+
+--- js/src/jit/arm64/vixl/MozCpu-vixl.cpp.orig 2020-11-12 18:04:48.000000000 +0000
++++ js/src/jit/arm64/vixl/MozCpu-vixl.cpp
+@@ -42,6 +42,8 @@
+ # elif defined(__ANDROID__)
+ # include <sys/syscall.h>
+ # include <unistd.h>
++# elif defined(__NetBSD__)
++ // nothing
+ # else
+ # error "Missing platform-specific declarations for membarrier syscall!"
+ # endif // __linux__ / ANDROID
+@@ -49,7 +51,11 @@
+ # include "vm/JSContext.h" // TlsContext
+
+ static int membarrier(int cmd, int flags) {
++#if defined(__NetBSD__)
++ return ENOSYS;
++#else
+ return syscall(__NR_membarrier, cmd, flags);
++#endif
+ }
+
+ // These definitions come from the Linux kernel source, for kernels before 4.16
+@@ -116,7 +122,9 @@ uint32_t CPU::GetCacheType() {
+ }
+
+ bool CPU::CanFlushICacheFromBackgroundThreads() {
+-#if defined(__aarch64__) && (defined(__linux__) || defined(__android__))
++#if defined(__NetBSD__) && defined(__aarch64__)
++ return false;
++#elif defined(__aarch64__) && (defined(__linux__) || defined(__android__))
+ // On linux, check the kernel supports membarrier(2), that is, it's a kernel
+ // above Linux 4.16 included.
+ //
diff --git a/www/firefox102/patches/patch-js_src_util_NativeStack.cpp b/www/firefox102/patches/patch-js_src_util_NativeStack.cpp
new file mode 100644
index 00000000000..08b8029d4e1
--- /dev/null
+++ b/www/firefox102/patches/patch-js_src_util_NativeStack.cpp
@@ -0,0 +1,32 @@
+$NetBSD: patch-js_src_util_NativeStack.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Support SunOS.
+
+--- js/src/util/NativeStack.cpp.orig 2020-04-03 19:34:51.000000000 +0000
++++ js/src/util/NativeStack.cpp
+@@ -13,7 +13,7 @@
+ # if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+ # include <pthread_np.h>
+ # endif
+-# if defined(SOLARIS) || defined(AIX)
++# if defined(__sun) || defined(AIX)
+ # include <ucontext.h>
+ # endif
+ # if defined(ANDROID) && !defined(__aarch64__)
+@@ -40,7 +40,7 @@ void* js::GetNativeStackBaseImpl() {
+ return static_cast<void*>(pTib->StackBase);
+ }
+
+-#elif defined(SOLARIS)
++#elif defined(__sun)
+
+ static_assert(JS_STACK_GROWTH_DIRECTION < 0);
+
+@@ -128,6 +128,7 @@ void* js::GetNativeStackBaseImpl() {
+ # elif defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(NETBSD)
+ /* e.g. on FreeBSD 4.8 or newer, neundorf@kde.org */
+ pthread_attr_get_np(thread, &sattr);
++# elif defined(__sun)
+ # else
+ /*
+ * FIXME: this function is non-portable;
diff --git a/www/firefox102/patches/patch-js_src_vm_ArrayBufferObject.cpp b/www/firefox102/patches/patch-js_src_vm_ArrayBufferObject.cpp
new file mode 100644
index 00000000000..d1f7b2f73f6
--- /dev/null
+++ b/www/firefox102/patches/patch-js_src_vm_ArrayBufferObject.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-js_src_vm_ArrayBufferObject.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+PaX MPROTECT safety for NetBSD.
+
+--- js/src/vm/ArrayBufferObject.cpp.orig 2021-05-20 21:29:34.000000000 +0000
++++ js/src/vm/ArrayBufferObject.cpp
+@@ -189,9 +189,17 @@ void* js::MapBufferMemory(size_t mappedS
+ MOZ_ASSERT(data);
+ memset(data, 0, mappedSize);
+ #else // !XP_WIN && !__wasi__
++
++#ifdef PROT_MPROTECT
++ void* data =
++ MozTaggedAnonymousMmap(nullptr, mappedSize,
++ PROT_MPROTECT(PROT_EXEC | PROT_WRITE | PROT_READ),
++ MAP_PRIVATE | MAP_ANON, -1, 0, "wasm-reserved");
++#else
+ void* data =
+ MozTaggedAnonymousMmap(nullptr, mappedSize, PROT_NONE,
+ MAP_PRIVATE | MAP_ANON, -1, 0, "wasm-reserved");
++#endif
+ if (data == MAP_FAILED) {
+ return nullptr;
+ }
diff --git a/www/firefox102/patches/patch-libwebrtc.diff b/www/firefox102/patches/patch-libwebrtc.diff
new file mode 100644
index 00000000000..a92a919a636
--- /dev/null
+++ b/www/firefox102/patches/patch-libwebrtc.diff
@@ -0,0 +1,20339 @@
+$NetBSD: patch-libwebrtc.diff,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build
+--- third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build 2022-06-23 07:13:54.673949403 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("resource_adaptation_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/array_view_gn/moz.build firefox-102.0/third_party/libwebrtc/api/array_view_gn/moz.build
+--- third_party/libwebrtc/api/array_view_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/api/array_view_gn/moz.build 2022-06-23 07:13:54.683864356 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("array_view_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio/aec3_config_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
+--- third_party/libwebrtc/api/audio/aec3_config_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/audio/aec3_config_gn/moz.build 2022-06-23 07:13:54.675378802 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aec3_config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
+--- third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build 2022-06-23 07:13:54.678225748 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aec3_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
+--- third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build 2022-06-23 07:13:54.679649416 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -154,7 +157,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -170,7 +173,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -202,4 +205,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_frame_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build
+--- third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build 2022-06-23 07:13:54.676787302 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_mixer_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio/echo_control_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio/echo_control_gn/moz.build
+--- third_party/libwebrtc/api/audio/echo_control_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/audio/echo_control_gn/moz.build 2022-06-23 07:13:54.681052746 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("echo_control_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build firefox-102.0/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 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build 2022-06-23 07:13:54.641157043 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_decoder_L16_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build firefox-102.0/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 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build 2022-06-23 07:13:54.639734127 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_L16_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build 2022-06-23 07:13:54.644047601 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -156,7 +159,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -172,7 +175,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -204,4 +207,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_codecs_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build firefox-102.0/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 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build 2022-06-23 07:13:54.648362718 +0900
+@@ -71,14 +71,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1"
+@@ -173,7 +176,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -189,7 +192,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -234,4 +237,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("builtin_audio_decoder_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build firefox-102.0/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 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build 2022-06-23 07:13:54.642621228 +0900
+@@ -71,14 +71,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1"
+@@ -173,7 +176,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -189,7 +192,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -234,4 +237,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("builtin_audio_encoder_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build firefox-102.0/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 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build 2022-06-23 07:13:54.646904896 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_decoder_g711_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/g711/audio_encoder_g711_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/g711/audio_encoder_g711_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/g711/audio_encoder_g711_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/g711/audio_encoder_g711_gn/moz.build 2022-06-23 07:13:54.645477601 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_g711_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/g722/audio_decoder_g722_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/g722/audio_decoder_g722_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/g722/audio_decoder_g722_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/g722/audio_decoder_g722_gn/moz.build 2022-06-23 07:13:54.631204701 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_decoder_g722_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_config_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_config_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_config_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_config_gn/moz.build 2022-06-23 07:13:54.632609423 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_g722_config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/g722/audio_encoder_g722_gn/moz.build 2022-06-23 07:13:54.634030296 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_g722_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/ilbc/audio_decoder_ilbc_gn/moz.build 2022-06-23 07:13:54.638308024 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_decoder_ilbc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_config_gn/moz.build 2022-06-23 07:13:54.635443795 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_ilbc_config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/ilbc/audio_encoder_ilbc_gn/moz.build 2022-06-23 07:13:54.636874357 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_ilbc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_fix_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_fix_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_fix_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_fix_gn/moz.build 2022-06-23 07:13:54.624250467 +0900
+@@ -66,4 +66,13 @@
+ DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
+ DEFINES["_DEBUG"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_decoder_isac_fix_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn/moz.build 2022-06-17 06:35:00.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn/moz.build 2022-06-23 07:13:54.629770943 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -146,7 +149,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -162,7 +165,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -194,4 +197,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_decoder_isac_float_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_gn/moz.build 2022-06-23 07:13:54.623057381 +0900
+@@ -65,14 +65,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1"
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -214,4 +217,13 @@
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1"
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_decoder_isac_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_fix_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_fix_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_fix_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_fix_gn/moz.build 2022-06-23 07:13:54.626873763 +0900
+@@ -66,4 +66,13 @@
+ DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
+ DEFINES["_DEBUG"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_isac_fix_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn/moz.build 2022-06-23 07:13:54.625666561 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -146,7 +149,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -162,7 +165,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -194,4 +197,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_isac_float_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_gn/moz.build 2022-06-23 07:13:54.628351543 +0900
+@@ -65,14 +65,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1"
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -214,4 +217,13 @@
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0"
+ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1"
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_isac_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_multiopus_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_multiopus_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_multiopus_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_multiopus_gn/moz.build 2022-06-23 07:13:54.649789302 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -154,7 +157,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -170,7 +173,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -202,4 +205,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_decoder_multiopus_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_config_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_config_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_config_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_config_gn/moz.build 2022-06-23 07:13:54.655483674 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_decoder_opus_config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/opus/audio_decoder_opus_gn/moz.build 2022-06-23 07:13:54.652646237 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_decoder_opus_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_multiopus_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_multiopus_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_multiopus_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_multiopus_gn/moz.build 2022-06-23 07:13:54.651218661 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -154,7 +157,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -170,7 +173,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -202,4 +205,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_multiopus_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_config_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_config_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_config_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_config_gn/moz.build 2022-06-23 07:13:54.656914055 +0900
+@@ -72,14 +72,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -158,7 +161,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -174,7 +177,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -206,4 +209,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_opus_config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_gn/moz.build
+--- third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_codecs/opus/audio_encoder_opus_gn/moz.build 2022-06-23 07:13:54.654070326 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_opus_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/audio_options_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/audio_options_api_gn/moz.build
+--- third_party/libwebrtc/api/audio_options_api_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/api/audio_options_api_gn/moz.build 2022-06-23 07:13:54.707885897 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_options_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/bitrate_allocation_gn/moz.build firefox-102.0/third_party/libwebrtc/api/bitrate_allocation_gn/moz.build
+--- third_party/libwebrtc/api/bitrate_allocation_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/api/bitrate_allocation_gn/moz.build 2022-06-23 07:13:54.672527658 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("bitrate_allocation_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/call_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/call_api_gn/moz.build
+--- third_party/libwebrtc/api/call_api_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/api/call_api_gn/moz.build 2022-06-23 07:13:54.703647353 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("call_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/callfactory_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/callfactory_api_gn/moz.build
+--- third_party/libwebrtc/api/callfactory_api_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/callfactory_api_gn/moz.build 2022-06-23 07:13:54.621614416 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("callfactory_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build firefox-102.0/third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build
+--- third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build 2022-06-23 07:13:54.696577012 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("frame_decryptor_interface_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build firefox-102.0/third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build
+--- third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build 2022-06-23 07:13:54.697983398 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("frame_encryptor_interface_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/crypto/options_gn/moz.build firefox-102.0/third_party/libwebrtc/api/crypto/options_gn/moz.build
+--- third_party/libwebrtc/api/crypto/options_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/api/crypto/options_gn/moz.build 2022-06-23 07:13:54.699407397 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("options_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/fec_controller_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/fec_controller_api_gn/moz.build
+--- third_party/libwebrtc/api/fec_controller_api_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/fec_controller_api_gn/moz.build 2022-06-23 07:13:54.688074296 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("fec_controller_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build firefox-102.0/third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build
+--- third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build 2022-06-23 07:13:54.700822599 +0900
+@@ -64,14 +64,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -154,7 +157,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -170,7 +173,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -192,4 +195,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("frame_transformer_interface_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/function_view_gn/moz.build firefox-102.0/third_party/libwebrtc/api/function_view_gn/moz.build
+--- third_party/libwebrtc/api/function_view_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/api/function_view_gn/moz.build 2022-06-23 07:13:54.686673901 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("function_view_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build
+--- third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build 2022-06-23 07:13:54.580337655 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("jingle_logging_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/media_stream_interface_gn/moz.build firefox-102.0/third_party/libwebrtc/api/media_stream_interface_gn/moz.build
+--- third_party/libwebrtc/api/media_stream_interface_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/api/media_stream_interface_gn/moz.build 2022-06-23 07:13:54.570426730 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("media_stream_interface_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build firefox-102.0/third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build
+--- third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build 2022-06-23 07:13:54.692325634 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("default_neteq_controller_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build
+--- third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build 2022-06-17 06:35:41.000000000 +0900
+_+++ third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build 2022-06-23 07:13:54.693753120 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("neteq_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build
+--- third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build 2022-06-23 07:13:54.689477446 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -152,7 +155,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -168,7 +171,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -190,4 +193,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("neteq_controller_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build firefox-102.0/third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build
+--- third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build 2022-06-23 07:13:54.690901856 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("tick_timer_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build
+--- third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build 2022-06-23 07:13:54.581739082 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("network_state_predictor_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/numerics/numerics_gn/moz.build firefox-102.0/third_party/libwebrtc/api/numerics/numerics_gn/moz.build
+--- third_party/libwebrtc/api/numerics/numerics_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/numerics/numerics_gn/moz.build 2022-06-23 07:13:54.571854386 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("numerics_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/priority_gn/moz.build firefox-102.0/third_party/libwebrtc/api/priority_gn/moz.build
+--- third_party/libwebrtc/api/priority_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/api/priority_gn/moz.build 2022-06-23 07:13:54.659737036 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("priority_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/refcountedbase_gn/moz.build firefox-102.0/third_party/libwebrtc/api/refcountedbase_gn/moz.build
+--- third_party/libwebrtc/api/refcountedbase_gn/moz.build 2022-06-17 06:35:00.000000000 +0900
+_+++ third_party/libwebrtc/api/refcountedbase_gn/moz.build 2022-06-23 07:13:54.706471126 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("refcountedbase_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/rtc_error_gn/moz.build firefox-102.0/third_party/libwebrtc/api/rtc_error_gn/moz.build
+--- third_party/libwebrtc/api/rtc_error_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/rtc_error_gn/moz.build 2022-06-23 07:13:54.658338044 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_error_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build firefox-102.0/third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build
+--- third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/rtc_event_log/rtc_event_log_gn/moz.build 2022-06-23 07:13:54.661156126 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -154,7 +157,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -170,7 +173,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -202,4 +205,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_event_log_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/rtp_headers_gn/moz.build firefox-102.0/third_party/libwebrtc/api/rtp_headers_gn/moz.build
+--- third_party/libwebrtc/api/rtp_headers_gn/moz.build 2022-06-17 06:35:41.000000000 +0900
+_+++ third_party/libwebrtc/api/rtp_headers_gn/moz.build 2022-06-23 07:13:54.695171498 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_headers_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/rtp_packet_info_gn/moz.build firefox-102.0/third_party/libwebrtc/api/rtp_packet_info_gn/moz.build
+--- third_party/libwebrtc/api/rtp_packet_info_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/api/rtp_packet_info_gn/moz.build 2022-06-23 07:13:54.608824085 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_packet_info_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/rtp_parameters_gn/moz.build firefox-102.0/third_party/libwebrtc/api/rtp_parameters_gn/moz.build
+--- third_party/libwebrtc/api/rtp_parameters_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/rtp_parameters_gn/moz.build 2022-06-23 07:13:54.702243943 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -150,7 +153,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -166,7 +169,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -198,4 +201,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_parameters_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build firefox-102.0/third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build
+--- third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build 2022-06-17 06:35:41.000000000 +0900
+_+++ third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build 2022-06-23 07:13:54.662563654 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_transceiver_direction_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/scoped_refptr_gn/moz.build firefox-102.0/third_party/libwebrtc/api/scoped_refptr_gn/moz.build
+--- third_party/libwebrtc/api/scoped_refptr_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/api/scoped_refptr_gn/moz.build 2022-06-23 07:13:54.682456908 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("scoped_refptr_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/simulated_network_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/simulated_network_api_gn/moz.build
+--- third_party/libwebrtc/api/simulated_network_api_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/api/simulated_network_api_gn/moz.build 2022-06-23 07:13:54.685273787 +0900
+@@ -64,14 +64,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -154,7 +157,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -170,7 +173,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -192,4 +195,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("simulated_network_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build firefox-102.0/third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build
+--- third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build 2022-06-23 07:13:54.705063447 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("task_queue_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build firefox-102.0/third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build
+--- third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build 2022-06-23 07:13:54.613113674 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("bitrate_settings_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build firefox-102.0/third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build
+--- third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build 2022-06-23 07:13:54.610262951 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("field_trial_based_config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/transport/goog_cc_gn/moz.build firefox-102.0/third_party/libwebrtc/api/transport/goog_cc_gn/moz.build
+--- third_party/libwebrtc/api/transport/goog_cc_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/api/transport/goog_cc_gn/moz.build 2022-06-23 07:13:54.611694053 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("goog_cc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/transport/network_control_gn/moz.build firefox-102.0/third_party/libwebrtc/api/transport/network_control_gn/moz.build
+--- third_party/libwebrtc/api/transport/network_control_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/api/transport/network_control_gn/moz.build 2022-06-23 07:13:54.618796495 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("network_control_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build firefox-102.0/third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build
+--- third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build 2022-06-23 07:13:54.615956713 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("dependency_descriptor_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build firefox-102.0/third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build
+--- third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build 2022-06-23 07:13:54.614527264 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_source_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build firefox-102.0/third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build
+--- third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build 2022-06-23 07:13:54.617366435 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_key_value_config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/transport_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/transport_api_gn/moz.build
+--- third_party/libwebrtc/api/transport_api_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/api/transport_api_gn/moz.build 2022-06-23 07:13:54.620213401 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("transport_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/units/data_rate_gn/moz.build firefox-102.0/third_party/libwebrtc/api/units/data_rate_gn/moz.build
+--- third_party/libwebrtc/api/units/data_rate_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/api/units/data_rate_gn/moz.build 2022-06-23 07:13:54.573268476 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("data_rate_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/units/data_size_gn/moz.build firefox-102.0/third_party/libwebrtc/api/units/data_size_gn/moz.build
+--- third_party/libwebrtc/api/units/data_size_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/api/units/data_size_gn/moz.build 2022-06-23 07:13:54.578934696 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("data_size_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/units/frequency_gn/moz.build firefox-102.0/third_party/libwebrtc/api/units/frequency_gn/moz.build
+--- third_party/libwebrtc/api/units/frequency_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/api/units/frequency_gn/moz.build 2022-06-23 07:13:54.574686043 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("frequency_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/units/time_delta_gn/moz.build firefox-102.0/third_party/libwebrtc/api/units/time_delta_gn/moz.build
+--- third_party/libwebrtc/api/units/time_delta_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/api/units/time_delta_gn/moz.build 2022-06-23 07:13:54.577518091 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("time_delta_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/units/timestamp_gn/moz.build firefox-102.0/third_party/libwebrtc/api/units/timestamp_gn/moz.build
+--- third_party/libwebrtc/api/units/timestamp_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/api/units/timestamp_gn/moz.build 2022-06-23 07:13:54.576100774 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("timestamp_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/builtin_video_bitrate_allocator_factory_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/builtin_video_bitrate_allocator_factory_gn/moz.build
+--- third_party/libwebrtc/api/video/builtin_video_bitrate_allocator_factory_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/api/video/builtin_video_bitrate_allocator_factory_gn/moz.build 2022-06-23 07:13:54.595997555 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("builtin_video_bitrate_allocator_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/encoded_frame_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/encoded_frame_gn/moz.build
+--- third_party/libwebrtc/api/video/encoded_frame_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/api/video/encoded_frame_gn/moz.build 2022-06-23 07:13:54.594558999 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("encoded_frame_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/encoded_image_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/encoded_image_gn/moz.build
+--- third_party/libwebrtc/api/video/encoded_image_gn/moz.build 2022-06-17 06:35:41.000000000 +0900
+_+++ third_party/libwebrtc/api/video/encoded_image_gn/moz.build 2022-06-23 07:13:54.601701756 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("encoded_image_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build
+--- third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build 2022-06-23 07:13:54.598835053 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("recordable_encoded_frame_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_adaptation_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_adaptation_gn/moz.build
+--- third_party/libwebrtc/api/video/video_adaptation_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_adaptation_gn/moz.build 2022-06-23 07:13:54.603131295 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_adaptation_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build
+--- third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build 2022-06-23 07:13:54.604557769 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_bitrate_allocation_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build
+--- third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build 2022-06-23 07:13:54.588873012 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_bitrate_allocator_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build
+--- third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build 2022-06-17 06:35:00.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build 2022-06-23 07:13:54.590297081 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_bitrate_allocator_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build
+--- third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build 2022-06-17 06:35:15.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build 2022-06-23 07:13:54.583142833 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_codec_constants_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_frame_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_frame_gn/moz.build
+--- third_party/libwebrtc/api/video/video_frame_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_frame_gn/moz.build 2022-06-23 07:13:54.591722903 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -155,7 +158,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -171,7 +174,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -203,4 +206,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_frame_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build
+--- third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build 2022-06-23 07:13:54.584589113 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_frame_i010_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build
+--- third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build 2022-06-23 07:13:54.597427806 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_frame_i420_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build
+--- third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build 2022-06-23 07:13:54.587463601 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_frame_metadata_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build
+--- third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build 2022-06-23 07:13:54.586031527 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_frame_nv12_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_frame_type_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_frame_type_gn/moz.build
+--- third_party/libwebrtc/api/video/video_frame_type_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_frame_type_gn/moz.build 2022-06-23 07:13:54.593127786 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_frame_type_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build
+--- third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build 2022-06-23 07:13:54.605991856 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -156,7 +159,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -172,7 +175,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -204,4 +207,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_rtp_headers_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build
+--- third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build 2022-06-23 07:13:54.600267518 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_stream_encoder_create_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build
+--- third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build 2022-06-17 06:35:00.000000000 +0900
+_+++ third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build 2022-06-23 07:13:54.607404915 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_stream_encoder_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build
+--- third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build 2022-06-23 07:13:54.669698015 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("bitstream_parser_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video_codecs/builtin_video_decoder_factory_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video_codecs/builtin_video_decoder_factory_gn/moz.build
+--- third_party/libwebrtc/api/video_codecs/builtin_video_decoder_factory_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/api/video_codecs/builtin_video_decoder_factory_gn/moz.build 2022-06-23 07:13:54.671124028 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("builtin_video_decoder_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video_codecs/builtin_video_encoder_factory_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video_codecs/builtin_video_encoder_factory_gn/moz.build
+--- third_party/libwebrtc/api/video_codecs/builtin_video_encoder_factory_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/api/video_codecs/builtin_video_encoder_factory_gn/moz.build 2022-06-23 07:13:54.663993684 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("builtin_video_encoder_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video_codecs/rtc_software_fallback_wrappers_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video_codecs/rtc_software_fallback_wrappers_gn/moz.build
+--- third_party/libwebrtc/api/video_codecs/rtc_software_fallback_wrappers_gn/moz.build 2022-06-17 06:35:00.000000000 +0900
+_+++ third_party/libwebrtc/api/video_codecs/rtc_software_fallback_wrappers_gn/moz.build 2022-06-23 07:13:54.665428533 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_software_fallback_wrappers_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build
+--- third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build 2022-06-23 07:13:54.666862721 +0900
+@@ -75,14 +75,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_codecs_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build firefox-102.0/third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build
+--- third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build 2022-06-17 06:35:00.000000000 +0900
+_+++ third_party/libwebrtc/api/video_codecs/vp8_temporal_layers_factory_gn/moz.build 2022-06-23 07:13:54.668294014 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("vp8_temporal_layers_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/audio/audio_gn/moz.build firefox-102.0/third_party/libwebrtc/audio/audio_gn/moz.build
+--- third_party/libwebrtc/audio/audio_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/audio/audio_gn/moz.build 2022-06-23 07:13:54.797540208 +0900
+@@ -81,14 +81,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -175,7 +178,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -191,7 +194,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -223,4 +226,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build firefox-102.0/third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build
+--- third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build 2022-06-23 07:13:54.796100189 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_frame_operations_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build firefox-102.0/third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build
+--- third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build 2022-06-23 07:13:54.751683333 +0900
+@@ -77,14 +77,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -171,7 +174,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -187,7 +190,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -219,4 +222,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("resource_adaptation_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/audio_sender_interface_gn/moz.build firefox-102.0/third_party/libwebrtc/call/audio_sender_interface_gn/moz.build
+--- third_party/libwebrtc/call/audio_sender_interface_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/call/audio_sender_interface_gn/moz.build 2022-06-23 07:13:54.761712139 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_sender_interface_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/bitrate_allocator_gn/moz.build firefox-102.0/third_party/libwebrtc/call/bitrate_allocator_gn/moz.build
+--- third_party/libwebrtc/call/bitrate_allocator_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/call/bitrate_allocator_gn/moz.build 2022-06-23 07:13:54.750234798 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("bitrate_allocator_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/bitrate_configurator_gn/moz.build firefox-102.0/third_party/libwebrtc/call/bitrate_configurator_gn/moz.build
+--- third_party/libwebrtc/call/bitrate_configurator_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/call/bitrate_configurator_gn/moz.build 2022-06-23 07:13:54.747371642 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("bitrate_configurator_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/call_gn/moz.build firefox-102.0/third_party/libwebrtc/call/call_gn/moz.build
+--- third_party/libwebrtc/call/call_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/call/call_gn/moz.build 2022-06-23 07:13:54.755999041 +0900
+@@ -72,14 +72,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -166,7 +169,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -182,7 +185,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -214,4 +217,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("call_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/call_interfaces_gn/moz.build firefox-102.0/third_party/libwebrtc/call/call_interfaces_gn/moz.build
+--- third_party/libwebrtc/call/call_interfaces_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/call/call_interfaces_gn/moz.build 2022-06-23 07:13:54.748803345 +0900
+@@ -73,14 +73,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -167,7 +170,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -183,7 +186,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -215,4 +218,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("call_interfaces_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/fake_network_gn/moz.build firefox-102.0/third_party/libwebrtc/call/fake_network_gn/moz.build
+--- third_party/libwebrtc/call/fake_network_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/call/fake_network_gn/moz.build 2022-06-23 07:13:54.760296726 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("fake_network_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/rtp_interfaces_gn/moz.build firefox-102.0/third_party/libwebrtc/call/rtp_interfaces_gn/moz.build
+--- third_party/libwebrtc/call/rtp_interfaces_gn/moz.build 2022-06-17 06:35:26.000000000 +0900
+_+++ third_party/libwebrtc/call/rtp_interfaces_gn/moz.build 2022-06-23 07:13:54.744521270 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_interfaces_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/rtp_receiver_gn/moz.build firefox-102.0/third_party/libwebrtc/call/rtp_receiver_gn/moz.build
+--- third_party/libwebrtc/call/rtp_receiver_gn/moz.build 2022-06-17 06:35:15.000000000 +0900
+_+++ third_party/libwebrtc/call/rtp_receiver_gn/moz.build 2022-06-23 07:13:54.754562719 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_receiver_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/rtp_sender_gn/moz.build firefox-102.0/third_party/libwebrtc/call/rtp_sender_gn/moz.build
+--- third_party/libwebrtc/call/rtp_sender_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/call/rtp_sender_gn/moz.build 2022-06-23 07:13:54.758863139 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_sender_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/simulated_network_gn/moz.build firefox-102.0/third_party/libwebrtc/call/simulated_network_gn/moz.build
+--- third_party/libwebrtc/call/simulated_network_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/call/simulated_network_gn/moz.build 2022-06-23 07:13:54.757430424 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("simulated_network_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build firefox-102.0/third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build
+--- third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build 2022-06-23 07:13:54.745940199 +0900
+@@ -64,14 +64,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -154,7 +157,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -170,7 +173,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -192,4 +195,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("simulated_packet_receiver_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/call/video_stream_api_gn/moz.build firefox-102.0/third_party/libwebrtc/call/video_stream_api_gn/moz.build
+--- third_party/libwebrtc/call/video_stream_api_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/call/video_stream_api_gn/moz.build 2022-06-23 07:13:54.753119234 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_stream_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build
+--- third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build 2022-06-23 07:13:54.776026888 +0900
+@@ -73,14 +73,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -146,7 +149,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -162,7 +165,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -194,4 +197,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("common_audio_avx2_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/common_audio_c_arm_asm_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/common_audio_c_arm_asm_gn/moz.build
+--- third_party/libwebrtc/common_audio/common_audio_c_arm_asm_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/common_audio_c_arm_asm_gn/moz.build 2022-06-23 07:13:54.773179772 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -142,7 +145,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -158,7 +161,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -180,4 +183,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("common_audio_c_arm_asm_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build
+--- third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build 2022-06-23 07:13:54.778995882 +0900
+@@ -110,14 +110,17 @@
+ "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c"
+ ]
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -218,7 +221,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -234,7 +237,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -285,4 +288,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("common_audio_c_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build
+--- third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build 2022-06-23 07:13:54.774611125 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("common_audio_cc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/common_audio_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/common_audio_gn/moz.build
+--- third_party/libwebrtc/common_audio/common_audio_gn/moz.build 2022-06-17 06:35:15.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/common_audio_gn/moz.build 2022-06-23 07:13:54.777469952 +0900
+@@ -80,14 +80,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -173,7 +176,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -189,7 +192,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -221,4 +224,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("common_audio_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build
+--- third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build 2022-06-23 07:13:54.770337294 +0900
+@@ -71,7 +71,7 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -79,7 +79,10 @@
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -148,7 +151,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -160,7 +163,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -176,4 +179,13 @@
+
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("common_audio_neon_c_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build
+--- third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build 2022-06-23 07:13:54.780400755 +0900
+@@ -70,7 +70,7 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -78,7 +78,10 @@
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -147,7 +150,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -159,7 +162,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("common_audio_neon_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build
+--- third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build 2022-06-17 06:35:05.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build 2022-06-23 07:13:54.771763347 +0900
+@@ -72,14 +72,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("common_audio_sse2_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build
+--- third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build 2022-06-17 06:35:26.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build 2022-06-23 07:13:54.768931780 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("fir_filter_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/fir_filter_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/fir_filter_gn/moz.build
+--- third_party/libwebrtc/common_audio/fir_filter_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/fir_filter_gn/moz.build 2022-06-23 07:13:54.781808153 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("fir_filter_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build
+--- third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build 2022-06-23 07:13:54.767496821 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -152,7 +155,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -168,7 +171,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -190,4 +193,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("sinc_resampler_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128_gn/moz.build
+--- third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128_gn/moz.build 2022-06-23 22:12:55.207287256 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -182,7 +185,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -198,7 +201,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -252,7 +255,7 @@
+ "-msse2"
+ ]
+
+-if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["CPU_ARCH"] == "x86_64" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ CXXFLAGS += [
+ "-msse2"
+@@ -268,4 +271,13 @@
+ "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("fft_size_128_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_256_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_256_gn/moz.build
+--- third_party/libwebrtc/common_audio/third_party/ooura/fft_size_256_gn/moz.build 2022-06-17 06:35:41.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/third_party/ooura/fft_size_256_gn/moz.build 2022-06-23 07:13:54.764624658 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("fft_size_256_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build firefox-102.0/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build
+--- third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build 2022-06-23 07:13:54.766076338 +0900
+@@ -63,14 +63,17 @@
+ "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c"
+ ]
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -157,7 +160,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -173,7 +176,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -221,4 +224,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("spl_sqrt_floor_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_video/common_video_gn/moz.build firefox-102.0/third_party/libwebrtc/common_video/common_video_gn/moz.build
+--- third_party/libwebrtc/common_video/common_video_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/common_video/common_video_gn/moz.build 2022-06-23 07:13:54.557617553 +0900
+@@ -81,14 +81,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -175,7 +178,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -191,7 +194,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -223,4 +226,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("common_video_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_video/frame_counts_gn/moz.build firefox-102.0/third_party/libwebrtc/common_video/frame_counts_gn/moz.build
+--- third_party/libwebrtc/common_video/frame_counts_gn/moz.build 2022-06-17 06:35:05.000000000 +0900
+_+++ third_party/libwebrtc/common_video/frame_counts_gn/moz.build 2022-06-23 07:13:54.554726695 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("frame_counts_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/common_video/generic_frame_descriptor/generic_frame_descriptor_gn/moz.build firefox-102.0/third_party/libwebrtc/common_video/generic_frame_descriptor/generic_frame_descriptor_gn/moz.build
+--- third_party/libwebrtc/common_video/generic_frame_descriptor/generic_frame_descriptor_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/common_video/generic_frame_descriptor/generic_frame_descriptor_gn/moz.build 2022-06-23 07:13:54.556163558 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("generic_frame_descriptor_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build firefox-102.0/third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build
+--- third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build 2022-06-17 06:35:05.000000000 +0900
+_+++ third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build 2022-06-23 07:13:54.791813816 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -156,7 +159,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -172,7 +175,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -204,4 +207,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_event_audio_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build firefox-102.0/third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build
+--- third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build 2022-06-23 07:13:54.788969445 +0900
+@@ -73,14 +73,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -167,7 +170,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -183,7 +186,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -215,4 +218,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_event_bwe_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build firefox-102.0/third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build
+--- third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build 2022-06-23 07:13:54.794672433 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_event_pacing_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build firefox-102.0/third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build
+--- third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build 2022-06-17 06:35:19.000000000 +0900
+_+++ third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build 2022-06-23 07:13:54.793249507 +0900
+@@ -71,14 +71,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -165,7 +168,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -181,7 +184,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -213,4 +216,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_event_rtp_rtcp_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/logging/rtc_event_video_gn/moz.build firefox-102.0/third_party/libwebrtc/logging/rtc_event_video_gn/moz.build
+--- third_party/libwebrtc/logging/rtc_event_video_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/logging/rtc_event_video_gn/moz.build 2022-06-23 07:13:54.787527913 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -154,7 +157,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -170,7 +173,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -202,4 +205,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_event_video_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build firefox-102.0/third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build
+--- third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build 2022-06-17 06:35:41.000000000 +0900
+_+++ third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build 2022-06-23 07:13:54.790387723 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_stream_config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/media/rtc_constants_gn/moz.build firefox-102.0/third_party/libwebrtc/media/rtc_constants_gn/moz.build
+--- third_party/libwebrtc/media/rtc_constants_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/media/rtc_constants_gn/moz.build 2022-06-23 07:13:54.566133724 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_constants_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build firefox-102.0/third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build
+--- third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build 2022-06-23 07:13:54.559044798 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_encoder_simulcast_proxy_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build firefox-102.0/third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build
+--- third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build 2022-06-17 06:35:05.000000000 +0900
+_+++ third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build 2022-06-23 07:13:54.567559977 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_h264_profile_id_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build firefox-102.0/third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build
+--- third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build 2022-06-23 07:13:54.560478525 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_internal_video_codecs_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/media/rtc_media_base_gn/moz.build firefox-102.0/third_party/libwebrtc/media/rtc_media_base_gn/moz.build
+--- third_party/libwebrtc/media/rtc_media_base_gn/moz.build 2022-06-17 06:35:19.000000000 +0900
+_+++ third_party/libwebrtc/media/rtc_media_base_gn/moz.build 2022-06-23 07:13:54.569001499 +0900
+@@ -73,14 +73,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -167,7 +170,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -183,7 +186,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -215,4 +218,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_media_base_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/media/rtc_media_config_gn/moz.build firefox-102.0/third_party/libwebrtc/media/rtc_media_config_gn/moz.build
+--- third_party/libwebrtc/media/rtc_media_config_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/media/rtc_media_config_gn/moz.build 2022-06-23 07:13:54.564720816 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_media_config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build firefox-102.0/third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build
+--- third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build 2022-06-17 06:35:41.000000000 +0900
+_+++ third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build 2022-06-23 07:13:54.563317876 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_simulcast_encoder_adapter_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build firefox-102.0/third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build
+--- third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build 2022-06-23 07:13:54.561897154 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_vp9_profile_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build 2022-06-23 07:13:54.956852804 +0900
+@@ -71,14 +71,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_coding_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/audio_coding_module_typedefs_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/audio_coding_module_typedefs_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/audio_coding_module_typedefs_gn/moz.build 2022-06-17 06:35:19.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/audio_coding_module_typedefs_gn/moz.build 2022-06-23 07:13:54.952569185 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_coding_module_typedefs_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/audio_coding_opus_common_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/audio_coding_opus_common_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/audio_coding_opus_common_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/audio_coding_opus_common_gn/moz.build 2022-06-23 07:13:54.947103722 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_coding_opus_common_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build 2022-06-23 07:13:54.975365180 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_encoder_cng_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_config_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_config_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_config_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_config_gn/moz.build 2022-06-23 07:13:54.953982624 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_network_adaptor_config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build 2022-06-23 07:13:54.951159473 +0900
+@@ -77,14 +77,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -170,7 +173,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -186,7 +189,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -218,4 +221,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_network_adaptor_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build 2022-06-23 07:13:54.969886882 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("default_neteq_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build 2022-06-17 06:35:41.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build 2022-06-23 07:13:54.983471423 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("g711_c_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build 2022-06-23 07:13:54.955409288 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -154,7 +157,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -170,7 +173,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -202,4 +205,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("g711_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build 2022-06-23 07:13:54.979414048 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("g722_c_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build 2022-06-23 07:13:54.949708885 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -154,7 +157,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -170,7 +173,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -202,4 +205,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("g722_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build 2022-06-23 07:13:54.965599336 +0900
+@@ -135,14 +135,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -228,7 +231,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -244,7 +247,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -276,4 +279,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("ilbc_c_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build 2022-06-23 07:13:54.967034907 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("ilbc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build 2022-06-23 07:13:54.986313459 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("isac_bwinfo_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build 2022-06-17 06:35:19.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build 2022-06-23 07:13:54.958343628 +0900
+@@ -89,14 +89,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -168,7 +171,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -184,7 +187,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -216,4 +219,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("isac_c_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build 2022-06-23 07:13:54.982050740 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("isac_common_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/isac_fix_c_arm_asm_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/isac_fix_c_arm_asm_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/isac_fix_c_arm_asm_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/isac_fix_c_arm_asm_gn/moz.build 2022-06-23 07:13:54.948291688 +0900
+@@ -63,4 +63,13 @@
+ DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
+ DEFINES["_DEBUG"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("isac_fix_c_arm_asm_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/isac_fix_c_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/isac_fix_c_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/isac_fix_c_gn/moz.build 2022-06-17 06:35:06.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/isac_fix_c_gn/moz.build 2022-06-23 07:13:54.980650275 +0900
+@@ -92,4 +92,13 @@
+ DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
+ DEFINES["_DEBUG"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("isac_fix_c_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/isac_fix_common_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/isac_fix_common_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/isac_fix_common_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/isac_fix_common_gn/moz.build 2022-06-23 07:13:54.972518595 +0900
+@@ -67,4 +67,13 @@
+ DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
+ DEFINES["_DEBUG"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("isac_fix_common_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/isac_fix_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/isac_fix_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/isac_fix_gn/moz.build 2022-06-17 06:35:19.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/isac_fix_gn/moz.build 2022-06-23 07:13:54.978004306 +0900
+@@ -67,4 +67,13 @@
+ DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
+ DEFINES["_DEBUG"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("isac_fix_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build 2022-06-23 07:13:54.962608080 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -147,7 +150,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -163,7 +166,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -195,4 +198,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("isac_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/isac_neon_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/isac_neon_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/isac_neon_gn/moz.build 2022-06-17 06:35:41.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/isac_neon_gn/moz.build 2022-06-23 07:13:54.987520091 +0900
+@@ -70,4 +70,13 @@
+ DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
+ DEFINES["_DEBUG"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("isac_neon_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build 2022-06-23 07:13:54.968461080 +0900
+@@ -66,14 +66,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -148,7 +151,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -164,7 +167,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -196,4 +199,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("isac_vad_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/legacy_encoded_audio_frame_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/legacy_encoded_audio_frame_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/legacy_encoded_audio_frame_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/legacy_encoded_audio_frame_gn/moz.build 2022-06-23 07:13:54.984895882 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("legacy_encoded_audio_frame_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build 2022-06-23 07:13:54.990417451 +0900
+@@ -99,14 +99,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -192,7 +195,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -208,7 +211,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -240,4 +243,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("neteq_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build 2022-06-23 07:13:54.961191104 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("pcm16b_c_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build 2022-06-23 07:13:54.973934558 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -155,7 +158,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -171,7 +174,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -203,4 +206,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("pcm16b_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/red_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/red_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/red_gn/moz.build 2022-06-17 06:35:26.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/red_gn/moz.build 2022-06-23 07:13:54.959772245 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("red_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build 2022-06-23 07:13:54.988943258 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_cng_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build 2022-06-23 07:13:54.964056615 +0900
+@@ -73,7 +73,7 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -81,7 +81,10 @@
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+ DEFINES["WEBRTC_CODEC_ISAC"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -221,4 +224,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_multiopus_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build 2022-06-23 07:13:54.976812793 +0900
+@@ -73,7 +73,7 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -81,7 +81,10 @@
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+ DEFINES["WEBRTC_CODEC_ISAC"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -170,7 +173,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -186,7 +189,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -228,4 +231,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_opus_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build
+--- third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build 2022-06-23 07:13:54.971329646 +0900
+@@ -72,7 +72,7 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -80,7 +80,10 @@
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+ DEFINES["WEBRTC_CODEC_ISAC"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -220,4 +223,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_opus_wrapper_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build
+--- third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build 2022-06-23 07:13:54.855736781 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_device_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build
+--- third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build 2022-06-23 07:13:54.854328041 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_device_buffer_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build
+--- third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build 2022-06-17 06:35:19.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build 2022-06-23 07:13:54.857144279 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_device_default_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build
+--- third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build 2022-06-23 07:13:54.861425473 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_device_generic_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build
+--- third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build 2022-06-23 07:13:54.860001544 +0900
+@@ -64,14 +64,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -154,7 +157,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -170,7 +173,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -192,4 +195,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_device_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build
+--- third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build 2022-06-23 07:13:54.858588415 +0900
+@@ -71,14 +71,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -165,7 +168,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -181,7 +184,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -213,4 +216,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_device_impl_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build
+--- third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build 2022-06-23 07:13:54.868726526 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_frame_manipulator_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build
+--- third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build 2022-06-17 06:35:19.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build 2022-06-23 07:13:54.867293781 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_mixer_impl_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl_gn/moz.build 2022-06-23 07:13:54.931358522 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("adaptive_fir_filter_erl_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec3/adaptive_fir_filter_gn/moz.build 2022-06-23 07:13:54.935610561 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -152,7 +155,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -168,7 +171,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -190,4 +193,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("adaptive_fir_filter_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build 2022-06-23 07:13:54.925689617 +0900
+@@ -77,14 +77,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -150,7 +153,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -166,7 +169,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -198,4 +201,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aec3_avx2_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build 2022-06-23 07:13:54.934179820 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aec3_common_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build 2022-06-23 07:13:54.927128584 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -152,7 +155,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -168,7 +171,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -190,4 +193,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aec3_fft_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build 2022-06-17 06:35:06.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build 2022-06-23 07:13:54.938542867 +0900
+@@ -121,14 +121,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -214,7 +217,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -230,7 +233,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -262,4 +265,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aec3_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build 2022-06-23 07:13:54.928538998 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("fft_data_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build 2022-06-23 07:13:54.932773454 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("matched_filter_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build 2022-06-23 07:13:54.937022858 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("render_buffer_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build 2022-06-23 07:13:54.929947538 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("vector_math_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec_dump/aec_dump_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec_dump/aec_dump_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec_dump/aec_dump_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec_dump/aec_dump_gn/moz.build 2022-06-23 07:13:54.901388702 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aec_dump_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec_dump/null_aec_dump_factory_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec_dump/null_aec_dump_factory_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec_dump/null_aec_dump_factory_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec_dump/null_aec_dump_factory_gn/moz.build 2022-06-23 07:13:54.902809475 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("null_aec_dump_factory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build 2022-06-23 07:13:54.919988592 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aec_dump_interface_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build 2022-06-23 07:13:54.904245416 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -170,7 +173,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -186,7 +189,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -218,4 +221,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aecm_core_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build 2022-06-23 07:13:54.885739583 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("agc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc/gain_control_interface_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc/gain_control_interface_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc/gain_control_interface_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc/gain_control_interface_gn/moz.build 2022-06-23 07:13:54.882900181 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("gain_control_interface_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build 2022-06-17 06:35:06.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build 2022-06-23 07:13:54.884301888 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("gain_map_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build 2022-06-23 07:13:54.881493504 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("legacy_agc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build 2022-06-23 07:13:54.887169082 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("level_estimation_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build 2022-06-23 07:13:54.911413230 +0900
+@@ -71,14 +71,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("adaptive_digital_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build 2022-06-23 07:13:54.912837910 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("biquad_filter_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build 2022-06-23 07:13:54.915691499 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("common_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build 2022-06-23 07:13:54.907117900 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("fixed_digital_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build 2022-06-17 06:35:06.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build 2022-06-23 07:13:54.914263352 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("gain_applier_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/level_estimation_agc_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc2/level_estimation_agc_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc2/level_estimation_agc_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc2/level_estimation_agc_gn/moz.build 2022-06-23 07:13:54.908551537 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("level_estimation_agc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/noise_level_estimator_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc2/noise_level_estimator_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc2/noise_level_estimator_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc2/noise_level_estimator_gn/moz.build 2022-06-23 07:13:54.917121970 +0900
+@@ -71,14 +71,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("noise_level_estimator_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad_gn/moz.build 2022-06-23 07:13:54.905687569 +0900
+@@ -75,14 +75,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -168,7 +171,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -184,7 +187,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -216,4 +219,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rnn_vad_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad_with_level_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad_with_level_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad_with_level_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad_with_level_gn/moz.build 2022-06-23 07:13:54.909981547 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rnn_vad_with_level_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/api_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/api_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/api_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/api_gn/moz.build 2022-06-23 07:13:54.877234322 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build 2022-06-23 07:13:54.924260409 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("apm_logging_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build 2022-06-23 07:13:54.875814571 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_buffer_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build 2022-06-23 07:13:54.892860138 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_frame_proxies_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build 2022-06-17 06:35:19.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build 2022-06-23 07:13:54.880068263 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_frame_view_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build 2022-06-17 06:35:06.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build 2022-06-23 07:13:54.898566072 +0900
+@@ -82,14 +82,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -175,7 +178,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -191,7 +194,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -223,4 +226,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_processing_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build 2022-06-23 07:13:54.891440868 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_processing_statistics_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/config_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/config_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/config_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/config_gn/moz.build 2022-06-23 07:13:54.890022099 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build 2022-06-23 07:13:54.941434356 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("high_pass_filter_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build 2022-06-23 07:13:54.940003044 +0900
+@@ -80,14 +80,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -173,7 +176,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -189,7 +192,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -221,4 +224,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("ns_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/optionally_built_submodule_creators_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/optionally_built_submodule_creators_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/optionally_built_submodule_creators_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/optionally_built_submodule_creators_gn/moz.build 2022-06-23 07:13:54.878663320 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("optionally_built_submodule_creators_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build 2022-06-23 07:13:54.899981074 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rms_level_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_api_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_api_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_api_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_api_gn/moz.build 2022-06-23 07:13:54.921397262 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("transient_suppressor_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl_gn/moz.build 2022-06-17 06:35:22.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl_gn/moz.build 2022-06-23 07:13:54.922827062 +0900
+@@ -71,14 +71,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("transient_suppressor_impl_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/utility/cascaded_biquad_filter_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/utility/cascaded_biquad_filter_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/utility/cascaded_biquad_filter_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/utility/cascaded_biquad_filter_gn/moz.build 2022-06-23 07:13:54.897121184 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("cascaded_biquad_filter_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/utility/legacy_delay_estimator_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/utility/legacy_delay_estimator_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/utility/legacy_delay_estimator_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/utility/legacy_delay_estimator_gn/moz.build 2022-06-23 07:13:54.895699640 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -150,7 +153,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -166,7 +169,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -198,4 +201,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("legacy_delay_estimator_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build 2022-06-23 07:13:54.894275831 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("pffft_wrapper_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build 2022-06-17 06:35:06.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build 2022-06-23 07:13:54.918563261 +0900
+@@ -74,14 +74,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -167,7 +170,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -183,7 +186,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -215,4 +218,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("vad_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build
+--- third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build 2022-06-23 07:13:54.888598260 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("voice_detection_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build
+--- third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build 2022-06-17 06:35:30.000000000 +0900
+_+++ third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build 2022-06-23 07:13:54.848623820 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("congestion_controller_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/congestion_controller/goog_cc/alr_detector_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/congestion_controller/goog_cc/alr_detector_gn/moz.build
+--- third_party/libwebrtc/modules/congestion_controller/goog_cc/alr_detector_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/congestion_controller/goog_cc/alr_detector_gn/moz.build 2022-06-23 07:13:54.835744241 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("alr_detector_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build
+--- third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/modules/congestion_controller/goog_cc/delay_based_bwe_gn/moz.build 2022-06-23 07:13:54.841461837 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("delay_based_bwe_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build
+--- third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build 2022-06-23 07:13:54.837185332 +0900
+@@ -74,14 +74,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -168,7 +171,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -184,7 +187,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -216,4 +219,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("estimators_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build
+--- third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_gn/moz.build 2022-06-23 07:13:54.842888390 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("goog_cc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/congestion_controller/goog_cc/link_capacity_estimator_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/congestion_controller/goog_cc/link_capacity_estimator_gn/moz.build
+--- third_party/libwebrtc/modules/congestion_controller/goog_cc/link_capacity_estimator_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/modules/congestion_controller/goog_cc/link_capacity_estimator_gn/moz.build 2022-06-23 07:13:54.838605143 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("link_capacity_estimator_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_controller_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_controller_gn/moz.build
+--- third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_controller_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/modules/congestion_controller/goog_cc/loss_based_controller_gn/moz.build 2022-06-23 07:13:54.840031797 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("loss_based_controller_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/congestion_controller/goog_cc/probe_controller_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/congestion_controller/goog_cc/probe_controller_gn/moz.build
+--- third_party/libwebrtc/modules/congestion_controller/goog_cc/probe_controller_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/modules/congestion_controller/goog_cc/probe_controller_gn/moz.build 2022-06-23 07:13:54.834316164 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("probe_controller_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/congestion_controller/goog_cc/pushback_controller_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/congestion_controller/goog_cc/pushback_controller_gn/moz.build
+--- third_party/libwebrtc/modules/congestion_controller/goog_cc/pushback_controller_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/congestion_controller/goog_cc/pushback_controller_gn/moz.build 2022-06-23 07:13:54.844315706 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("pushback_controller_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build
+--- third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build 2022-06-23 07:13:54.845750214 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("control_handler_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build
+--- third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build 2022-06-17 06:35:06.000000000 +0900
+_+++ third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build 2022-06-23 07:13:54.847187919 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("transport_feedback_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn/moz.build
+--- third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn/moz.build 2022-06-23 07:13:54.996239332 +0900
+@@ -54,14 +54,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -116,7 +119,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -128,7 +131,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -157,4 +160,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("desktop_capture_differ_sse2_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build
+--- third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build 2022-06-23 07:13:54.994840631 +0900
+@@ -85,14 +85,17 @@
+ "/third_party/libwebrtc/modules/desktop_capture/mac/window_list_utils.cc"
+ ]
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["WEBRTC_USE_PIPEWIRE"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+@@ -262,7 +265,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -274,7 +277,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -321,4 +324,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("desktop_capture_generic_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build
+--- third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build 2022-06-23 07:13:54.993240552 +0900
+@@ -46,14 +46,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -135,7 +138,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -147,7 +150,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "Xtst"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("desktop_capture_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/desktop_capture/desktop_capture_objc_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/desktop_capture/desktop_capture_objc_gn/moz.build
+--- third_party/libwebrtc/modules/desktop_capture/desktop_capture_objc_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_objc_gn/moz.build 2022-06-23 07:13:54.997451604 +0900
+@@ -64,4 +64,13 @@
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+ DEFINES["WEBRTC_HAS_NEON"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("desktop_capture_objc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build
+--- third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build 2022-06-23 07:13:54.991818116 +0900
+@@ -54,14 +54,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -117,7 +120,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -129,7 +132,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -151,4 +154,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("primitives_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/module_api_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/module_api_gn/moz.build
+--- third_party/libwebrtc/modules/module_api_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/module_api_gn/moz.build 2022-06-23 07:13:54.942842265 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("module_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/module_api_public_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/module_api_public_gn/moz.build
+--- third_party/libwebrtc/modules/module_api_public_gn/moz.build 2022-06-17 06:35:06.000000000 +0900
+_+++ third_party/libwebrtc/modules/module_api_public_gn/moz.build 2022-06-23 07:13:54.945679292 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("module_api_public_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/module_fec_api_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/module_fec_api_gn/moz.build
+--- third_party/libwebrtc/modules/module_fec_api_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/modules/module_fec_api_gn/moz.build 2022-06-23 07:13:54.830034319 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("module_fec_api_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build
+--- third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build 2022-06-17 06:35:23.000000000 +0900
+_+++ third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build 2022-06-23 07:13:54.832886815 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("interval_budget_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/pacing/pacing_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/pacing/pacing_gn/moz.build
+--- third_party/libwebrtc/modules/pacing/pacing_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/modules/pacing/pacing_gn/moz.build 2022-06-23 07:13:54.831465482 +0900
+@@ -73,14 +73,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -167,7 +170,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -183,7 +186,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -215,4 +218,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("pacing_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_gn/moz.build
+--- third_party/libwebrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_gn/moz.build 2022-06-23 07:13:54.998901241 +0900
+@@ -79,14 +79,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -173,7 +176,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -189,7 +192,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -221,4 +224,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("remote_bitrate_estimator_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build
+--- third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build 2022-06-23 07:13:54.864433701 +0900
+@@ -109,14 +109,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -203,7 +206,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -219,7 +222,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -251,4 +254,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_rtcp_format_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build
+--- third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build 2022-06-23 07:13:54.862939631 +0900
+@@ -121,14 +121,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -215,7 +218,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -231,7 +234,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -263,4 +266,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_rtcp_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build
+--- third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build 2022-06-23 07:13:54.865865094 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_video_header_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build
+--- third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build 2022-06-23 07:13:54.852894454 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("fft_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build
+--- third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build 2022-06-23 07:13:54.851469683 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("g711_3p_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build
+--- third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build 2022-06-17 06:35:26.000000000 +0900
+_+++ third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build 2022-06-23 07:13:54.850045134 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("g722_3p_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/utility/utility_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/utility/utility_gn/moz.build
+--- third_party/libwebrtc/modules/utility/utility_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/modules/utility/utility_gn/moz.build 2022-06-23 07:13:54.944272706 +0900
+@@ -72,14 +72,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -165,7 +168,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -181,7 +184,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -213,4 +216,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("utility_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build
+--- third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build 2022-06-23 07:13:54.828629957 +0900
+@@ -64,14 +64,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -179,7 +182,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -195,7 +198,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -223,4 +226,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_capture_internal_impl_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build
+--- third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build 2022-06-23 07:13:54.827186642 +0900
+@@ -72,14 +72,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -166,7 +169,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -182,7 +185,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -214,4 +217,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_capture_module_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build 2022-06-23 07:13:54.822919805 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("chain_diff_calculator_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build 2022-06-23 07:13:54.825757313 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("codec_globals_headers_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_decoder_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_decoder_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_decoder_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_decoder_gn/moz.build 2022-06-23 07:13:54.815759455 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aom_av1_decoder_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_encoder_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_encoder_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_encoder_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/codecs/av1/libaom_av1_encoder_gn/moz.build 2022-06-23 07:13:54.817195276 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aom_av1_encoder_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build 2022-06-17 06:35:15.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build 2022-06-23 07:13:54.814328553 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("nack_module_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build 2022-06-23 07:13:54.820065806 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("encoded_frame_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build 2022-06-23 07:13:54.807129541 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("frame_dependencies_calculator_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build 2022-06-23 07:13:54.818632510 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -161,7 +164,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -177,7 +180,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -209,4 +212,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("nack_module_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build 2022-06-23 07:13:54.802813041 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_codec_interface_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build 2022-06-23 07:13:54.811461911 +0900
+@@ -88,14 +88,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -182,7 +185,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -198,7 +201,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -230,4 +233,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_coding_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build 2022-06-23 07:13:54.805705341 +0900
+@@ -77,14 +77,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -171,7 +174,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -187,7 +190,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -219,4 +222,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_coding_utility_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build 2022-06-23 07:13:54.808566304 +0900
+@@ -73,14 +73,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -167,7 +170,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -183,7 +186,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -215,4 +218,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_h264_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build 2022-06-23 07:13:54.804253681 +0900
+@@ -71,14 +71,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -165,7 +168,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -181,7 +184,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -213,4 +216,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_multiplex_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build 2022-06-17 06:35:15.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build 2022-06-23 07:13:54.821496357 +0900
+@@ -72,14 +72,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -166,7 +169,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -182,7 +185,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -214,4 +217,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_vp8_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/webrtc_vp8_temporal_layers_gn/moz.build 2022-06-23 07:13:54.812899144 +0900
+@@ -73,14 +73,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -167,7 +170,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -183,7 +186,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -215,4 +218,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_vp8_temporal_layers_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build 2022-06-23 07:13:54.824351879 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -164,7 +167,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -180,7 +183,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -212,4 +215,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_vp9_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build
+--- third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build 2022-06-23 07:13:54.810003056 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -163,7 +166,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -179,7 +182,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -211,4 +214,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_vp9_helpers_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build
+--- third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build 2022-06-23 07:13:54.872987242 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("denoiser_filter_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build
+--- third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build 2022-06-23 07:13:54.871584463 +0900
+@@ -74,14 +74,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -168,7 +171,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -184,7 +187,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -216,4 +219,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_processing_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build
+--- third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build 2022-06-23 07:13:54.874379732 +0900
+@@ -65,7 +65,7 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -73,7 +73,10 @@
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -131,7 +134,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -143,7 +146,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -159,4 +162,13 @@
+
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_processing_neon_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build firefox-102.0/third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build
+--- third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build 2022-06-23 07:13:54.870152148 +0900
+@@ -71,14 +71,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -148,7 +151,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -164,7 +167,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_processing_sse2_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/moz.build firefox-102.0/third_party/libwebrtc/moz.build
+--- third_party/libwebrtc/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/moz.build 2022-06-23 07:16:39.729659012 +0900
+@@ -384,7 +384,7 @@
+ "/third_party/libwebrtc/sdk/helpers_objc_gn"
+ ]
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DIRS += [
+ "/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn",
+@@ -505,7 +505,7 @@
+ "/third_party/libwebrtc/modules/video_processing/video_processing_neon_gn"
+ ]
+
+-if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["CPU_ARCH"] == "x86" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DIRS += [
+ "/third_party/libwebrtc/common_audio/common_audio_avx2_gn",
+@@ -515,7 +515,7 @@
+ "/third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn"
+ ]
+
+-if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["CPU_ARCH"] == "x86_64" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DIRS += [
+ "/third_party/libwebrtc/common_audio/common_audio_avx2_gn",
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/atomicops_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/atomicops_gn/moz.build
+--- third_party/libwebrtc/rtc_base/atomicops_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/atomicops_gn/moz.build 2022-06-23 07:13:55.069742803 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("atomicops_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build
+--- third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build 2022-06-23 07:13:55.000328136 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("audio_format_to_string_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/checks_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/checks_gn/moz.build
+--- third_party/libwebrtc/rtc_base/checks_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/checks_gn/moz.build 2022-06-23 07:13:55.093316305 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("checks_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build
+--- third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build 2022-06-23 07:13:55.056974212 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("compile_assert_c_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build
+--- third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build 2022-06-23 07:13:55.042833550 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("criticalsection_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/deprecation_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/deprecation_gn/moz.build
+--- third_party/libwebrtc/rtc_base/deprecation_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/deprecation_gn/moz.build 2022-06-23 07:13:55.054138237 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("deprecation_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/divide_round_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/divide_round_gn/moz.build
+--- third_party/libwebrtc/rtc_base/divide_round_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/divide_round_gn/moz.build 2022-06-23 07:13:55.068341357 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("divide_round_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build 2022-06-23 07:13:55.024437652 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("alr_experiment_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build 2022-06-23 07:13:55.023020466 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("balanced_degradation_settings_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build 2022-06-23 07:13:55.013056251 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("cpu_speed_experiment_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build 2022-06-23 07:13:55.027286882 +0900
+@@ -70,14 +70,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -156,7 +159,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -172,7 +175,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -204,4 +207,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("field_trial_parser_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/jitter_upper_bound_experiment_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/jitter_upper_bound_experiment_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/jitter_upper_bound_experiment_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/jitter_upper_bound_experiment_gn/moz.build 2022-06-23 07:13:55.017327877 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("jitter_upper_bound_experiment_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/keyframe_interval_settings_experiment_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/keyframe_interval_settings_experiment_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/keyframe_interval_settings_experiment_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/keyframe_interval_settings_experiment_gn/moz.build 2022-06-23 07:13:55.021602077 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("keyframe_interval_settings_experiment_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/min_video_bitrate_experiment_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/min_video_bitrate_experiment_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/min_video_bitrate_experiment_gn/moz.build 2022-06-17 06:35:13.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/min_video_bitrate_experiment_gn/moz.build 2022-06-23 07:13:55.025864676 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("min_video_bitrate_experiment_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build 2022-06-23 07:13:55.020180714 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("quality_rampup_experiment_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build 2022-06-23 07:13:55.010221297 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("quality_scaler_settings_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build 2022-06-23 07:13:55.015906212 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("quality_scaling_experiment_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build 2022-06-23 07:13:55.018756825 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rate_control_settings_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build 2022-06-23 07:13:55.011638664 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtt_mult_experiment_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/experiments/stable_target_rate_experiment_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/experiments/stable_target_rate_experiment_gn/moz.build
+--- third_party/libwebrtc/rtc_base/experiments/stable_target_rate_experiment_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/experiments/stable_target_rate_experiment_gn/moz.build 2022-06-23 07:13:55.014479418 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("stable_target_rate_experiment_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build
+--- third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build 2022-06-17 06:35:15.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build 2022-06-23 07:13:55.037224287 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("gtest_prod_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build
+--- third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build 2022-06-23 07:13:55.074050296 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("ignore_wundef_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/logging_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/logging_gn/moz.build
+--- third_party/libwebrtc/rtc_base/logging_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/logging_gn/moz.build 2022-06-23 07:13:55.004577440 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("logging_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/macromagic_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/macromagic_gn/moz.build
+--- third_party/libwebrtc/rtc_base/macromagic_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/macromagic_gn/moz.build 2022-06-23 07:13:55.007394059 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("macromagic_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build
+--- third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build 2022-06-23 07:13:55.091896193 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("aligned_malloc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build
+--- third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build 2022-06-23 07:13:55.005992492 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("sent_packet_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build
+--- third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build 2022-06-23 07:13:55.055557878 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("platform_thread_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build
+--- third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build 2022-06-23 07:13:55.032952951 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("platform_thread_types_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build
+--- third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build 2022-06-23 07:13:55.008803931 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("protobuf_utils_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build
+--- third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build 2022-06-23 07:13:55.028706663 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rate_limiter_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/refcount_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/refcount_gn/moz.build
+--- third_party/libwebrtc/rtc_base/refcount_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/refcount_gn/moz.build 2022-06-23 07:13:55.049909211 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("refcount_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build
+--- third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build 2022-06-23 07:13:55.035816999 +0900
+@@ -80,14 +80,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -170,7 +173,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -186,7 +189,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -218,4 +221,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_base_approved_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build
+--- third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build 2022-06-23 07:13:55.071208180 +0900
+@@ -94,14 +94,17 @@
+ "/third_party/libwebrtc/rtc_base/mac_ifaddrs_converter.cc"
+ ]
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -203,7 +206,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -219,7 +222,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -251,4 +254,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_base_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build
+--- third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build 2022-06-23 07:13:55.052735207 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_event_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build
+--- third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build 2022-06-23 07:13:55.048505941 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -155,7 +158,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -171,7 +174,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -203,4 +206,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_numerics_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build
+--- third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build 2022-06-23 07:13:55.003156577 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_task_queue_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build
+--- third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build 2022-06-23 07:13:55.051318522 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("safe_compare_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build
+--- third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build 2022-06-23 07:13:55.038624471 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("safe_conversions_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build
+--- third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build 2022-06-23 07:13:55.040024906 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("safe_minmax_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build
+--- third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build 2022-06-17 06:35:26.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build 2022-06-23 07:13:55.058386329 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("sanitizer_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/stringutils_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/stringutils_gn/moz.build
+--- third_party/libwebrtc/rtc_base/stringutils_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/stringutils_gn/moz.build 2022-06-23 07:13:55.075471240 +0900
+@@ -71,14 +71,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("stringutils_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build
+--- third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build 2022-06-23 07:13:55.062663235 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("mutex_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build
+--- third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build 2022-06-23 07:13:55.061245157 +0900
+@@ -71,14 +71,17 @@
+ "/third_party/libwebrtc/rtc_base/synchronization/rw_lock_posix.cc"
+ ]
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -169,7 +172,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -185,7 +188,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -217,4 +220,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rw_lock_wrapper_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build
+--- third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build 2022-06-23 07:13:55.065508738 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("sequence_checker_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build
+--- third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build 2022-06-23 07:13:55.066933207 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("yield_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build
+--- third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build 2022-06-23 07:13:55.064085861 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("yield_policy_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/system/arch_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/system/arch_gn/moz.build
+--- third_party/libwebrtc/rtc_base/system/arch_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/system/arch_gn/moz.build 2022-06-23 07:13:55.089076619 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("arch_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/system/asm_defines_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/system/asm_defines_gn/moz.build
+--- third_party/libwebrtc/rtc_base/system/asm_defines_gn/moz.build 2022-06-17 06:35:15.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/system/asm_defines_gn/moz.build 2022-06-23 07:13:55.086276902 +0900
+@@ -57,4 +57,13 @@
+ DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
+ DEFINES["_DEBUG"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("asm_defines_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/system/cocoa_threading_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/system/cocoa_threading_gn/moz.build
+--- third_party/libwebrtc/rtc_base/system/cocoa_threading_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/system/cocoa_threading_gn/moz.build 2022-06-23 07:13:55.082291943 +0900
+@@ -54,4 +54,13 @@
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+ DEFINES["WEBRTC_HAS_NEON"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("cocoa_threading_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build
+--- third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build 2022-06-23 07:13:55.081098987 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("file_wrapper_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build
+--- third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build 2022-06-23 07:13:55.087673770 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("ignore_warnings_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/system/inline_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/system/inline_gn/moz.build
+--- third_party/libwebrtc/rtc_base/system/inline_gn/moz.build 2022-06-17 06:35:26.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/system/inline_gn/moz.build 2022-06-23 07:13:55.083686597 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("inline_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build
+--- third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build 2022-06-23 07:13:55.078271608 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtc_export_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build
+--- third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build 2022-06-17 06:35:14.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build 2022-06-23 07:13:55.085099665 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -183,4 +186,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("thread_registry_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/system/unused_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/system/unused_gn/moz.build
+--- third_party/libwebrtc/rtc_base/system/unused_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/system/unused_gn/moz.build 2022-06-23 07:13:55.090478446 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("unused_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/system/warn_current_thread_is_deadlocked_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/system/warn_current_thread_is_deadlocked_gn/moz.build
+--- third_party/libwebrtc/rtc_base/system/warn_current_thread_is_deadlocked_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/system/warn_current_thread_is_deadlocked_gn/moz.build 2022-06-23 07:13:55.079679517 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("warn_current_thread_is_deadlocked_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/task_utils/pending_task_safety_flag_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/task_utils/pending_task_safety_flag_gn/moz.build
+--- third_party/libwebrtc/rtc_base/task_utils/pending_task_safety_flag_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/task_utils/pending_task_safety_flag_gn/moz.build 2022-06-23 07:13:55.045661159 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("pending_task_safety_flag_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build
+--- third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build 2022-06-23 07:13:55.047085559 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -160,7 +163,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -176,7 +179,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -208,4 +211,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("repeating_task_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/task_utils/to_queued_task_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/task_utils/to_queued_task_gn/moz.build
+--- third_party/libwebrtc/rtc_base/task_utils/to_queued_task_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/task_utils/to_queued_task_gn/moz.build 2022-06-23 07:13:55.044241619 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("to_queued_task_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build
+--- third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build 2022-06-17 06:35:07.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build 2022-06-23 07:13:55.030121685 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("base64_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build
+--- third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build 2022-06-23 07:13:55.031538961 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -145,7 +148,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -161,7 +164,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -193,4 +196,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("sigslot_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build
+--- third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build 2022-06-23 07:13:55.076871955 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("thread_checker_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build
+--- third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build 2022-06-23 07:13:55.072645233 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("timestamp_extrapolator_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/timeutils_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/timeutils_gn/moz.build
+--- third_party/libwebrtc/rtc_base/timeutils_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/timeutils_gn/moz.build 2022-06-23 07:13:55.059808675 +0900
+@@ -69,14 +69,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -155,7 +158,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -171,7 +174,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -203,4 +206,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("timeutils_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/type_traits_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/type_traits_gn/moz.build
+--- third_party/libwebrtc/rtc_base/type_traits_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/type_traits_gn/moz.build 2022-06-23 07:13:55.041419459 +0900
+@@ -59,14 +59,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -137,7 +140,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -153,7 +156,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -175,4 +178,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("type_traits_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build
+--- third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build 2022-06-23 07:13:55.001738088 +0900
+@@ -63,14 +63,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -141,7 +144,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -157,7 +160,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -179,4 +182,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("unit_base_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build firefox-102.0/third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build
+--- third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build 2022-06-23 07:13:55.034369596 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -149,7 +152,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -165,7 +168,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -197,4 +200,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("weak_ptr_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/sdk/base_objc_gn/moz.build firefox-102.0/third_party/libwebrtc/sdk/base_objc_gn/moz.build
+--- third_party/libwebrtc/sdk/base_objc_gn/moz.build 2022-06-17 06:35:42.000000000 +0900
+_+++ third_party/libwebrtc/sdk/base_objc_gn/moz.build 2022-06-23 07:13:54.799941789 +0900
+@@ -72,4 +72,13 @@
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+ DEFINES["WEBRTC_HAS_NEON"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("base_objc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/sdk/helpers_objc_gn/moz.build firefox-102.0/third_party/libwebrtc/sdk/helpers_objc_gn/moz.build
+--- third_party/libwebrtc/sdk/helpers_objc_gn/moz.build 2022-06-17 06:35:44.000000000 +0900
+_+++ third_party/libwebrtc/sdk/helpers_objc_gn/moz.build 2022-06-23 07:13:54.798741730 +0900
+@@ -67,4 +67,13 @@
+ DEFINES["WEBRTC_ARCH_ARM64"] = True
+ DEFINES["WEBRTC_HAS_NEON"] = True
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("helpers_objc_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build firefox-102.0/third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build
+--- third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build 2022-06-23 07:13:54.784679505 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("field_trial_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/system_wrappers/metrics_gn/moz.build firefox-102.0/third_party/libwebrtc/system_wrappers/metrics_gn/moz.build
+--- third_party/libwebrtc/system_wrappers/metrics_gn/moz.build 2022-06-17 06:35:30.000000000 +0900
+_+++ third_party/libwebrtc/system_wrappers/metrics_gn/moz.build 2022-06-23 07:13:54.786105537 +0900
+@@ -67,14 +67,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -153,7 +156,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -169,7 +172,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -201,4 +204,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("metrics_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build firefox-102.0/third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build
+--- third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build 2022-06-17 06:35:30.000000000 +0900
+_+++ third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build 2022-06-23 07:13:54.783249044 +0900
+@@ -77,14 +77,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -174,7 +177,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -190,7 +193,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -222,4 +225,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("system_wrappers_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/test/rtp_test_utils_gn/moz.build firefox-102.0/third_party/libwebrtc/test/rtp_test_utils_gn/moz.build
+--- third_party/libwebrtc/test/rtp_test_utils_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/test/rtp_test_utils_gn/moz.build 2022-06-23 07:13:54.547277002 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rtp_test_utils_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/algorithm_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/algorithm_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/algorithm_gn/moz.build 2022-06-17 06:35:35.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/algorithm_gn/moz.build 2022-06-23 07:13:54.714611863 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("algorithm_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/container_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/container_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/container_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/algorithm/container_gn/moz.build 2022-06-23 07:13:54.713275158 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("container_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/base/atomic_hook_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/base/atomic_hook_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/base/atomic_hook_gn/moz.build 2022-06-17 06:35:08.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/atomic_hook_gn/moz.build 2022-06-23 07:13:54.722549670 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("atomic_hook_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/base/base_internal_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/base/base_internal_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/base/base_internal_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/base_internal_gn/moz.build 2022-06-23 07:13:54.721235187 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("base_internal_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/base/config_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/base/config_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/base/config_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/config_gn/moz.build 2022-06-23 07:13:54.719916315 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("config_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/base/core_headers_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/base/core_headers_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/base/core_headers_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/core_headers_gn/moz.build 2022-06-23 07:13:54.717253604 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("core_headers_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/base/log_severity_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/base/log_severity_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/base/log_severity_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/log_severity_gn/moz.build 2022-06-23 07:13:54.718594117 +0900
+@@ -48,7 +48,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -113,7 +113,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -145,4 +145,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("log_severity_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/base/raw_logging_internal_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/base/raw_logging_internal_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/base/raw_logging_internal_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/base/raw_logging_internal_gn/moz.build 2022-06-23 07:13:54.723878501 +0900
+@@ -48,7 +48,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -113,7 +113,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -145,4 +145,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("raw_logging_internal_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/container/compressed_tuple_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/container/compressed_tuple_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/container/compressed_tuple_gn/moz.build 2022-06-17 06:35:08.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/container/compressed_tuple_gn/moz.build 2022-06-23 07:13:54.729230221 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("compressed_tuple_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/container/flat_hash_map_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/container/flat_hash_map_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/container/flat_hash_map_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/container/flat_hash_map_gn/moz.build 2022-06-23 07:13:54.727909766 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("flat_hash_map_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_gn/moz.build 2022-06-23 07:13:54.731869007 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("inlined_vector_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_internal_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_internal_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_internal_gn/moz.build 2022-06-17 06:35:19.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/container/inlined_vector_internal_gn/moz.build 2022-06-23 07:13:54.730550455 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("inlined_vector_internal_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/memory/memory_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/memory/memory_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/memory/memory_gn/moz.build 2022-06-17 06:35:33.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/memory/memory_gn/moz.build 2022-06-23 07:13:54.741163386 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("memory_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/meta/type_traits_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/meta/type_traits_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/meta/type_traits_gn/moz.build 2022-06-17 06:35:21.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/meta/type_traits_gn/moz.build 2022-06-23 07:13:54.711954242 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("type_traits_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/int128_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/int128_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/int128_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/numeric/int128_gn/moz.build 2022-06-23 07:13:54.739847450 +0900
+@@ -48,7 +48,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -113,7 +113,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -145,4 +145,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("int128_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/strings/internal_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/strings/internal_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/strings/internal_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/strings/internal_gn/moz.build 2022-06-23 07:13:54.725225014 +0900
+@@ -50,7 +50,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -115,7 +115,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -147,4 +147,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("internal_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build 2022-06-17 06:35:28.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/strings/strings_gn/moz.build 2022-06-23 07:13:54.726584031 +0900
+@@ -63,7 +63,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -128,7 +128,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -160,4 +160,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("strings_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build 2022-06-17 06:35:44.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_optional_access_gn/moz.build 2022-06-23 07:13:54.733208597 +0900
+@@ -48,7 +48,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -113,7 +113,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -145,4 +145,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("bad_optional_access_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/bad_variant_access_gn/moz.build 2022-06-23 07:13:54.737184209 +0900
+@@ -48,7 +48,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -113,7 +113,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -145,4 +145,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("bad_variant_access_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build 2022-06-17 06:35:29.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/optional_gn/moz.build 2022-06-23 07:13:54.735842784 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("optional_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build 2022-06-17 06:35:27.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/span_gn/moz.build 2022-06-23 07:13:54.734529864 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("span_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/types/variant_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/types/variant_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/types/variant_gn/moz.build 2022-06-17 06:35:12.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/types/variant_gn/moz.build 2022-06-23 07:13:54.738507198 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("variant_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/abseil-cpp/absl/utility/utility_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/abseil-cpp/absl/utility/utility_gn/moz.build
+--- third_party/libwebrtc/third_party/abseil-cpp/absl/utility/utility_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/third_party/abseil-cpp/absl/utility/utility_gn/moz.build 2022-06-23 07:13:54.715929833 +0900
+@@ -44,7 +44,7 @@
+ DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True
+ DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0"
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -105,7 +105,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -127,4 +127,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("utility_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build
+--- third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build 2022-06-17 06:35:19.000000000 +0900
+_+++ third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build 2022-06-23 07:13:54.709260714 +0900
+@@ -49,7 +49,7 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -117,7 +117,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -133,7 +133,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -165,4 +165,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("pffft_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build firefox-102.0/third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build
+--- third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build 2022-06-23 07:13:54.710633818 +0900
+@@ -49,7 +49,7 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+@@ -116,7 +116,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -132,7 +132,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -164,4 +164,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("rnn_vad_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build firefox-102.0/third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build
+--- third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build 2022-06-23 07:13:54.550403502 +0900
+@@ -75,14 +75,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -169,7 +172,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -185,7 +188,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -217,4 +220,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_adaptation_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build firefox-102.0/third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build
+--- third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build 2022-06-17 06:35:34.000000000 +0900
+_+++ third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build 2022-06-23 07:13:54.553314899 +0900
+@@ -68,14 +68,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -162,7 +165,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -178,7 +181,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -210,4 +213,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("frame_dumping_decoder_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/video/video_gn/moz.build firefox-102.0/third_party/libwebrtc/video/video_gn/moz.build
+--- third_party/libwebrtc/video/video_gn/moz.build 2022-06-17 06:35:20.000000000 +0900
+_+++ third_party/libwebrtc/video/video_gn/moz.build 2022-06-23 07:13:54.548902138 +0900
+@@ -97,14 +97,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -191,7 +194,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -207,7 +210,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -239,4 +242,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build firefox-102.0/third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build
+--- third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build 2022-06-17 06:35:19.000000000 +0900
+_+++ third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build 2022-06-23 07:13:54.551880330 +0900
+@@ -73,14 +73,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -167,7 +170,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -183,7 +186,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -215,4 +218,13 @@
+ "-msse2"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("video_stream_encoder_impl_gn")
+diff -ur firefox-102.0.orig/third_party/libwebrtc/webrtc_gn/moz.build firefox-102.0/third_party/libwebrtc/webrtc_gn/moz.build
+--- third_party/libwebrtc/webrtc_gn/moz.build 2022-06-17 06:35:43.000000000 +0900
+_+++ third_party/libwebrtc/webrtc_gn/moz.build 2022-06-23 07:13:54.801379003 +0900
+@@ -64,14 +64,17 @@
+ DEFINES["__STDC_CONSTANT_MACROS"] = True
+ DEFINES["__STDC_FORMAT_MACROS"] = True
+
+-if CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD":
+
+ DEFINES["USE_AURA"] = "1"
+ DEFINES["USE_GLIB"] = "1"
+ DEFINES["USE_NSS_CERTS"] = "1"
+ DEFINES["USE_OZONE"] = "1"
+ DEFINES["USE_UDEV"] = True
+- DEFINES["WEBRTC_LINUX"] = True
++ if CONFIG["OS_TARGET"] == "Linux":
++ DEFINES["WEBRTC_LINUX"] = True
++ else:
++ DEFINES["WEBRTC_BSD"] = True
+ DEFINES["WEBRTC_POSIX"] = True
+ DEFINES["_FILE_OFFSET_BITS"] = "64"
+ DEFINES["_GNU_SOURCE"] = True
+@@ -172,7 +175,7 @@
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+-if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux":
++if not CONFIG["MOZ_DEBUG"] and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_FORTIFY_SOURCE"] = "2"
+
+@@ -188,7 +191,7 @@
+
+ DEFINES["_DEBUG"] = True
+
+-if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux":
++if CONFIG["MOZ_DEBUG"] == "1" and (CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "NetBSD" or CONFIG["OS_TARGET"] == "OpenBSD" or CONFIG["OS_TARGET"] == "FreeBSD"):
+
+ DEFINES["_DEBUG"] = True
+
+@@ -221,4 +224,13 @@
+ "android_support"
+ ]
+
++if CONFIG["CPU_ARCH"] == "x86":
++ CFLAGS += [
++ "-msse2"
++ ]
++
++ CXXFLAGS += [
++ "-msse2"
++ ]
++
+ Library("webrtc_gn")
diff --git a/www/firefox102/patches/patch-media_ffvpx_libavutil_arm_bswap.h b/www/firefox102/patches/patch-media_ffvpx_libavutil_arm_bswap.h
new file mode 100644
index 00000000000..64faf766551
--- /dev/null
+++ b/www/firefox102/patches/patch-media_ffvpx_libavutil_arm_bswap.h
@@ -0,0 +1,22 @@
+$NetBSD: patch-media_ffvpx_libavutil_arm_bswap.h,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Fix NetBSD aarch64 build.
+
+--- media/ffvpx/libavutil/arm/bswap.h.orig 2019-10-30 17:35:56.000000000 +0000
++++ media/ffvpx/libavutil/arm/bswap.h
+@@ -23,6 +23,8 @@
+ #include "config.h"
+ #include "libavutil/attributes.h"
+
++#ifndef __aarch64__
++
+ #ifdef __ARMCC_VERSION
+
+ #if HAVE_ARMV6
+@@ -64,4 +66,6 @@ static av_always_inline av_const uint32_
+
+ #endif /* __ARMCC_VERSION */
+
++#endif /* __aarch64__ */
++
+ #endif /* AVUTIL_ARM_BSWAP_H */
diff --git a/www/firefox102/patches/patch-media_libcubeb_src_cubeb__alsa.c b/www/firefox102/patches/patch-media_libcubeb_src_cubeb__alsa.c
new file mode 100644
index 00000000000..9a5e8a48493
--- /dev/null
+++ b/www/firefox102/patches/patch-media_libcubeb_src_cubeb__alsa.c
@@ -0,0 +1,12 @@
+$NetBSD: patch-media_libcubeb_src_cubeb__alsa.c,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+--- media/libcubeb/src/cubeb_alsa.c.orig 2021-09-04 13:25:19.000000000 +0000
++++ media/libcubeb/src/cubeb_alsa.c
+@@ -7,6 +7,7 @@
+ #undef NDEBUG
+ #define _DEFAULT_SOURCE
+ #define _BSD_SOURCE
++#define _NETBSD_SOURCE
+ #define _XOPEN_SOURCE 500
+ #include "cubeb-internal.h"
+ #include "cubeb/cubeb.h"
diff --git a/www/firefox102/patches/patch-media_libcubeb_src_cubeb__jack.cpp b/www/firefox102/patches/patch-media_libcubeb_src_cubeb__jack.cpp
new file mode 100644
index 00000000000..0ecf5e0e158
--- /dev/null
+++ b/www/firefox102/patches/patch-media_libcubeb_src_cubeb__jack.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-media_libcubeb_src_cubeb__jack.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Enable strdup(3) for NetBSD too.
+
+--- media/libcubeb/src/cubeb_jack.cpp.orig 2022-04-28 22:03:04.000000000 +0000
++++ media/libcubeb/src/cubeb_jack.cpp
+@@ -8,7 +8,7 @@
+ */
+ #define _DEFAULT_SOURCE
+ #define _BSD_SOURCE
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #define _POSIX_SOURCE
+ #endif
+ #include "cubeb-internal.h"
diff --git a/www/firefox102/patches/patch-media_libcubeb_src_moz.build b/www/firefox102/patches/patch-media_libcubeb_src_moz.build
new file mode 100644
index 00000000000..cf418c76e23
--- /dev/null
+++ b/www/firefox102/patches/patch-media_libcubeb_src_moz.build
@@ -0,0 +1,19 @@
+$NetBSD: patch-media_libcubeb_src_moz.build,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Add Sun audio support
+
+--- media/libcubeb/src/moz.build.orig 2022-04-28 22:02:59.000000000 +0000
++++ media/libcubeb/src/moz.build
+@@ -22,6 +22,12 @@ if CONFIG['MOZ_ALSA']:
+ ]
+ DEFINES['USE_ALSA'] = True
+
++if CONFIG['MOZ_SUNAUDIO']:
++ SOURCES += [
++ 'cubeb_sun.c',
++ ]
++ DEFINES['USE_SUN'] = True
++
+ if (
+ CONFIG["MOZ_PULSEAUDIO"]
+ or CONFIG["MOZ_JACK"]
diff --git a/www/firefox102/patches/patch-media_libpng_pngpriv.h b/www/firefox102/patches/patch-media_libpng_pngpriv.h
new file mode 100644
index 00000000000..0c35135fc2d
--- /dev/null
+++ b/www/firefox102/patches/patch-media_libpng_pngpriv.h
@@ -0,0 +1,17 @@
+$NetBSD: patch-media_libpng_pngpriv.h,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Fix _POSIX_SOURCE on SunOS.
+
+--- media/libpng/pngpriv.h.orig 2018-06-05 19:47:32.000000000 +0000
++++ media/libpng/pngpriv.h
+@@ -36,8 +36,10 @@
+ * still required (as of 2011-05-02.)
+ */
+ #ifndef _POSIX_SOURCE
++#if !defined(__sun) || (__STDC_VERSION__-0 < 199901L)
+ # define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */
+ #endif
++#endif
+
+ #ifndef PNG_VERSION_INFO_ONLY
+ /* Standard library headers not required by png.h: */
diff --git a/www/firefox102/patches/patch-media_libtheora_lib_info.c b/www/firefox102/patches/patch-media_libtheora_lib_info.c
new file mode 100644
index 00000000000..0bf38e4e3e4
--- /dev/null
+++ b/www/firefox102/patches/patch-media_libtheora_lib_info.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-media_libtheora_lib_info.c,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Fix undefined behavior when calling <ctype.h> functions with illegal values.
+
+media/libtheora/lib/info.c:32:8: error: array subscript is of type 'char' [-Werror,-Wchar-subscripts]
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1642081
+
+--- media/libtheora/lib/info.c.orig 2020-05-07 18:34:12.000000000 +0000
++++ media/libtheora/lib/info.c
+@@ -29,7 +29,7 @@
+ static int oc_tagcompare(const char *_s1,const char *_s2,int _n){
+ int c;
+ for(c=0;c<_n;c++){
+- if(toupper(_s1[c])!=toupper(_s2[c]))return !0;
++ if(toupper((unsigned char)_s1[c])!=toupper((unsigned char)_s2[c]))return !0;
+ }
+ return _s1[c]!='=';
+ }
diff --git a/www/firefox102/patches/patch-modules_fdlibm_src_math__private.h b/www/firefox102/patches/patch-modules_fdlibm_src_math__private.h
new file mode 100644
index 00000000000..9724bf279a4
--- /dev/null
+++ b/www/firefox102/patches/patch-modules_fdlibm_src_math__private.h
@@ -0,0 +1,18 @@
+$NetBSD: patch-modules_fdlibm_src_math__private.h,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Fix PR pkg/56457, build failure on NetBSD/i386.
+ Do not use FreeBSD-specific definition.
+
+--- modules/fdlibm/src/math_private.h.orig 2021-09-27 22:47:42.000000000 +0000
++++ modules/fdlibm/src/math_private.h
+@@ -30,8 +30,8 @@
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
+-typedef double __double_t;
+-typedef __double_t double_t;
++#include <math.h>
++typedef double_t __double_t;
+
+ /*
+ * The original fdlibm code used statements like:
diff --git a/www/firefox102/patches/patch-mozglue_misc_Uptime.cpp b/www/firefox102/patches/patch-mozglue_misc_Uptime.cpp
new file mode 100644
index 00000000000..86d200d73d5
--- /dev/null
+++ b/www/firefox102/patches/patch-mozglue_misc_Uptime.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-mozglue_misc_Uptime.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Define uptime-related functions for NetBSD too.
+
+--- mozglue/misc/Uptime.cpp.orig 2021-05-20 21:29:40.000000000 +0000
++++ mozglue/misc/Uptime.cpp
+@@ -76,7 +76,7 @@ Maybe<uint64_t> NowIncludingSuspendMs()
+ return Some(interrupt_time / kHNSperMS);
+ }
+
+-#elif defined(XP_LINUX) // including Android
++#elif defined(OS_LINUX) || defined(XP_UNIX) // including Android
+ # include <time.h>
+
+ // Number of nanoseconds in a millisecond.
diff --git a/www/firefox102/patches/patch-nsprpub_pr_src_pthreads_ptsynch.c b/www/firefox102/patches/patch-nsprpub_pr_src_pthreads_ptsynch.c
new file mode 100644
index 00000000000..a2fc8480eb1
--- /dev/null
+++ b/www/firefox102/patches/patch-nsprpub_pr_src_pthreads_ptsynch.c
@@ -0,0 +1,110 @@
+$NetBSD: patch-nsprpub_pr_src_pthreads_ptsynch.c,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+firefox: Workaround broken pthread_equal() usage
+
+Switch to an internal version of pthread_equal() without sanity checks.
+
+Problems detected on NetBSD 9.99.46.
+
+--- nsprpub/pr/src/pthreads/ptsynch.c.orig 2020-01-17 21:34:42.000000000 +0000
++++ nsprpub/pr/src/pthreads/ptsynch.c
+@@ -25,6 +25,13 @@ static pthread_condattr_t _pt_cvar_attr;
+ extern PTDebug pt_debug; /* this is shared between several modules */
+ #endif /* defined(DEBUG) */
+
++/* XXX, pthread_equal() is misused to compare non-valid thread pointers */
++static int
++pt_pthread_equal(pthread_t t1, pthread_t t2)
++{
++ return t1 == t2;
++}
++
+ #if defined(FREEBSD)
+ /*
+ * On older versions of FreeBSD, pthread_mutex_trylock returns EDEADLK.
+@@ -197,9 +204,9 @@ PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock
+ PR_ASSERT(lock != NULL);
+ PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(lock->mutex));
+ PR_ASSERT(PR_TRUE == lock->locked);
+- PR_ASSERT(pthread_equal(lock->owner, self));
++ PR_ASSERT(pt_pthread_equal(lock->owner, self));
+
+- if (!lock->locked || !pthread_equal(lock->owner, self)) {
++ if (!lock->locked || !pt_pthread_equal(lock->owner, self)) {
+ return PR_FAILURE;
+ }
+
+@@ -225,7 +232,7 @@ PR_IMPLEMENT(void) PR_AssertCurrentThrea
+ * to the correctness of PR_AssertCurrentThreadOwnsLock(), but
+ * this particular order makes the assertion more likely to
+ * catch errors. */
+- PR_ASSERT(lock->locked && pthread_equal(lock->owner, pthread_self()));
++ PR_ASSERT(lock->locked && pt_pthread_equal(lock->owner, pthread_self()));
+ }
+
+ /**************************************************************/
+@@ -281,7 +288,7 @@ static void pt_PostNotifyToCvar(PRCondVa
+ _PT_Notified *notified = &cvar->lock->notified;
+
+ PR_ASSERT(PR_TRUE == cvar->lock->locked);
+- PR_ASSERT(pthread_equal(cvar->lock->owner, pthread_self()));
++ PR_ASSERT(pt_pthread_equal(cvar->lock->owner, pthread_self()));
+ PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(cvar->lock->mutex));
+
+ while (1)
+@@ -369,7 +376,7 @@ PR_IMPLEMENT(PRStatus) PR_WaitCondVar(PR
+ PR_ASSERT(_PT_PTHREAD_MUTEX_IS_LOCKED(cvar->lock->mutex));
+ PR_ASSERT(PR_TRUE == cvar->lock->locked);
+ /* and it better be by us */
+- PR_ASSERT(pthread_equal(cvar->lock->owner, pthread_self()));
++ PR_ASSERT(pt_pthread_equal(cvar->lock->owner, pthread_self()));
+
+ if (_PT_THREAD_INTERRUPTED(thred)) {
+ goto aborted;
+@@ -582,7 +589,7 @@ PR_IMPLEMENT(PRIntn) PR_GetMonitorEntryC
+
+ rv = pthread_mutex_lock(&mon->lock);
+ PR_ASSERT(0 == rv);
+- if (pthread_equal(mon->owner, self)) {
++ if (pt_pthread_equal(mon->owner, self)) {
+ count = mon->entryCount;
+ }
+ rv = pthread_mutex_unlock(&mon->lock);
+@@ -598,7 +605,7 @@ PR_IMPLEMENT(void) PR_AssertCurrentThrea
+ rv = pthread_mutex_lock(&mon->lock);
+ PR_ASSERT(0 == rv);
+ PR_ASSERT(mon->entryCount != 0 &&
+- pthread_equal(mon->owner, pthread_self()));
++ pt_pthread_equal(mon->owner, pthread_self()));
+ rv = pthread_mutex_unlock(&mon->lock);
+ PR_ASSERT(0 == rv);
+ #endif
+@@ -614,7 +621,7 @@ PR_IMPLEMENT(void) PR_EnterMonitor(PRMon
+ PR_ASSERT(0 == rv);
+ if (mon->entryCount != 0)
+ {
+- if (pthread_equal(mon->owner, self)) {
++ if (pt_pthread_equal(mon->owner, self)) {
+ goto done;
+ }
+ while (mon->entryCount != 0)
+@@ -646,8 +653,8 @@ PR_IMPLEMENT(PRStatus) PR_ExitMonitor(PR
+ PR_ASSERT(0 == rv);
+ /* the entries should be > 0 and we'd better be the owner */
+ PR_ASSERT(mon->entryCount > 0);
+- PR_ASSERT(pthread_equal(mon->owner, self));
+- if (mon->entryCount == 0 || !pthread_equal(mon->owner, self))
++ PR_ASSERT(pt_pthread_equal(mon->owner, self));
++ if (mon->entryCount == 0 || !pt_pthread_equal(mon->owner, self))
+ {
+ rv = pthread_mutex_unlock(&mon->lock);
+ PR_ASSERT(0 == rv);
+@@ -695,7 +702,7 @@ PR_IMPLEMENT(PRStatus) PR_Wait(PRMonitor
+ /* the entries better be positive */
+ PR_ASSERT(mon->entryCount > 0);
+ /* and it better be owned by us */
+- PR_ASSERT(pthread_equal(mon->owner, pthread_self()));
++ PR_ASSERT(pt_pthread_equal(mon->owner, pthread_self()));
+
+ /* tuck these away 'till later */
+ saved_entries = mon->entryCount;
diff --git a/www/firefox102/patches/patch-security_nss_lib_freebl_mpi_mpi.c b/www/firefox102/patches/patch-security_nss_lib_freebl_mpi_mpi.c
new file mode 100644
index 00000000000..e15633913ad
--- /dev/null
+++ b/www/firefox102/patches/patch-security_nss_lib_freebl_mpi_mpi.c
@@ -0,0 +1,35 @@
+$NetBSD: patch-security_nss_lib_freebl_mpi_mpi.c,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Fix undefined behavior when calling <ctype.h> functions with illegal values.
+
+security/nss/lib/freebl/mpi/mpi.c:4565:15: error: array subscript is of type 'char' [-Werror,-Wchar-subscripts]
+ xch = toupper(ch);
+
+security/nss/lib/freebl/mpi/mpi.c:4611:14: error: array subscript is of type 'char' [-Werror,-Wchar-subscripts]
+ ch = tolower(ch);
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1642081
+
+--- security/nss/lib/freebl/mpi/mpi.c.orig 2020-05-07 18:35:01.000000000 +0000
++++ security/nss/lib/freebl/mpi/mpi.c
+@@ -4560,9 +4560,9 @@ s_mp_tovalue(char ch, int r)
+ int val, xch;
+
+ if (r > 36)
+- xch = ch;
++ xch = (unsigned char) ch;
+ else
+- xch = toupper(ch);
++ xch = toupper((unsigned char) ch);
+
+ if (isdigit(xch))
+ val = xch - '0';
+@@ -4608,7 +4608,7 @@ s_mp_todigit(mp_digit val, int r, int lo
+ ch = s_dmap_1[val];
+
+ if (r <= 36 && low)
+- ch = tolower(ch);
++ ch = tolower((unsigned char) ch);
+
+ return ch;
+
diff --git a/www/firefox102/patches/patch-third__party_js_cfworker_build.sh b/www/firefox102/patches/patch-third__party_js_cfworker_build.sh
new file mode 100644
index 00000000000..a6292fc5a97
--- /dev/null
+++ b/www/firefox102/patches/patch-third__party_js_cfworker_build.sh
@@ -0,0 +1,20 @@
+$NetBSD: patch-third__party_js_cfworker_build.sh,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+shell portability
+
+--- third_party/js/cfworker/build.sh.orig 2022-04-28 22:03:47.000000000 +0000
++++ third_party/js/cfworker/build.sh
+@@ -4,9 +4,10 @@ set -euo pipefail
+ # Path to mach relative to /third_party/js/cfworker
+ MACH=$(realpath "../../../mach")
+
+-if [[ $(uname -a) == *MSYS* ]]; then
+- MACH="python ${MACH}"
+-fi
++# uname -a is not a good idea here. Someone could have MSYS in the hostname.
++#if uname -a | grep MSYS > /dev/null; then
++# MACH="python ${MACH}"
++#fi
+
+ NODE="${MACH} node"
+ NPM="${MACH} npm"
diff --git a/www/firefox102/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc b/www/firefox102/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc
new file mode 100644
index 00000000000..9c81f9e43ef
--- /dev/null
+++ b/www/firefox102/patches/patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc
@@ -0,0 +1,63 @@
+$NetBSD: patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Fix buiuld under NetBSD.
+ NetBSD's sys/videoio.h does not have v4l2_capability.device_caps
+ and video capture does not work for me anyway.
+
+--- third_party/libwebrtc/modules/video_capture/linux/device_info_linux.cc.orig 2021-05-20 21:30:20.000000000 +0000
++++ third_party/libwebrtc/modules/video_capture/linux/device_info_linux.cc
+@@ -207,10 +207,12 @@ uint32_t DeviceInfoLinux::NumberOfDevice
+ sprintf(device, "/dev/video%d", n);
+ if ((fd = open(device, O_RDONLY)) != -1) {
+ // query device capabilities and make sure this is a video capture device
++#if !defined(__NetBSD__)
+ if (ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0 || !IsVideoCaptureDevice(&cap)) {
+ close(fd);
+ continue;
+ }
++#endif
+
+ close(fd);
+ count++;
+@@ -241,10 +243,12 @@ int32_t DeviceInfoLinux::GetDeviceName(u
+ sprintf(device, "/dev/video%d", device_index);
+ if ((fd = open(device, O_RDONLY)) != -1) {
+ // query device capabilities and make sure this is a video capture device
++#if !defined(__NetBSD__)
+ if (ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0 || !IsVideoCaptureDevice(&cap)) {
+ close(fd);
+ continue;
+ }
++#endif
+ if (count == deviceNumber) {
+ // Found the device
+ found = true;
+@@ -328,10 +332,12 @@ int32_t DeviceInfoLinux::CreateCapabilit
+ struct v4l2_capability cap;
+ if (ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0) {
+ // skip devices without video capture capability
++#if !defined(__NetBSD__)
+ if (!IsVideoCaptureDevice(&cap)) {
+ close(fd);
+ continue;
+ }
++#endif
+
+ if (cap.bus_info[0] != 0) {
+ if (strncmp((const char*)cap.bus_info, (const char*)deviceUniqueIdUTF8,
+@@ -384,6 +390,7 @@ bool DeviceInfoLinux::IsDeviceNameMatche
+ return false;
+ }
+
++#ifndef __NetBSD__
+ bool DeviceInfoLinux::IsVideoCaptureDevice(struct v4l2_capability* cap)
+ {
+ if (cap->capabilities & V4L2_CAP_DEVICE_CAPS) {
+@@ -392,6 +399,7 @@ bool DeviceInfoLinux::IsVideoCaptureDevi
+ return cap->capabilities & V4L2_CAP_VIDEO_CAPTURE;
+ }
+ }
++#endif
+
+ int32_t DeviceInfoLinux::FillCapabilities(int fd) {
+ // set image format
diff --git a/www/firefox102/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc b/www/firefox102/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc
new file mode 100644
index 00000000000..a045e813e28
--- /dev/null
+++ b/www/firefox102/patches/patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc
@@ -0,0 +1,25 @@
+$NetBSD: patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Fix build under NetBSD at least.
+
+--- third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc.orig 2022-01-13 19:26:15.000000000 +0000
++++ third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc
+@@ -8,7 +8,9 @@
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
++#if !defined(__NetBSD__)
+ #include <features.h>
++#endif
+ #include <stdlib.h>
+ #include <string.h>
+
+@@ -30,7 +32,7 @@
+ #include "rtc_base/system/arch.h"
+ #include "system_wrappers/include/cpu_features_wrapper.h"
+
+-#if defined(WEBRTC_ARCH_ARM_FAMILY)
++#if defined(WEBRTC_ARCH_ARM_FAMILY) && defined(__linux__)
+ #include <asm/hwcap.h>
+
+ namespace webrtc {
diff --git a/www/firefox102/patches/patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c b/www/firefox102/patches/patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c
new file mode 100644
index 00000000000..8fc9b1d6633
--- /dev/null
+++ b/www/firefox102/patches/patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c
@@ -0,0 +1,27 @@
+$NetBSD: patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Work with PaX MPROTECT on NetBSD by stating that we will later make this memory
+block executable.
+
+--- third_party/wasm2c/wasm2c/wasm-rt-os-unix.c.orig 2022-07-05 12:21:22.000000000 +0000
++++ third_party/wasm2c/wasm2c/wasm-rt-os-unix.c
+@@ -48,6 +48,12 @@ void* os_mmap(void* hint, size_t size, i
+ /* At most 16 G is allowed */
+ return NULL;
+
++#ifdef PROT_MPROTECT
++ map_prot |= PROT_MPROTECT(PROT_READ);
++ map_prot |= PROT_MPROTECT(PROT_WRITE);
++ map_prot |= PROT_MPROTECT(PROT_EXEC);
++#endif
++
+ if (prot & MMAP_PROT_READ)
+ map_prot |= PROT_READ;
+
+@@ -279,4 +285,4 @@ void os_print_last_error(const char* msg
+ #else
+ // https://stackoverflow.com/questions/26541150/warning-iso-c-forbids-an-empty-translation-unit
+ typedef int make_iso_compilers_happy;
+-#endif
+\ No newline at end of file
++#endif
diff --git a/www/firefox102/patches/patch-toolkit_components_terminator_nsTerminator.cpp b/www/firefox102/patches/patch-toolkit_components_terminator_nsTerminator.cpp
new file mode 100644
index 00000000000..d169f36f02d
--- /dev/null
+++ b/www/firefox102/patches/patch-toolkit_components_terminator_nsTerminator.cpp
@@ -0,0 +1,27 @@
+$NetBSD: patch-toolkit_components_terminator_nsTerminator.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Fix segfault on exit under NetBSD
+
+--- toolkit/components/terminator/nsTerminator.cpp.orig 2022-06-16 21:35:58.000000000 +0000
++++ toolkit/components/terminator/nsTerminator.cpp
+@@ -34,7 +34,7 @@
+ #if defined(XP_WIN)
+ # include <windows.h>
+ #else
+-# include <unistd.h>
++# include <time.h>
+ #endif
+
+ #include "mozilla/AppShutdown.h"
+@@ -184,7 +184,10 @@ void RunWatchdog(void* arg) {
+ #if defined(XP_WIN)
+ Sleep(HEARTBEAT_INTERVAL_MS /* ms */);
+ #else
+- usleep(HEARTBEAT_INTERVAL_MS * 1000 /* usec */);
++ struct timespec tickd;
++ tickd.tv_sec = HEARTBEAT_INTERVAL_MS;
++ tickd.tv_nsec = 0;
++ nanosleep(&tickd, NULL);
+ #endif
+
+ if (gHeartbeat++ < timeToLive) {
diff --git a/www/firefox102/patches/patch-toolkit_modules_subprocess_subprocess__shared__unix.js b/www/firefox102/patches/patch-toolkit_modules_subprocess_subprocess__shared__unix.js
new file mode 100644
index 00000000000..345cce8209a
--- /dev/null
+++ b/www/firefox102/patches/patch-toolkit_modules_subprocess_subprocess__shared__unix.js
@@ -0,0 +1,26 @@
+$NetBSD: patch-toolkit_modules_subprocess_subprocess__shared__unix.js,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Fix broken native messaging on NetBSD and possibly other BSDs too:
+https://bugzilla.mozilla.org/show_bug.cgi?id=1543602
+
+Please remove this patch when the upstream issue is resolved.
+
+--- toolkit/modules/subprocess/subprocess_shared_unix.js.orig 2022-05-20 10:44:23.277253777 +0000
++++ toolkit/modules/subprocess/subprocess_shared_unix.js
+@@ -13,7 +13,15 @@
+
+ var LIBC = OS.Constants.libc;
+
+-const LIBC_CHOICES = ["libc.so", "libSystem.B.dylib", "a.out"];
++/* libc.so isn't meant to be dlopen'ed. On Linux it's usually an ld
++ * script so one cannot dlopen it. On NetBSD (and possibly other
++ * BSDs too) dlopen'ing libc.so will succeed, but some global symbols,
++ * especially environ(7), are pointing to unused memory regions
++ * because they are meant to be overridden by the main executable.
++ * So the most portable way to access libc symbols is to do it through
++ * the NULL handle, i.e. the one which NSPR calls "a.out".
++ */
++const LIBC_CHOICES = ["a.out"];
+
+ const unix = {
+ pid_t: ctypes.int32_t,
diff --git a/www/firefox102/patches/patch-toolkit_moz.configure b/www/firefox102/patches/patch-toolkit_moz.configure
new file mode 100644
index 00000000000..b8420b28dc8
--- /dev/null
+++ b/www/firefox102/patches/patch-toolkit_moz.configure
@@ -0,0 +1,57 @@
+$NetBSD: patch-toolkit_moz.configure,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Add Sun audio support and enable for NetBSD and SunOS by default.
+* Enable ALSA for NetBSD too.
+
+--- toolkit/moz.configure.orig 2022-04-28 23:01:47.000000000 +0000
++++ toolkit/moz.configure
+@@ -198,6 +198,10 @@ def audio_backends_default(target):
+ return ("sndio",)
+ elif target.os == "OSX":
+ return ("audiounit",)
++ elif target.os == "NetBSD":
++ return ("sunaudio",)
++ elif target.os == "SunOS":
++ return ("sunaudio",)
+ elif target.os == "WINNT":
+ return ("wasapi",)
+ else:
+@@ -216,6 +220,7 @@ option(
+ "oss",
+ "pulseaudio",
+ "sndio",
++ "sunaudio",
+ "wasapi",
+ ),
+ default=audio_backends_default,
+@@ -236,6 +241,7 @@ def imply_alsa(values, target):
+ any("alsa" in value for value in values)
+ and target.kernel != "Linux"
+ and target.os != "FreeBSD"
++ and target.os != "NetBSD"
+ ):
+ die("Cannot enable ALSA on %s", target.os)
+ return any("alsa" in value for value in values) or None
+@@ -290,6 +296,13 @@ def imply_sndio(values, target):
+ die("Cannot enable sndio on %s", target.os)
+ return any("sndio" in value for value in values) or None
+
++@depends("--enable-audio-backends", target)
++def imply_sunaudio(values, target):
++ if any("sunaudio" in value for value in values) and (
++ target.os != "NetBSD" and target.os != "SunOS"
++ ):
++ die("Cannot enable sunaudio on %s", target.os)
++ return any("sunaudio" in value for value in values) or None
+
+ @depends("--enable-audio-backends", target)
+ def imply_wasapi(values, target):
+@@ -314,6 +327,8 @@ imply_option("--enable-pulseaudio", impl
+
+ imply_option("--enable-sndio", imply_sndio, reason="--enable-audio-backends")
+
++set_config("MOZ_SUNAUDIO", imply_sunaudio, when="--enable-audio-backends")
++
+ set_config("MOZ_WASAPI", imply_wasapi, when="--enable-audio-backends")
+
+ # ALSA cubeb backend
diff --git a/www/firefox102/patches/patch-toolkit_mozapps_installer_packager.mk b/www/firefox102/patches/patch-toolkit_mozapps_installer_packager.mk
new file mode 100644
index 00000000000..b31e1f177be
--- /dev/null
+++ b/www/firefox102/patches/patch-toolkit_mozapps_installer_packager.mk
@@ -0,0 +1,15 @@
+$NetBSD: patch-toolkit_mozapps_installer_packager.mk,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Symbolic link to lib/firefox/firefox causes 'Couldn't load XPCOM.' error.
+
+--- toolkit/mozapps/installer/packager.mk.orig 2020-01-29 07:05:13.000000000 +0000
++++ toolkit/mozapps/installer/packager.mk
+@@ -145,7 +145,7 @@ endif
+ (cd $(DESTDIR)$(installdir) && tar -xf -)
+ $(NSINSTALL) -D $(DESTDIR)$(bindir)
+ $(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME)
+- ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)
++ #ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)
+
+ upload:
+ $(PYTHON3) -u $(MOZILLA_DIR)/build/upload.py --base-path $(DIST) $(UPLOAD_FILES)
diff --git a/www/firefox102/patches/patch-widget_gtk_DMABufSurface.cpp b/www/firefox102/patches/patch-widget_gtk_DMABufSurface.cpp
new file mode 100644
index 00000000000..9441efb54a4
--- /dev/null
+++ b/www/firefox102/patches/patch-widget_gtk_DMABufSurface.cpp
@@ -0,0 +1,32 @@
+$NetBSD: patch-widget_gtk_DMABufSurface.cpp,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+No eventfd on netbsd, fix build
+
+--- widget/gtk/DMABufSurface.cpp.orig 2021-04-08 21:20:12.000000000 +0000
++++ widget/gtk/DMABufSurface.cpp
+@@ -18,7 +18,9 @@
+ #include <sys/time.h>
+ #include <dlfcn.h>
+ #include <sys/mman.h>
++#ifndef __NetBSD__
+ #include <sys/eventfd.h>
++#endif
+ #include <poll.h>
+ #include <sys/ioctl.h>
+
+@@ -97,6 +99,7 @@ void DMABufSurface::GlobalRefAdd() {
+ }
+
+ void DMABufSurface::GlobalRefCountCreate() {
++#ifndef __NetBSD__
+ MOZ_ASSERT(!mGlobalRefCountFd);
+ mGlobalRefCountFd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK | EFD_SEMAPHORE);
+ if (mGlobalRefCountFd < 0) {
+@@ -106,6 +109,7 @@ void DMABufSurface::GlobalRefCountCreate
+ mGlobalRefCountFd = 0;
+ return;
+ }
++#endif
+ }
+
+ void DMABufSurface::GlobalRefCountImport(int aFd) {
diff --git a/www/firefox102/patches/patch-xpcom_base_nscore.h b/www/firefox102/patches/patch-xpcom_base_nscore.h
new file mode 100644
index 00000000000..c67e7d838a6
--- /dev/null
+++ b/www/firefox102/patches/patch-xpcom_base_nscore.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-xpcom_base_nscore.h,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+* Support llvm/clang
+
+--- xpcom/base/nscore.h.orig 2019-03-07 16:53:44.000000000 +0000
++++ xpcom/base/nscore.h
+@@ -76,7 +76,7 @@
+ * NS_HIDDEN_(int) NS_FASTCALL func2(char *foo);
+ */
+
+-#if defined(__i386__) && defined(__GNUC__)
++#if defined(__i386__) && defined(__GNUC__) && !(defined(__clang__) && __clang_major__ == 3 && __clang_minor__ == 4 && __clang_patchlevel__ == 0)
+ # define NS_FASTCALL __attribute__((regparm(3), stdcall))
+ # define NS_CONSTRUCTOR_FASTCALL __attribute__((regparm(3), stdcall))
+ #elif defined(XP_WIN) && !defined(_WIN64)
diff --git a/www/firefox102/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build b/www/firefox102/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build
new file mode 100644
index 00000000000..f088071398e
--- /dev/null
+++ b/www/firefox102/patches/patch-xpcom_reflect_xptcall_md_unix_moz.build
@@ -0,0 +1,15 @@
+$NetBSD: patch-xpcom_reflect_xptcall_md_unix_moz.build,v 1.1 2022/07/21 23:56:39 nia Exp $
+
+Make NetBSD/sparc64 use the same xptcall bindings as all other sparc64 ports
+
+--- xpcom/reflect/xptcall/md/unix/moz.build.orig 2020-12-03 23:14:25.000000000 +0000
++++ xpcom/reflect/xptcall/md/unix/moz.build
+@@ -225,7 +225,7 @@ if CONFIG["OS_ARCH"] == "OpenBSD" and CO
+ ]
+
+ if (
+- CONFIG["OS_ARCH"] in ("OpenBSD", "FreeBSD", "Linux", "SunOS")
++ CONFIG["OS_ARCH"] in ("OpenBSD", "FreeBSD", "NetBSD", "Linux", "SunOS")
+ and CONFIG["CPU_ARCH"] == "sparc64"
+ ):
+ SOURCES += [