diff options
Diffstat (limited to 'www/firefox/files/patch-libwebrtc-generated')
-rw-r--r-- | www/firefox/files/patch-libwebrtc-generated | 19756 |
1 files changed, 19756 insertions, 0 deletions
diff --git a/www/firefox/files/patch-libwebrtc-generated b/www/firefox/files/patch-libwebrtc-generated new file mode 100644 index 000000000000..b51a927bddb0 --- /dev/null +++ b/www/firefox/files/patch-libwebrtc-generated @@ -0,0 +1,19756 @@ +diff --git third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build +index 3dffbc4abb..aac5d092ef 100644 +--- third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build ++++ third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/array_view_gn/moz.build third_party/libwebrtc/api/array_view_gn/moz.build +index aca9f59966..1ea31b6a5e 100644 +--- third_party/libwebrtc/api/array_view_gn/moz.build ++++ third_party/libwebrtc/api/array_view_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/audio/aec3_config_gn/moz.build third_party/libwebrtc/api/audio/aec3_config_gn/moz.build +index 861233bfeb..c2f87155bb 100644 +--- third_party/libwebrtc/api/audio/aec3_config_gn/moz.build ++++ third_party/libwebrtc/api/audio/aec3_config_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build +index 2421e514b6..6a6fc577a5 100644 +--- third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build ++++ third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build +index 48abf7cd40..26317d4cf5 100644 +--- third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build ++++ third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -192,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build +index 41222e1e06..5a75494c05 100644 +--- third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build ++++ third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/audio/echo_control_gn/moz.build third_party/libwebrtc/api/audio/echo_control_gn/moz.build +index 132b296b25..df28661dfb 100644 +--- third_party/libwebrtc/api/audio/echo_control_gn/moz.build ++++ third_party/libwebrtc/api/audio/echo_control_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build +index 8499f556e3..92d90abb2d 100644 +--- third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build ++++ third_party/libwebrtc/api/audio_codecs/L16/audio_decoder_L16_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build +index a5f3673082..58e96dbb98 100644 +--- third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build ++++ third_party/libwebrtc/api/audio_codecs/L16/audio_encoder_L16_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build +index f7bf17624e..1f8a4a7497 100644 +--- third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build ++++ third_party/libwebrtc/api/audio_codecs/audio_codecs_api_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -156,6 +167,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -172,6 +187,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -194,6 +213,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build +index b52257b6b6..402d787b35 100644 +--- third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build ++++ third_party/libwebrtc/api/audio_codecs/builtin_audio_decoder_factory_gn/moz.build +@@ -71,6 +71,19 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0" ++ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -173,6 +186,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -189,6 +206,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -224,6 +245,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": + DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0" + DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1" + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build +index d84e1656f6..afddfe8bac 100644 +--- third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build ++++ third_party/libwebrtc/api/audio_codecs/builtin_audio_encoder_factory_gn/moz.build +@@ -71,6 +71,19 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0" ++ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -173,6 +186,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -189,6 +206,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -224,6 +245,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": + DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0" + DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1" + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build +index e39db35128..ec6254de74 100644 +--- third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build ++++ third_party/libwebrtc/api/audio_codecs/g711/audio_decoder_g711_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 6a431c8970..413d83e455 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 57f9cbdb1a..f1b7612533 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 6b2c8222cf..17d26b56bb 100644 +--- 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 +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index bc3dac1e0e..e6d120ffff 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index ca0df168ef..db603b008d 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 4b3a5922de..9410478923 100644 +--- 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 +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 0fd8a2cd93..3595936b6e 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index ea25619a8f..a5418dc87c 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -146,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -162,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -184,6 +203,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 63a9de405e..0e8086206d 100644 +--- 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 +@@ -65,6 +65,19 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0" ++ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 80d57e950c..54f305e11b 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -146,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -162,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -184,6 +203,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index ad8509420e..185c938438 100644 +--- 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 +@@ -65,6 +65,19 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FIX"] = "0" ++ DEFINES["WEBRTC_USE_BUILTIN_ISAC_FLOAT"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 1aac13195a..a7d5573ec5 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -192,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 3c14d0afe9..e3e40b8b5b 100644 +--- 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 +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 18314dfa72..c8c06081f4 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 58f0062b01..7b9e11054b 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -192,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index a8f5c61509..5d088626da 100644 +--- 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 +@@ -72,6 +72,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -158,6 +169,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -174,6 +189,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -196,6 +215,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 2afcfb0571..e7d4692406 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/audio_options_api_gn/moz.build third_party/libwebrtc/api/audio_options_api_gn/moz.build +index a9ca2f37f6..10636508a1 100644 +--- third_party/libwebrtc/api/audio_options_api_gn/moz.build ++++ third_party/libwebrtc/api/audio_options_api_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/bitrate_allocation_gn/moz.build third_party/libwebrtc/api/bitrate_allocation_gn/moz.build +index 2cc056678b..d7121e8987 100644 +--- third_party/libwebrtc/api/bitrate_allocation_gn/moz.build ++++ third_party/libwebrtc/api/bitrate_allocation_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/call_api_gn/moz.build third_party/libwebrtc/api/call_api_gn/moz.build +index c6b01250ea..6fd6f7a615 100644 +--- third_party/libwebrtc/api/call_api_gn/moz.build ++++ third_party/libwebrtc/api/call_api_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/callfactory_api_gn/moz.build third_party/libwebrtc/api/callfactory_api_gn/moz.build +index bb55b07e9f..751c37e99d 100644 +--- third_party/libwebrtc/api/callfactory_api_gn/moz.build ++++ third_party/libwebrtc/api/callfactory_api_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build +index fe4a347c04..b7e372112d 100644 +--- third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build ++++ third_party/libwebrtc/api/crypto/frame_decryptor_interface_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build +index aaaaeac661..64ae65e0dc 100644 +--- third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build ++++ third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/crypto/options_gn/moz.build third_party/libwebrtc/api/crypto/options_gn/moz.build +index 1849070995..f31d4e2240 100644 +--- third_party/libwebrtc/api/crypto/options_gn/moz.build ++++ third_party/libwebrtc/api/crypto/options_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/fec_controller_api_gn/moz.build third_party/libwebrtc/api/fec_controller_api_gn/moz.build +index 4b623b0034..d882c1ebe0 100644 +--- third_party/libwebrtc/api/fec_controller_api_gn/moz.build ++++ third_party/libwebrtc/api/fec_controller_api_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build +index 39a5a04f5a..d202431e5a 100644 +--- third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build ++++ third_party/libwebrtc/api/frame_transformer_interface_gn/moz.build +@@ -64,6 +64,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/function_view_gn/moz.build third_party/libwebrtc/api/function_view_gn/moz.build +index 67fc4e25a2..ff4bc2082b 100644 +--- third_party/libwebrtc/api/function_view_gn/moz.build ++++ third_party/libwebrtc/api/function_view_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build +index e2eb369f3e..22954f6943 100644 +--- third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build ++++ third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/media_stream_interface_gn/moz.build third_party/libwebrtc/api/media_stream_interface_gn/moz.build +index 90856a4e62..b709d70d24 100644 +--- third_party/libwebrtc/api/media_stream_interface_gn/moz.build ++++ third_party/libwebrtc/api/media_stream_interface_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build +index 0b2386cefd..73d24403a1 100644 +--- third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build ++++ third_party/libwebrtc/api/neteq/default_neteq_controller_factory_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build +index b1fa978fd0..18e69e0265 100644 +--- third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build ++++ third_party/libwebrtc/api/neteq/neteq_api_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build +index a250cf1b72..1bcbb5ffa8 100644 +--- third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build ++++ third_party/libwebrtc/api/neteq/neteq_controller_api_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -152,6 +163,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build +index 179458a984..d77bb4cb7a 100644 +--- third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build ++++ third_party/libwebrtc/api/neteq/tick_timer_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build +index 1a5b0bf109..fa02a56f8e 100644 +--- third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build ++++ third_party/libwebrtc/api/network_state_predictor_api_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/numerics/numerics_gn/moz.build third_party/libwebrtc/api/numerics/numerics_gn/moz.build +index fa11b290a9..6152ef8e59 100644 +--- third_party/libwebrtc/api/numerics/numerics_gn/moz.build ++++ third_party/libwebrtc/api/numerics/numerics_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/priority_gn/moz.build third_party/libwebrtc/api/priority_gn/moz.build +index dbe91f7048..ac0e0c377e 100644 +--- third_party/libwebrtc/api/priority_gn/moz.build ++++ third_party/libwebrtc/api/priority_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/refcountedbase_gn/moz.build third_party/libwebrtc/api/refcountedbase_gn/moz.build +index 1511ac2e44..2e08c63cda 100644 +--- third_party/libwebrtc/api/refcountedbase_gn/moz.build ++++ third_party/libwebrtc/api/refcountedbase_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/rtc_error_gn/moz.build third_party/libwebrtc/api/rtc_error_gn/moz.build +index 01b92cee7a..41bbb8718c 100644 +--- third_party/libwebrtc/api/rtc_error_gn/moz.build ++++ third_party/libwebrtc/api/rtc_error_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 62dec010ac..db7abcf561 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -192,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/rtp_headers_gn/moz.build third_party/libwebrtc/api/rtp_headers_gn/moz.build +index 2a67aeb66e..b65a55e453 100644 +--- third_party/libwebrtc/api/rtp_headers_gn/moz.build ++++ third_party/libwebrtc/api/rtp_headers_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/rtp_packet_info_gn/moz.build third_party/libwebrtc/api/rtp_packet_info_gn/moz.build +index 8918746b08..f75e6c9c00 100644 +--- third_party/libwebrtc/api/rtp_packet_info_gn/moz.build ++++ third_party/libwebrtc/api/rtp_packet_info_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/rtp_parameters_gn/moz.build third_party/libwebrtc/api/rtp_parameters_gn/moz.build +index 23d200f8b0..8c778c8cb2 100644 +--- third_party/libwebrtc/api/rtp_parameters_gn/moz.build ++++ third_party/libwebrtc/api/rtp_parameters_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -150,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -166,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -188,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build +index 6b31767ec8..49ce8708a6 100644 +--- third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build ++++ third_party/libwebrtc/api/rtp_transceiver_direction_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/scoped_refptr_gn/moz.build third_party/libwebrtc/api/scoped_refptr_gn/moz.build +index 97b07c9010..0c9bc9ef6a 100644 +--- third_party/libwebrtc/api/scoped_refptr_gn/moz.build ++++ third_party/libwebrtc/api/scoped_refptr_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/simulated_network_api_gn/moz.build third_party/libwebrtc/api/simulated_network_api_gn/moz.build +index 17cbb28903..e75d9233e6 100644 +--- third_party/libwebrtc/api/simulated_network_api_gn/moz.build ++++ third_party/libwebrtc/api/simulated_network_api_gn/moz.build +@@ -64,6 +64,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build +index 691d7edc2d..8614057ddc 100644 +--- third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build ++++ third_party/libwebrtc/api/task_queue/task_queue_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build +index 3513f9c224..9e1a49e8e4 100644 +--- third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build ++++ third_party/libwebrtc/api/transport/bitrate_settings_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build +index 04aaa9aa2b..ed67e61812 100644 +--- third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build ++++ third_party/libwebrtc/api/transport/field_trial_based_config_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/transport/goog_cc_gn/moz.build third_party/libwebrtc/api/transport/goog_cc_gn/moz.build +index 409c7dde4b..a05eff6f59 100644 +--- third_party/libwebrtc/api/transport/goog_cc_gn/moz.build ++++ third_party/libwebrtc/api/transport/goog_cc_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/transport/network_control_gn/moz.build third_party/libwebrtc/api/transport/network_control_gn/moz.build +index 09e38326bd..80fa181ab9 100644 +--- third_party/libwebrtc/api/transport/network_control_gn/moz.build ++++ third_party/libwebrtc/api/transport/network_control_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build +index 735d60d2d2..e21c0aa575 100644 +--- third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build ++++ third_party/libwebrtc/api/transport/rtp/dependency_descriptor_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build +index efeffbc658..29eb538b64 100644 +--- third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build ++++ third_party/libwebrtc/api/transport/rtp/rtp_source_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build +index f3132f72ab..2fb0df1299 100644 +--- third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build ++++ third_party/libwebrtc/api/transport/webrtc_key_value_config_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/transport_api_gn/moz.build third_party/libwebrtc/api/transport_api_gn/moz.build +index 41b32d6762..59e6e8ce4a 100644 +--- third_party/libwebrtc/api/transport_api_gn/moz.build ++++ third_party/libwebrtc/api/transport_api_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/units/data_rate_gn/moz.build third_party/libwebrtc/api/units/data_rate_gn/moz.build +index 6708de4bb0..3b2fc8ba9c 100644 +--- third_party/libwebrtc/api/units/data_rate_gn/moz.build ++++ third_party/libwebrtc/api/units/data_rate_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/units/data_size_gn/moz.build third_party/libwebrtc/api/units/data_size_gn/moz.build +index 14b9742573..54ecb92e08 100644 +--- third_party/libwebrtc/api/units/data_size_gn/moz.build ++++ third_party/libwebrtc/api/units/data_size_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/units/frequency_gn/moz.build third_party/libwebrtc/api/units/frequency_gn/moz.build +index 79fcff48ef..6790d9ceaa 100644 +--- third_party/libwebrtc/api/units/frequency_gn/moz.build ++++ third_party/libwebrtc/api/units/frequency_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/units/time_delta_gn/moz.build third_party/libwebrtc/api/units/time_delta_gn/moz.build +index 9cd9ff24f3..c32d6624b5 100644 +--- third_party/libwebrtc/api/units/time_delta_gn/moz.build ++++ third_party/libwebrtc/api/units/time_delta_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/units/timestamp_gn/moz.build third_party/libwebrtc/api/units/timestamp_gn/moz.build +index 23aa0ba2c5..72d6220c6b 100644 +--- third_party/libwebrtc/api/units/timestamp_gn/moz.build ++++ third_party/libwebrtc/api/units/timestamp_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 0ecc793d69..ea20a3d5b5 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/encoded_frame_gn/moz.build third_party/libwebrtc/api/video/encoded_frame_gn/moz.build +index 456c8a541d..3b556fdd3c 100644 +--- third_party/libwebrtc/api/video/encoded_frame_gn/moz.build ++++ third_party/libwebrtc/api/video/encoded_frame_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/encoded_image_gn/moz.build third_party/libwebrtc/api/video/encoded_image_gn/moz.build +index d109bfa1a0..225b559521 100644 +--- third_party/libwebrtc/api/video/encoded_image_gn/moz.build ++++ third_party/libwebrtc/api/video/encoded_image_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build +index df2bcac4b7..ad955dc4a0 100644 +--- third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build ++++ third_party/libwebrtc/api/video/recordable_encoded_frame_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/video/video_adaptation_gn/moz.build third_party/libwebrtc/api/video/video_adaptation_gn/moz.build +index 539cc93e02..3f6fd22ca3 100644 +--- third_party/libwebrtc/api/video/video_adaptation_gn/moz.build ++++ third_party/libwebrtc/api/video/video_adaptation_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build +index 427be85229..39df8789f7 100644 +--- third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build ++++ third_party/libwebrtc/api/video/video_bitrate_allocation_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build +index 07db1b3b38..27fad85dc4 100644 +--- third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build ++++ third_party/libwebrtc/api/video/video_bitrate_allocator_factory_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build +index 8726c6c5a5..891f5b2ac1 100644 +--- third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build ++++ third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build +index 9f6daffa4a..39371a1714 100644 +--- third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build ++++ third_party/libwebrtc/api/video/video_codec_constants_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/video/video_frame_gn/moz.build third_party/libwebrtc/api/video/video_frame_gn/moz.build +index cec245170a..646e570081 100644 +--- third_party/libwebrtc/api/video/video_frame_gn/moz.build ++++ third_party/libwebrtc/api/video/video_frame_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -155,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -171,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -193,6 +212,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build +index fa9d71395c..927c06c940 100644 +--- third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build ++++ third_party/libwebrtc/api/video/video_frame_i010_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build +index 3d4c1bd899..2f0e6fdd07 100644 +--- third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build ++++ third_party/libwebrtc/api/video/video_frame_i420_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build +index c817dc4982..0283c8356c 100644 +--- third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build ++++ third_party/libwebrtc/api/video/video_frame_metadata_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build +index 63ee6f9099..2c64a6dc79 100644 +--- third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build ++++ third_party/libwebrtc/api/video/video_frame_nv12_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/video_frame_type_gn/moz.build third_party/libwebrtc/api/video/video_frame_type_gn/moz.build +index 57cfaf7c23..07f1dd75ba 100644 +--- third_party/libwebrtc/api/video/video_frame_type_gn/moz.build ++++ third_party/libwebrtc/api/video/video_frame_type_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build +index 54cdbd8c57..1ec0d71ab4 100644 +--- third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build ++++ third_party/libwebrtc/api/video/video_rtp_headers_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -156,6 +167,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -172,6 +187,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -194,6 +213,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build +index 57a39cfe40..1d7a2ba9b8 100644 +--- third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build ++++ third_party/libwebrtc/api/video/video_stream_encoder_create_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build +index e5e9a7c055..057b4db9ea 100644 +--- third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build ++++ third_party/libwebrtc/api/video/video_stream_encoder_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build +index 2666e25ab7..1514db3a49 100644 +--- third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build ++++ third_party/libwebrtc/api/video_codecs/bitstream_parser_api_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 1d21c1fa81..8c122cbd13 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index bd29841460..ea3e4aab9b 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 90afc61ce7..2dad21ab8e 100644 +--- 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 +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -201,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build +index acf0202689..c80bfb5b66 100644 +--- third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build ++++ third_party/libwebrtc/api/video_codecs/video_codecs_api_gn/moz.build +@@ -75,6 +75,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index e0bcb09d59..4bf73c444c 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/audio/audio_gn/moz.build third_party/libwebrtc/audio/audio_gn/moz.build +index 48c74e8063..78ccf8d0e2 100644 +--- third_party/libwebrtc/audio/audio_gn/moz.build ++++ third_party/libwebrtc/audio/audio_gn/moz.build +@@ -81,6 +81,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -175,6 +186,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -191,6 +206,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -213,6 +232,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build +index f3708d6b8e..a7fa266d64 100644 +--- third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build ++++ third_party/libwebrtc/audio/utility/audio_frame_operations_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build +index 0c08bff6a3..2a6e85ac47 100644 +--- third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build ++++ third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build +@@ -77,6 +77,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -171,6 +182,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -187,6 +202,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -209,6 +228,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/call/audio_sender_interface_gn/moz.build third_party/libwebrtc/call/audio_sender_interface_gn/moz.build +index a746c88078..cb4ace74be 100644 +--- third_party/libwebrtc/call/audio_sender_interface_gn/moz.build ++++ third_party/libwebrtc/call/audio_sender_interface_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/call/bitrate_allocator_gn/moz.build third_party/libwebrtc/call/bitrate_allocator_gn/moz.build +index 8d140ba125..5ee40a51d4 100644 +--- third_party/libwebrtc/call/bitrate_allocator_gn/moz.build ++++ third_party/libwebrtc/call/bitrate_allocator_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/call/bitrate_configurator_gn/moz.build third_party/libwebrtc/call/bitrate_configurator_gn/moz.build +index 2dba19a53a..290ee2e201 100644 +--- third_party/libwebrtc/call/bitrate_configurator_gn/moz.build ++++ third_party/libwebrtc/call/bitrate_configurator_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/call/call_gn/moz.build third_party/libwebrtc/call/call_gn/moz.build +index 8cb24f9748..7f3d3e0f33 100644 +--- third_party/libwebrtc/call/call_gn/moz.build ++++ third_party/libwebrtc/call/call_gn/moz.build +@@ -72,6 +72,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -166,6 +177,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -182,6 +197,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -204,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/call/call_interfaces_gn/moz.build third_party/libwebrtc/call/call_interfaces_gn/moz.build +index 4f07c8b731..8ef60e959c 100644 +--- third_party/libwebrtc/call/call_interfaces_gn/moz.build ++++ third_party/libwebrtc/call/call_interfaces_gn/moz.build +@@ -73,6 +73,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -167,6 +178,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -183,6 +198,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -205,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/call/fake_network_gn/moz.build third_party/libwebrtc/call/fake_network_gn/moz.build +index 54b8d2df6b..2d2ebb2e84 100644 +--- third_party/libwebrtc/call/fake_network_gn/moz.build ++++ third_party/libwebrtc/call/fake_network_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/call/rtp_interfaces_gn/moz.build third_party/libwebrtc/call/rtp_interfaces_gn/moz.build +index 040939df59..814d9c1d92 100644 +--- third_party/libwebrtc/call/rtp_interfaces_gn/moz.build ++++ third_party/libwebrtc/call/rtp_interfaces_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/call/rtp_receiver_gn/moz.build third_party/libwebrtc/call/rtp_receiver_gn/moz.build +index 5c1f19a9da..f31fa589f9 100644 +--- third_party/libwebrtc/call/rtp_receiver_gn/moz.build ++++ third_party/libwebrtc/call/rtp_receiver_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/call/rtp_sender_gn/moz.build third_party/libwebrtc/call/rtp_sender_gn/moz.build +index 1d14b03100..337dcfd1ce 100644 +--- third_party/libwebrtc/call/rtp_sender_gn/moz.build ++++ third_party/libwebrtc/call/rtp_sender_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/call/simulated_network_gn/moz.build third_party/libwebrtc/call/simulated_network_gn/moz.build +index 62ff82980c..6abb9718b7 100644 +--- third_party/libwebrtc/call/simulated_network_gn/moz.build ++++ third_party/libwebrtc/call/simulated_network_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build +index e51a1dce73..0961e95dbb 100644 +--- third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build ++++ third_party/libwebrtc/call/simulated_packet_receiver_gn/moz.build +@@ -64,6 +64,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/call/video_stream_api_gn/moz.build third_party/libwebrtc/call/video_stream_api_gn/moz.build +index 926361a8fa..bf3117cf96 100644 +--- third_party/libwebrtc/call/video_stream_api_gn/moz.build ++++ third_party/libwebrtc/call/video_stream_api_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -201,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build +index 386e90330f..e8a0c2625a 100644 +--- third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build ++++ third_party/libwebrtc/common_audio/common_audio_avx2_gn/moz.build +@@ -73,6 +73,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -146,6 +157,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -162,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -184,6 +203,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ +diff --git 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 +index 7adcbbf362..3beca43fd4 100644 +--- 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 +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -142,6 +153,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -158,6 +173,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build +index 8e471b3278..cf7c67d7f1 100644 +--- third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build ++++ third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build +@@ -110,6 +110,22 @@ if CONFIG["OS_TARGET"] == "Darwin": + "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" + ] + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ ++ UNIFIED_SOURCES += [ ++ "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", ++ "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" ++ ] ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -218,6 +234,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -234,6 +254,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -275,6 +299,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": + "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build +index 5475e35ad6..1aa0a02b27 100644 +--- third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build ++++ third_party/libwebrtc/common_audio/common_audio_cc_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/common_audio/common_audio_gn/moz.build third_party/libwebrtc/common_audio/common_audio_gn/moz.build +index e499c12bf0..6d5c275806 100644 +--- third_party/libwebrtc/common_audio/common_audio_gn/moz.build ++++ third_party/libwebrtc/common_audio/common_audio_gn/moz.build +@@ -80,6 +80,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -173,6 +184,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -189,6 +204,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -211,6 +230,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build +index 36ffd6add1..a16a1a6b1b 100644 +--- third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build ++++ third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build +@@ -71,6 +71,18 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_ARCH_ARM64"] = True ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +@@ -150,6 +162,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -162,6 +178,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build +index ba1537f7dd..c409afbddb 100644 +--- third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build ++++ third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build +@@ -70,6 +70,18 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_ARCH_ARM64"] = True ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +@@ -149,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build +index c516a1769e..a207526986 100644 +--- third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build ++++ third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build +@@ -72,6 +72,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -194,6 +213,19 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": + "-msse2" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2", ++ "-msse2" ++ ] ++ ++if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ +diff --git third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build +index e93b927f63..c3847e1200 100644 +--- third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build ++++ third_party/libwebrtc/common_audio/fir_filter_factory_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/common_audio/fir_filter_gn/moz.build third_party/libwebrtc/common_audio/fir_filter_gn/moz.build +index 1bb7ad1e4b..ea708477d7 100644 +--- third_party/libwebrtc/common_audio/fir_filter_gn/moz.build ++++ third_party/libwebrtc/common_audio/fir_filter_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build +index e285755822..394b2e43a7 100644 +--- third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build ++++ third_party/libwebrtc/common_audio/sinc_resampler_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -152,6 +163,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 49d8183bb8..de0e1795f9 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -182,6 +193,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -198,6 +213,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -241,6 +260,23 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Darwin": + "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2", ++ "-msse2" ++ ] ++ ++if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ ++ UNIFIED_SOURCES += [ ++ "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index b3213bf070..51951092da 100644 +--- 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 +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 6d03704624..d96b6f3a71 100644 +--- 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 +@@ -63,6 +63,21 @@ if CONFIG["OS_TARGET"] == "Darwin": + "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" + ] + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ ++ UNIFIED_SOURCES += [ ++ "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" ++ ] ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -157,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -173,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -211,6 +234,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": + "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/common_video/common_video_gn/moz.build third_party/libwebrtc/common_video/common_video_gn/moz.build +index 5d6a4adcb3..26138f5af1 100644 +--- third_party/libwebrtc/common_video/common_video_gn/moz.build ++++ third_party/libwebrtc/common_video/common_video_gn/moz.build +@@ -81,6 +81,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -175,6 +186,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -191,6 +206,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -213,6 +232,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/common_video/frame_counts_gn/moz.build third_party/libwebrtc/common_video/frame_counts_gn/moz.build +index c33906773b..eecfd4dd84 100644 +--- third_party/libwebrtc/common_video/frame_counts_gn/moz.build ++++ third_party/libwebrtc/common_video/frame_counts_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 04b49591a7..81d951ca17 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build +index 7cd0d06686..63a1163ec2 100644 +--- third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_event_audio_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -156,6 +167,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -172,6 +187,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -194,6 +213,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build +index 7902cecfcf..678eb54e71 100644 +--- third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_event_bwe_gn/moz.build +@@ -73,6 +73,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -167,6 +178,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -183,6 +198,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -205,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build +index 5ce1736a8a..2c2277cfda 100644 +--- third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build +index 87fa2c1dac..59b5df3381 100644 +--- third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_event_rtp_rtcp_gn/moz.build +@@ -71,6 +71,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -165,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -181,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -203,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/logging/rtc_event_video_gn/moz.build third_party/libwebrtc/logging/rtc_event_video_gn/moz.build +index 35bbf759ab..740650442b 100644 +--- third_party/libwebrtc/logging/rtc_event_video_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_event_video_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -192,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build +index 6b35e5a077..b1fe6b3bb3 100644 +--- third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build ++++ third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/media/rtc_constants_gn/moz.build third_party/libwebrtc/media/rtc_constants_gn/moz.build +index 78cddb03a1..1e857b78e7 100644 +--- third_party/libwebrtc/media/rtc_constants_gn/moz.build ++++ third_party/libwebrtc/media/rtc_constants_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build +index 4f84ca1381..cdc80664ad 100644 +--- third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build ++++ third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build +index 46b6a25fea..b02ad9dae0 100644 +--- third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build ++++ third_party/libwebrtc/media/rtc_h264_profile_id_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build +index aff43704f4..3e09a88cb7 100644 +--- third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build ++++ third_party/libwebrtc/media/rtc_internal_video_codecs_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/media/rtc_media_base_gn/moz.build third_party/libwebrtc/media/rtc_media_base_gn/moz.build +index 7b0ac45394..e1e6b7c15e 100644 +--- third_party/libwebrtc/media/rtc_media_base_gn/moz.build ++++ third_party/libwebrtc/media/rtc_media_base_gn/moz.build +@@ -73,6 +73,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -167,6 +178,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -183,6 +198,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -205,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/media/rtc_media_config_gn/moz.build third_party/libwebrtc/media/rtc_media_config_gn/moz.build +index e559dfd675..d24a1900d9 100644 +--- third_party/libwebrtc/media/rtc_media_config_gn/moz.build ++++ third_party/libwebrtc/media/rtc_media_config_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build +index 266b11ad8e..d7c74367e9 100644 +--- third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build ++++ third_party/libwebrtc/media/rtc_simulcast_encoder_adapter_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build +index 52456dd65b..ce3a4ea0f0 100644 +--- third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build ++++ third_party/libwebrtc/media/rtc_vp9_profile_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build +index 1f968a13a1..94ecdd7dfa 100644 +--- third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/audio_coding_gn/moz.build +@@ -71,6 +71,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 1c313a5b00..08d3e88c98 100644 +--- 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 +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index bd7056caf3..a8a0801d58 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build +index 6fa0115864..a0ffc9ad0f 100644 +--- third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/audio_encoder_cng_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index b537062aef..560f57dc55 100644 +--- 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 +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build +index b38993845c..4660cc9b91 100644 +--- third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build +@@ -77,6 +77,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -170,6 +181,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -186,6 +201,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -208,6 +227,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build +index df061c6618..c2bbb84fd5 100644 +--- third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/default_neteq_factory_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build +index e0f07f2351..d333d25384 100644 +--- third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/g711_c_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build +index 3716ec4cbe..850c1de44e 100644 +--- third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/g711_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -192,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build +index 8910ce7cf4..0a1a559212 100644 +--- third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build +index 71d1053761..81dae2b987 100644 +--- third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/g722_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -192,6 +211,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build +index 165ab4b8ac..1588baf881 100644 +--- third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build +@@ -135,6 +135,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -228,6 +239,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -244,6 +259,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -266,6 +285,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build +index e46ee8458f..d4a96cbb19 100644 +--- third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/ilbc_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build +index 538b0d271d..cbcab8c2f3 100644 +--- third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/isac_bwinfo_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build +index 43fb6469dd..b49f126bad 100644 +--- third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/isac_c_gn/moz.build +@@ -89,6 +89,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -168,6 +179,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -184,6 +199,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -206,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build +index b4ed48e62b..9656a8e979 100644 +--- third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/isac_common_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build +index 67f836250c..64781830bc 100644 +--- third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -147,6 +158,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -163,6 +178,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -185,6 +204,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build +index b7c99fdd71..0a445df1f7 100644 +--- third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build +@@ -66,6 +66,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -148,6 +159,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -164,6 +179,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -186,6 +205,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 16e35fafbb..a8ca6dc587 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build +index fb0747b69c..46a84e8c38 100644 +--- third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/neteq_gn/moz.build +@@ -99,6 +99,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -192,6 +203,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -208,6 +223,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -230,6 +249,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build +index 24cda76b67..99e02a289f 100644 +--- third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build +index 621edd1f38..09f6cceb97 100644 +--- third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/pcm16b_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -155,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -171,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -193,6 +212,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/red_gn/moz.build third_party/libwebrtc/modules/audio_coding/red_gn/moz.build +index ff0cdea507..770c012bff 100644 +--- third_party/libwebrtc/modules/audio_coding/red_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/red_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build +index 8a5e2d696b..8937898ffb 100644 +--- third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/webrtc_cng_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build +index 543f023f8f..3e52c8782e 100644 +--- third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/webrtc_multiopus_gn/moz.build +@@ -73,6 +73,18 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_CODEC_ISAC"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -211,6 +231,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": + + DEFINES["WEBRTC_CODEC_ISAC"] = True + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build +index e831769c57..e2d3a94841 100644 +--- third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/webrtc_opus_gn/moz.build +@@ -73,6 +73,18 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_CODEC_ISAC"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -170,6 +182,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -186,6 +202,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -218,6 +238,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": + + DEFINES["WEBRTC_CODEC_ISAC"] = True + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build +index fa94ad5248..7f242d4ccd 100644 +--- third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build ++++ third_party/libwebrtc/modules/audio_coding/webrtc_opus_wrapper_gn/moz.build +@@ -72,6 +72,18 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_CODEC_ISAC"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -210,6 +230,12 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": + + DEFINES["WEBRTC_CODEC_ISAC"] = True + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build +index 0680df2546..9eb57026b1 100644 +--- third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build ++++ third_party/libwebrtc/modules/audio_device/audio_device_api_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build +index 8e1e8c6eea..99aed058a2 100644 +--- third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build ++++ third_party/libwebrtc/modules/audio_device/audio_device_buffer_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build +index a079f00e51..b73f2f5bf0 100644 +--- third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build ++++ third_party/libwebrtc/modules/audio_device/audio_device_default_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build +index ff6ced9576..ab33cf8f57 100644 +--- third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build ++++ third_party/libwebrtc/modules/audio_device/audio_device_generic_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build +index f57f39f961..a49062054a 100644 +--- third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build ++++ third_party/libwebrtc/modules/audio_device/audio_device_gn/moz.build +@@ -64,6 +64,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -154,6 +165,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build +index c67982918f..296eea9c6d 100644 +--- third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build ++++ third_party/libwebrtc/modules/audio_device/audio_device_impl_gn/moz.build +@@ -71,6 +71,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -165,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -181,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -203,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build +index 6ef7c5724e..fc01f3952e 100644 +--- third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build ++++ third_party/libwebrtc/modules/audio_mixer/audio_frame_manipulator_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build +index cf7151974d..95d9fb125a 100644 +--- third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build ++++ third_party/libwebrtc/modules/audio_mixer/audio_mixer_impl_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -201,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index b1898d53ae..04f8b9d9e5 100644 +--- 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 +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 249c41bf52..447e48922b 100644 +--- 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 +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -152,6 +163,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build +index 81618e8ebb..dd8080b826 100644 +--- third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn/moz.build +@@ -77,6 +77,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -150,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -166,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -188,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ +diff --git third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build +index f4efbb9a68..0906a1fb69 100644 +--- third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_common_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build +index 5ccd7db91d..82d11ecf9e 100644 +--- third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_fft_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -152,6 +163,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build +index a1dbc7c8d7..6f82564ed9 100644 +--- third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/aec3/aec3_gn/moz.build +@@ -121,6 +121,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -214,6 +225,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -230,6 +245,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -252,6 +271,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build +index d55b326e7c..f3c8f121e9 100644 +--- third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build +index 33c5ef238f..feca639586 100644 +--- third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build +index a2685d2689..0fb811dd64 100644 +--- third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/aec3/render_buffer_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build +index 9e65da3503..eaa756eab9 100644 +--- third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/aec3/vector_math_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 452ea8eb6f..61d3197165 100644 +--- 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 +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 35e3329585..834afb7998 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build +index efc4513c9e..392e0f4ffa 100644 +--- third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/aec_dump_interface_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build +index 3efc2af585..afdd337a76 100644 +--- third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -170,6 +181,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -186,6 +201,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -208,6 +227,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build +index cb7f900073..455a94feb0 100644 +--- third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/agc/agc_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 2a0e9bc2c3..f14b4ffa4b 100644 +--- 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 +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build +index 68843197cf..b7fc2b9b27 100644 +--- third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/agc/gain_map_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build +index 9cdc513dff..b73ca0a1f5 100644 +--- third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/agc/legacy_agc_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build +index c4ba6d6103..8c968bec46 100644 +--- third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/agc/level_estimation_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build +index 873fc73ed2..7c30c4307e 100644 +--- third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/agc2/adaptive_digital_gn/moz.build +@@ -71,6 +71,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build +index c082e8be20..9b5c4a102a 100644 +--- third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/agc2/biquad_filter_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build +index bb2364621f..9cc868d42e 100644 +--- third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/agc2/common_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build +index c2278b5584..dceb5a5f40 100644 +--- third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/agc2/fixed_digital_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -201,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build +index 7cbfedef3a..aca6db5084 100644 +--- third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/agc2/gain_applier_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 6a681f6d5e..ca8d980f38 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index af09244a52..a57f14ba6a 100644 +--- 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 +@@ -71,6 +71,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index b6cae79851..2a219468af 100644 +--- 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 +@@ -75,6 +75,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -168,6 +179,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -184,6 +199,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -206,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index d1b3bee93f..54fd581f80 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/api_gn/moz.build third_party/libwebrtc/modules/audio_processing/api_gn/moz.build +index dfab8ef20b..35d7628efa 100644 +--- third_party/libwebrtc/modules/audio_processing/api_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/api_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build +index 833f44927f..95ff1333b5 100644 +--- third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/apm_logging_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build +index ef50066aa0..f35e2bb673 100644 +--- third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/audio_buffer_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -201,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build +index aa637aa2ca..3ece88a35d 100644 +--- third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/audio_frame_proxies_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build +index 4aface66d6..d93c4f540e 100644 +--- third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/audio_frame_view_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build +index f20b13bd0a..06d3996410 100644 +--- third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build +@@ -82,6 +82,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -175,6 +186,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -191,6 +206,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -213,6 +232,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build +index 1eb1f12ac7..1047578c1c 100644 +--- third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/audio_processing_statistics_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/config_gn/moz.build third_party/libwebrtc/modules/audio_processing/config_gn/moz.build +index efbaa9991f..01b95bf107 100644 +--- third_party/libwebrtc/modules/audio_processing/config_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/config_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build +index 698d52d09c..5790ee2471 100644 +--- third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build +index e7b4bd602d..cdba1e73d7 100644 +--- third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/ns/ns_gn/moz.build +@@ -80,6 +80,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -173,6 +184,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -189,6 +204,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -211,6 +230,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index aaaed22eeb..174e3ec82d 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build +index a65c04f233..f81dd6ac8b 100644 +--- third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/rms_level_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index e4fedef6fe..00ff1a6f9c 100644 +--- 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 +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index e161f74eb6..ee40243cb5 100644 +--- 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 +@@ -71,6 +71,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index b2589fa2cb..0b6f561dfa 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index cf2a4f08e5..5b75fba966 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -150,6 +161,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -166,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -188,6 +207,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build +index bd2401a7cb..8d497539ac 100644 +--- third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/utility/pffft_wrapper_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build +index 06000cbc10..cf42277c70 100644 +--- third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/vad/vad_gn/moz.build +@@ -74,6 +74,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -167,6 +178,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -183,6 +198,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -205,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build +index bea08f119f..c104d07962 100644 +--- third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build ++++ third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build +index 6b31661826..d0d5e69729 100644 +--- third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build ++++ third_party/libwebrtc/modules/congestion_controller/congestion_controller_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -201,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index d98d1f4660..21e9b12b4d 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 9eabaa60af..cb668afcb1 100644 +--- 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 +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -201,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build +index 38da3f33ec..27afbf8699 100644 +--- third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build ++++ third_party/libwebrtc/modules/congestion_controller/goog_cc/estimators_gn/moz.build +@@ -74,6 +74,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -168,6 +179,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -184,6 +199,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -206,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 526d42a6da..c10bde89a7 100644 +--- 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 +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -201,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index a36d351ab1..4857832777 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 49fc53c47c..96a190f648 100644 +--- 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 +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index e065f6b8d6..de0945c32f 100644 +--- 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 +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 1a26d6fbed..ef60392c44 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build +index ec5aa36c78..873daa331e 100644 +--- third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build ++++ third_party/libwebrtc/modules/congestion_controller/rtp/control_handler_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build +index 9e1db4a2ab..c421bb524d 100644 +--- third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build ++++ third_party/libwebrtc/modules/congestion_controller/rtp/transport_feedback_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -201,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index e2f5330283..8f0c389632 100644 +--- 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 +@@ -54,6 +54,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -116,6 +127,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -128,6 +143,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -140,6 +159,19 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": + + DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2", ++ "-msse2" ++ ] ++ ++if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ +diff --git third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build +index a5cf9234d1..59ec34a46a 100644 +--- third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build ++++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build +@@ -86,6 +86,59 @@ if CONFIG["OS_TARGET"] == "Darwin": + "/third_party/libwebrtc/modules/desktop_capture/mac/window_list_utils.cc" + ] + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["WEBRTC_USE_PIPEWIRE"] = True ++ DEFINES["WEBRTC_USE_X11"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ ++ LOCAL_INCLUDES += [ ++ "/media/libyuv/libyuv/include/", ++ "/media/libyuv/libyuv/include/", ++ "/third_party/pipewire/", ++ "/third_party/pipewire/" ++ ] ++ ++ OS_LIBS += [ ++ "X11", ++ "Xcomposite", ++ "Xdamage", ++ "Xext", ++ "Xfixes", ++ "Xrandr", ++ "Xrender", ++ "Xtst" ++ ] ++ ++ SOURCES += [ ++ "/third_party/libwebrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc" ++ ] ++ ++ UNIFIED_SOURCES += [ ++ "/third_party/libwebrtc/modules/desktop_capture/linux/mouse_cursor_monitor_x11.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/screen_capturer_x11.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/shared_x_display.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/window_capturer_x11.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/window_finder_x11.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/window_list_utils.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/x_atom_cache.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/x_error_trap.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/x_server_pixel_buffer.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/linux/x_window_property.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/screen_capturer_linux.cc", ++ "/third_party/libwebrtc/modules/desktop_capture/window_capturer_linux.cc" ++ ] ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -282,6 +335,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -294,6 +351,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -306,6 +367,12 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": + + DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build +index 4cf85ddfa7..0e133b2212 100644 +--- third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build ++++ third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build +@@ -46,6 +46,29 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["WEBRTC_USE_X11"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ ++ OS_LIBS += [ ++ "X11", ++ "Xcomposite", ++ "Xdamage", ++ "Xext", ++ "Xfixes", ++ "Xrandr", ++ "Xrender", ++ "Xtst" ++ ] ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -144,6 +167,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -156,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build +index 6831d8a311..10af878b46 100644 +--- third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build ++++ third_party/libwebrtc/modules/desktop_capture/primitives_gn/moz.build +@@ -54,6 +54,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -117,6 +128,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -129,6 +144,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -141,6 +160,12 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": + + DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/module_api_gn/moz.build third_party/libwebrtc/modules/module_api_gn/moz.build +index 18dcb08135..e60a418a5c 100644 +--- third_party/libwebrtc/modules/module_api_gn/moz.build ++++ third_party/libwebrtc/modules/module_api_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/module_api_public_gn/moz.build third_party/libwebrtc/modules/module_api_public_gn/moz.build +index 9e786592ef..a45d4b3617 100644 +--- third_party/libwebrtc/modules/module_api_public_gn/moz.build ++++ third_party/libwebrtc/modules/module_api_public_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/module_fec_api_gn/moz.build third_party/libwebrtc/modules/module_fec_api_gn/moz.build +index 94c74fa40b..d535f75c8e 100644 +--- third_party/libwebrtc/modules/module_fec_api_gn/moz.build ++++ third_party/libwebrtc/modules/module_fec_api_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build +index 303d47a95a..cff53a7075 100644 +--- third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build ++++ third_party/libwebrtc/modules/pacing/interval_budget_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/pacing/pacing_gn/moz.build third_party/libwebrtc/modules/pacing/pacing_gn/moz.build +index f6fde08638..01d969c0c9 100644 +--- third_party/libwebrtc/modules/pacing/pacing_gn/moz.build ++++ third_party/libwebrtc/modules/pacing/pacing_gn/moz.build +@@ -73,6 +73,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -167,6 +178,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -183,6 +198,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -205,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index bca6684427..599af3d257 100644 +--- 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 +@@ -79,6 +79,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -173,6 +184,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -189,6 +204,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -211,6 +230,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build +index a5ec9f4951..e036ba0402 100644 +--- third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build ++++ third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build +@@ -109,6 +109,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -203,6 +214,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -219,6 +234,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -241,6 +260,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build +index 33a43eeed5..13217b736d 100644 +--- third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build ++++ third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build +@@ -121,6 +121,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -215,6 +226,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -231,6 +246,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -253,6 +272,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build +index aee62695af..087ee836d1 100644 +--- third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build ++++ third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build +index 60e216ff55..192f544d28 100644 +--- third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build ++++ third_party/libwebrtc/modules/third_party/fft/fft_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build +index 4004c61364..4e7396bbec 100644 +--- third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build ++++ third_party/libwebrtc/modules/third_party/g711/g711_3p_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build +index 03a10df48e..91630f3272 100644 +--- third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build ++++ third_party/libwebrtc/modules/third_party/g722/g722_3p_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/utility/utility_gn/moz.build third_party/libwebrtc/modules/utility/utility_gn/moz.build +index e0b16b4073..5881ab6869 100644 +--- third_party/libwebrtc/modules/utility/utility_gn/moz.build ++++ third_party/libwebrtc/modules/utility/utility_gn/moz.build +@@ -72,6 +72,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -165,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -181,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -203,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 3b4e237101..0f5c345da0 100644 +--- 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 +@@ -64,6 +64,22 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ ++ UNIFIED_SOURCES += [ ++ "/third_party/libwebrtc/modules/video_capture/linux/device_info_linux.cc", ++ "/third_party/libwebrtc/modules/video_capture/linux/video_capture_linux.cc" ++ ] ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -179,6 +195,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -195,6 +215,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -213,6 +237,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build +index 86bc0e277d..c0f82da6ef 100644 +--- third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build ++++ third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build +@@ -72,6 +72,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -166,6 +177,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -182,6 +197,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -204,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build +index 8519e21097..6181f3b482 100644 +--- third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/chain_diff_calculator_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build +index 5f42fd5adb..7836c9170f 100644 +--- third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/codec_globals_headers_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 69874c53ac..b8db8cd9cc 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index f6af0518a3..d1f6bff5e2 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build +index 4ed27aaed8..2a4a1ff7dd 100644 +--- third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/deprecated/nack_module_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build +index d8d1780d20..25e50ff6fb 100644 +--- third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/encoded_frame_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build +index 8b09cfc9ec..f3e5353ab5 100644 +--- third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/frame_dependencies_calculator_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build +index d6059d52d2..2baa67b084 100644 +--- third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/nack_module_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -161,6 +172,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -177,6 +192,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -199,6 +218,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build +index e073ac2c3f..e9bb1da50b 100644 +--- third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/video_codec_interface_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -201,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build +index 8c0f15071b..190ae3c4d6 100644 +--- third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/video_coding_gn/moz.build +@@ -88,6 +88,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -182,6 +193,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -198,6 +213,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -220,6 +239,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build +index b6e4b928cf..aef33114b0 100644 +--- third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build +@@ -77,6 +77,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -171,6 +182,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -187,6 +202,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -209,6 +228,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build +index 2dced7c944..efa5dcadbb 100644 +--- third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build +@@ -73,6 +73,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -167,6 +178,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -183,6 +198,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -205,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build +index 35b41b3c67..f82513bdc4 100644 +--- third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build +@@ -71,6 +71,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -165,6 +176,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -181,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -203,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build +index 2315a41528..ecffacb782 100644 +--- third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/webrtc_vp8_gn/moz.build +@@ -72,6 +72,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -166,6 +177,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -182,6 +197,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -204,6 +223,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 4eef28d19b..4c068c393b 100644 +--- 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 +@@ -73,6 +73,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -167,6 +178,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -183,6 +198,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -205,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build +index cd75be3c84..9d1ce64bba 100644 +--- third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -164,6 +175,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -180,6 +195,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -202,6 +221,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build +index 4b0b804423..581c06d007 100644 +--- third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build ++++ third_party/libwebrtc/modules/video_coding/webrtc_vp9_helpers_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -163,6 +174,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -179,6 +194,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -201,6 +220,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build +index 7407051e7e..5665ec1796 100644 +--- third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build ++++ third_party/libwebrtc/modules/video_processing/denoiser_filter_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build +index f7b210e234..08ca80445c 100644 +--- third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build ++++ third_party/libwebrtc/modules/video_processing/video_processing_gn/moz.build +@@ -74,6 +74,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -168,6 +179,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -184,6 +199,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -206,6 +225,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build +index 476e28a19c..8cf4b20aaf 100644 +--- third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build ++++ third_party/libwebrtc/modules/video_processing/video_processing_neon_gn/moz.build +@@ -65,6 +65,18 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_ARCH_ARM64"] = True ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +@@ -133,6 +145,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -145,6 +161,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build +index cc42b921e5..9e18982afa 100644 +--- third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build ++++ third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn/moz.build +@@ -71,6 +71,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -148,6 +159,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -164,6 +179,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -193,6 +212,19 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": + "-msse2" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2", ++ "-msse2" ++ ] ++ ++if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ +diff --git third_party/libwebrtc/moz.build third_party/libwebrtc/moz.build +index 11313553ed..ee4cf1c70d 100644 +--- third_party/libwebrtc/moz.build ++++ third_party/libwebrtc/moz.build +@@ -384,6 +384,18 @@ if CONFIG["OS_TARGET"] == "Darwin": + "/third_party/libwebrtc/sdk/helpers_objc_gn" + ] + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DIRS += [ ++ "/third_party/libwebrtc/api/audio_codecs/isac/audio_decoder_isac_float_gn", ++ "/third_party/libwebrtc/api/audio_codecs/isac/audio_encoder_isac_float_gn", ++ "/third_party/libwebrtc/modules/audio_coding/isac_c_gn", ++ "/third_party/libwebrtc/modules/audio_coding/isac_gn", ++ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_generic_gn", ++ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", ++ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn" ++ ] ++ + if CONFIG["OS_TARGET"] == "Linux": + + DIRS += [ +@@ -497,6 +509,34 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Darwin": + "/third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn" + ] + ++if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DIRS += [ ++ "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", ++ "/third_party/libwebrtc/common_audio/common_audio_neon_gn", ++ "/third_party/libwebrtc/modules/video_processing/video_processing_neon_gn" ++ ] ++ ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DIRS += [ ++ "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", ++ "/third_party/libwebrtc/common_audio/common_audio_sse2_gn", ++ "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", ++ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn", ++ "/third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn" ++ ] ++ ++if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DIRS += [ ++ "/third_party/libwebrtc/common_audio/common_audio_avx2_gn", ++ "/third_party/libwebrtc/common_audio/common_audio_sse2_gn", ++ "/third_party/libwebrtc/modules/audio_processing/aec3/aec3_avx2_gn", ++ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn", ++ "/third_party/libwebrtc/modules/video_processing/video_processing_sse2_gn" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DIRS += [ +diff --git third_party/libwebrtc/rtc_base/atomicops_gn/moz.build third_party/libwebrtc/rtc_base/atomicops_gn/moz.build +index e81ee452c4..8e62ea0b2f 100644 +--- third_party/libwebrtc/rtc_base/atomicops_gn/moz.build ++++ third_party/libwebrtc/rtc_base/atomicops_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build +index 1562c0c15e..a317bbaed1 100644 +--- third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build ++++ third_party/libwebrtc/rtc_base/audio_format_to_string_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/checks_gn/moz.build third_party/libwebrtc/rtc_base/checks_gn/moz.build +index cd0f53f896..9bc0698b2a 100644 +--- third_party/libwebrtc/rtc_base/checks_gn/moz.build ++++ third_party/libwebrtc/rtc_base/checks_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build +index 6d4c494876..f53819d83e 100644 +--- third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build ++++ third_party/libwebrtc/rtc_base/compile_assert_c_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build +index 4da8d7835a..5a2fc712b7 100644 +--- third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build ++++ third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/deprecation_gn/moz.build third_party/libwebrtc/rtc_base/deprecation_gn/moz.build +index e270de4c35..e3ba310b6f 100644 +--- third_party/libwebrtc/rtc_base/deprecation_gn/moz.build ++++ third_party/libwebrtc/rtc_base/deprecation_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/divide_round_gn/moz.build third_party/libwebrtc/rtc_base/divide_round_gn/moz.build +index 0fcf9b238b..67dfd9daa9 100644 +--- third_party/libwebrtc/rtc_base/divide_round_gn/moz.build ++++ third_party/libwebrtc/rtc_base/divide_round_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build +index 82b2d0f65b..5c95c7e43a 100644 +--- third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build ++++ third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build +index 5d3674f5ec..0fe9133e79 100644 +--- third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build ++++ third_party/libwebrtc/rtc_base/experiments/balanced_degradation_settings_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build +index 09a8a30dcc..6edf8f0f03 100644 +--- third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build ++++ third_party/libwebrtc/rtc_base/experiments/cpu_speed_experiment_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build +index 9affe97b83..b1b560526a 100644 +--- third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build ++++ third_party/libwebrtc/rtc_base/experiments/field_trial_parser_gn/moz.build +@@ -70,6 +70,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -156,6 +167,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -172,6 +187,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -194,6 +213,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 6f0e85bc42..32f1ce05c6 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index d1321d6a34..7eb3cfdc8d 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 9c23102ce9..dcb4e39f25 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build +index d336e658c0..ceb5cf6cbe 100644 +--- third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build ++++ third_party/libwebrtc/rtc_base/experiments/quality_rampup_experiment_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build +index 9b65e10218..286f122ed6 100644 +--- third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build ++++ third_party/libwebrtc/rtc_base/experiments/quality_scaler_settings_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build +index c5b21c9f05..a75e83a45d 100644 +--- third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build ++++ third_party/libwebrtc/rtc_base/experiments/quality_scaling_experiment_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build +index 0be8b6e56e..063f6ca854 100644 +--- third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build ++++ third_party/libwebrtc/rtc_base/experiments/rate_control_settings_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build +index 5edc266617..0b15891971 100644 +--- third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build ++++ third_party/libwebrtc/rtc_base/experiments/rtt_mult_experiment_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index c90ea47893..1e0ae39f5a 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build +index 83bd305dbd..397c03437b 100644 +--- third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build ++++ third_party/libwebrtc/rtc_base/gtest_prod_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build +index 1d41d27c81..daafa435c6 100644 +--- third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build ++++ third_party/libwebrtc/rtc_base/ignore_wundef_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/logging_gn/moz.build third_party/libwebrtc/rtc_base/logging_gn/moz.build +index 3cd69d3494..816cbc3dba 100644 +--- third_party/libwebrtc/rtc_base/logging_gn/moz.build ++++ third_party/libwebrtc/rtc_base/logging_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/macromagic_gn/moz.build third_party/libwebrtc/rtc_base/macromagic_gn/moz.build +index bf9b26b06d..f400c123d1 100644 +--- third_party/libwebrtc/rtc_base/macromagic_gn/moz.build ++++ third_party/libwebrtc/rtc_base/macromagic_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build +index 8eb7cbafda..7270026522 100644 +--- third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build ++++ third_party/libwebrtc/rtc_base/memory/aligned_malloc_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build +index 175efb565e..01002b6f68 100644 +--- third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build ++++ third_party/libwebrtc/rtc_base/network/sent_packet_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build +index 27d304aa8a..4e0da258de 100644 +--- third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build ++++ third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build +index b8919fe70d..92c62a2dc5 100644 +--- third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build ++++ third_party/libwebrtc/rtc_base/platform_thread_types_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build +index 29bb85689a..51a5a79011 100644 +--- third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build ++++ third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build +index 4b43624a4d..8f90e5fc32 100644 +--- third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build ++++ third_party/libwebrtc/rtc_base/rate_limiter_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/refcount_gn/moz.build third_party/libwebrtc/rtc_base/refcount_gn/moz.build +index 0bb1831752..e1e97a1c61 100644 +--- third_party/libwebrtc/rtc_base/refcount_gn/moz.build ++++ third_party/libwebrtc/rtc_base/refcount_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build +index 1a0a056251..681b7f6e3e 100644 +--- third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build ++++ third_party/libwebrtc/rtc_base/rtc_base_approved_gn/moz.build +@@ -80,6 +80,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -170,6 +181,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -186,6 +201,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -208,6 +227,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build +index 2831f73c90..208fc12f5a 100644 +--- third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build ++++ third_party/libwebrtc/rtc_base/rtc_base_gn/moz.build +@@ -94,6 +94,21 @@ if CONFIG["OS_TARGET"] == "Darwin": + "/third_party/libwebrtc/rtc_base/mac_ifaddrs_converter.cc" + ] + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ ++ UNIFIED_SOURCES += [ ++ "/third_party/libwebrtc/rtc_base/ifaddrs_converter.cc" ++ ] ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -203,6 +218,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -219,6 +238,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -241,6 +264,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build +index 76376fd45d..a299d4f539 100644 +--- third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build ++++ third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build +index 4a6ac162af..9e1f79a96a 100644 +--- third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build ++++ third_party/libwebrtc/rtc_base/rtc_numerics_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -155,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -171,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -193,6 +212,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build +index 16c3631473..a03e2565fe 100644 +--- third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build ++++ third_party/libwebrtc/rtc_base/rtc_task_queue_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build +index e4bad4fb28..7654bf0046 100644 +--- third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build ++++ third_party/libwebrtc/rtc_base/safe_compare_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build +index ac5270a93e..817797ec60 100644 +--- third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build ++++ third_party/libwebrtc/rtc_base/safe_conversions_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build +index cced167265..3a03342908 100644 +--- third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build ++++ third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build +index 5e7a5ecc50..5d37d4610f 100644 +--- third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build ++++ third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/stringutils_gn/moz.build third_party/libwebrtc/rtc_base/stringutils_gn/moz.build +index e398bb8abc..709e325bd2 100644 +--- third_party/libwebrtc/rtc_base/stringutils_gn/moz.build ++++ third_party/libwebrtc/rtc_base/stringutils_gn/moz.build +@@ -71,6 +71,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build +index 184fcdaa67..ca2360f09e 100644 +--- third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build ++++ third_party/libwebrtc/rtc_base/synchronization/mutex_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build +index 5f14995c08..c88bc65d9a 100644 +--- third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build ++++ third_party/libwebrtc/rtc_base/synchronization/rw_lock_wrapper_gn/moz.build +@@ -71,6 +71,21 @@ if CONFIG["OS_TARGET"] == "Darwin": + "/third_party/libwebrtc/rtc_base/synchronization/rw_lock_posix.cc" + ] + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ ++ UNIFIED_SOURCES += [ ++ "/third_party/libwebrtc/rtc_base/synchronization/rw_lock_posix.cc" ++ ] ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -169,6 +184,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -185,6 +204,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -207,6 +230,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build +index 5ec0cff625..5d5103a811 100644 +--- third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build ++++ third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build +index 1ca980e259..a2f7bfb8e2 100644 +--- third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build ++++ third_party/libwebrtc/rtc_base/synchronization/yield_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build +index 5939126563..3d272a6f47 100644 +--- third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build ++++ third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/system/arch_gn/moz.build third_party/libwebrtc/rtc_base/system/arch_gn/moz.build +index a6e7dec918..51b7a68162 100644 +--- third_party/libwebrtc/rtc_base/system/arch_gn/moz.build ++++ third_party/libwebrtc/rtc_base/system/arch_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build +index bc4d7e2469..e6036253b3 100644 +--- third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build ++++ third_party/libwebrtc/rtc_base/system/file_wrapper_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build +index 2e4468530c..1498b1c742 100644 +--- third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build ++++ third_party/libwebrtc/rtc_base/system/ignore_warnings_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/system/inline_gn/moz.build third_party/libwebrtc/rtc_base/system/inline_gn/moz.build +index e82f4a2ce6..7430a8635d 100644 +--- third_party/libwebrtc/rtc_base/system/inline_gn/moz.build ++++ third_party/libwebrtc/rtc_base/system/inline_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build +index e4448145e5..b7d6723671 100644 +--- third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build ++++ third_party/libwebrtc/rtc_base/system/rtc_export_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build +index 87feb69ca5..687319e0f3 100644 +--- third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build ++++ third_party/libwebrtc/rtc_base/system/thread_registry_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/system/unused_gn/moz.build third_party/libwebrtc/rtc_base/system/unused_gn/moz.build +index 0b8030c571..99f9f67bd6 100644 +--- third_party/libwebrtc/rtc_base/system/unused_gn/moz.build ++++ third_party/libwebrtc/rtc_base/system/unused_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 1792dad542..52e4dd3757 100644 +--- 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 +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 3186044467..f6f80401b4 100644 +--- 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 +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build +index 3218f68235..bcb9f2e32e 100644 +--- third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build ++++ third_party/libwebrtc/rtc_base/task_utils/repeating_task_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -160,6 +171,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -176,6 +191,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -198,6 +217,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index f6d95c5d8f..acb9a10fb1 100644 +--- 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 +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build +index 0849487bee..5f494b2a1d 100644 +--- third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build ++++ third_party/libwebrtc/rtc_base/third_party/base64/base64_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build +index a3c1b2d092..41d659e69b 100644 +--- third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build ++++ third_party/libwebrtc/rtc_base/third_party/sigslot/sigslot_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -145,6 +156,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -183,6 +202,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build +index eb1c598134..3b4bd04a61 100644 +--- third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build ++++ third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build +index 7dd65b9bb4..9ecca631cd 100644 +--- third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build ++++ third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/timeutils_gn/moz.build third_party/libwebrtc/rtc_base/timeutils_gn/moz.build +index 39632fc6d5..0224cebffc 100644 +--- third_party/libwebrtc/rtc_base/timeutils_gn/moz.build ++++ third_party/libwebrtc/rtc_base/timeutils_gn/moz.build +@@ -69,6 +69,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -155,6 +166,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -171,6 +186,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -193,6 +212,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/rtc_base/type_traits_gn/moz.build third_party/libwebrtc/rtc_base/type_traits_gn/moz.build +index 5cff354c04..eec4cdbb8b 100644 +--- third_party/libwebrtc/rtc_base/type_traits_gn/moz.build ++++ third_party/libwebrtc/rtc_base/type_traits_gn/moz.build +@@ -59,6 +59,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -137,6 +148,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -153,6 +168,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build +index 5d22a0584d..f0cdf14d4c 100644 +--- third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build ++++ third_party/libwebrtc/rtc_base/units/unit_base_gn/moz.build +@@ -63,6 +63,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -141,6 +152,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build +index a9a520b2bc..507a1f5c53 100644 +--- third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build ++++ third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -149,6 +160,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -187,6 +206,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build +index e8fd3bd45c..69cd370233 100644 +--- third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build ++++ third_party/libwebrtc/system_wrappers/field_trial_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/system_wrappers/metrics_gn/moz.build third_party/libwebrtc/system_wrappers/metrics_gn/moz.build +index 0edfd92501..c3e0662ddc 100644 +--- third_party/libwebrtc/system_wrappers/metrics_gn/moz.build ++++ third_party/libwebrtc/system_wrappers/metrics_gn/moz.build +@@ -67,6 +67,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -153,6 +164,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -169,6 +184,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -191,6 +210,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build +index 727662430e..a1eaab4f3c 100644 +--- third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build ++++ third_party/libwebrtc/system_wrappers/system_wrappers_gn/moz.build +@@ -77,6 +77,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -174,6 +185,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -190,6 +205,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -212,6 +231,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/test/rtp_test_utils_gn/moz.build third_party/libwebrtc/test/rtp_test_utils_gn/moz.build +index c222e6a3af..1379660d79 100644 +--- third_party/libwebrtc/test/rtp_test_utils_gn/moz.build ++++ third_party/libwebrtc/test/rtp_test_utils_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 5d029de38b..11db562390 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index ac2b2f9775..7d9ba7cfc3 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 1839c3f7ef..473b0b9b17 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 1d348ef490..cc3c030492 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index c1b56e212a..02395e0a13 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 5d61315e61..d06897b611 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 0c5b308301..7f08b5e075 100644 +--- 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 +@@ -48,6 +48,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -113,6 +120,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -135,6 +146,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 0f5efc71ee..077e2ac488 100644 +--- 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 +@@ -48,6 +48,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -113,6 +120,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -135,6 +146,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 640a888c66..d295f9af68 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index fa970ef8d5..0ce98e766f 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index a75033fa36..6a1e839211 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 4c744d8f75..a5ab743066 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 74fabcb9c8..fb95bbc36e 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 5463d866ef..75308e83fc 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index dbc65169f7..82dc91cfd7 100644 +--- 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 +@@ -48,6 +48,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -113,6 +120,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -135,6 +146,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 8d3df8b96f..89719dac9b 100644 +--- 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 +@@ -50,6 +50,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -115,6 +122,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -137,6 +148,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 28fe7987c0..e1cdd13b2a 100644 +--- 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 +@@ -63,6 +63,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -128,6 +135,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -150,6 +161,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index c7f0ea0054..971bf1ea7f 100644 +--- 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 +@@ -48,6 +48,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -113,6 +120,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -135,6 +146,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 89022d5d84..8a243f7328 100644 +--- 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 +@@ -48,6 +48,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -113,6 +120,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -135,6 +146,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git 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 +index 2579d0b18d..cf62758dee 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 41cd799880..045eb44296 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index bb223171f1..d55fe873ea 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git 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 +index 7588f9b24f..f7d30eacb8 100644 +--- 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 +@@ -44,6 +44,13 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["_LIBCPP_HAS_NO_ALIGNED_ALLOCATION"] = True + DEFINES["__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"] = "0" + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -105,6 +112,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +diff --git third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build +index fa20ebbc5f..0d6b22cb12 100644 +--- third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build ++++ third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build +@@ -49,6 +49,15 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -117,6 +126,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -133,6 +146,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -155,6 +172,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build +index aef691bff4..bd388e306b 100644 +--- third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build ++++ third_party/libwebrtc/third_party/rnnoise/rnn_vad_gn/moz.build +@@ -49,6 +49,15 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -116,6 +125,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -132,6 +145,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -154,6 +171,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build +index 1490845fcf..00e22b881a 100644 +--- third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build ++++ third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build +@@ -75,6 +75,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -169,6 +180,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -185,6 +200,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -207,6 +226,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build +index 624c83e80d..4c8d88442b 100644 +--- third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build ++++ third_party/libwebrtc/video/frame_dumping_decoder_gn/moz.build +@@ -68,6 +68,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -162,6 +173,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -178,6 +193,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -200,6 +219,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/video/video_gn/moz.build third_party/libwebrtc/video/video_gn/moz.build +index c361d527ed..b37479a9be 100644 +--- third_party/libwebrtc/video/video_gn/moz.build ++++ third_party/libwebrtc/video/video_gn/moz.build +@@ -97,6 +97,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -191,6 +202,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -207,6 +222,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -229,6 +248,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build +index 71efcab220..43c68adedd 100644 +--- third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build ++++ third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build +@@ -73,6 +73,17 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -167,6 +178,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -183,6 +198,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True +@@ -205,6 +224,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] + ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ CXXFLAGS += [ ++ "-msse2" ++ ] ++ + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["CR_SYSROOT_HASH"] = "ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6" +diff --git third_party/libwebrtc/webrtc_gn/moz.build third_party/libwebrtc/webrtc_gn/moz.build +index 625bd0b5dd..4dddfea2fd 100644 +--- third_party/libwebrtc/webrtc_gn/moz.build ++++ third_party/libwebrtc/webrtc_gn/moz.build +@@ -64,6 +64,28 @@ if CONFIG["OS_TARGET"] == "Darwin": + DEFINES["__STDC_CONSTANT_MACROS"] = True + DEFINES["__STDC_FORMAT_MACROS"] = True + ++if CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["USE_GLIB"] = "1" ++ DEFINES["WEBRTC_BSD"] = True ++ DEFINES["WEBRTC_POSIX"] = True ++ DEFINES["_FILE_OFFSET_BITS"] = "64" ++ DEFINES["_LARGEFILE64_SOURCE"] = True ++ DEFINES["_LARGEFILE_SOURCE"] = True ++ DEFINES["__STDC_CONSTANT_MACROS"] = True ++ DEFINES["__STDC_FORMAT_MACROS"] = True ++ ++ OS_LIBS += [ ++ "X11", ++ "Xcomposite", ++ "Xdamage", ++ "Xext", ++ "Xfixes", ++ "Xrandr", ++ "Xrender", ++ "Xtst" ++ ] ++ + if CONFIG["OS_TARGET"] == "Linux": + + DEFINES["USE_AURA"] = "1" +@@ -180,6 +202,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_FORTIFY_SOURCE"] = "2" + ++if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_FORTIFY_SOURCE"] = "2" ++ + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_FORTIFY_SOURCE"] = "2" +@@ -196,6 +222,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": + + DEFINES["_DEBUG"] = True + ++if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": ++ ++ DEFINES["_DEBUG"] = True ++ + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": + + DEFINES["_DEBUG"] = True |