diff --git a/www/firefox/files/patch-libwebrtc-generated b/www/firefox/files/patch-libwebrtc-generated index c1052ad4cca1..90d481d0446f 100644 --- a/www/firefox/files/patch-libwebrtc-generated +++ b/www/firefox/files/patch-libwebrtc-generated @@ -1,19787 +1,20130 @@ 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 +index 989f348be6cc..db0bcfcded11 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/api/array_view_gn/moz.build third_party/libwebrtc/api/array_view_gn/moz.build -index aca9f59966..1ea31b6a5e 100644 +index b9e9f3dd7ff9..9df1a7163a5a 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/api/audio/aec3_config_gn/moz.build third_party/libwebrtc/api/audio/aec3_config_gn/moz.build -index 861233bfeb..c2f87155bb 100644 +index fa1cc1f3a3ab..da73ac5884e9 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 7b2186be89a1..15ac3dd39810 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 4c8a3b864fc7..f185a8a24120 100644 --- third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build +++ third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build -@@ -67,6 +67,17 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -154,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" -@@ -169,6 +184,10 @@ +@@ -170,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 @@ - - OS_LIBS += [ +@@ -196,6 +216,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/api/audio/audio_mixer_api_gn/moz.build third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build -index 41222e1e06..5a75494c05 100644 +index da4393f09178..f2381443da31 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/api/audio/echo_control_gn/moz.build third_party/libwebrtc/api/audio/echo_control_gn/moz.build -index 132b296b25..df28661dfb 100644 +index d6076e7ff3b3..67851ac54434 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/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 +index 9663c227a5b4..b3eef064971d 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 22fa55066eae..0640946b26c1 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 1106e1abb32b..8e79889aa0dc 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -156,6 +168,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -172,6 +188,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -198,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index e1282ef7fc03..69ba1f8a4679 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 @@ +@@ -71,6 +71,20 @@ if CONFIG["OS_TARGET"] == "Darwin": DEFINES["__STDC_CONSTANT_MACROS"] = True DEFINES["__STDC_FORMAT_MACROS"] = True +if CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_GLIB"] = "1" ++ DEFINES["USE_X11"] = "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 @@ +@@ -173,6 +187,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -189,6 +207,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -227,6 +248,12 @@ - +@@ -228,6 +250,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ 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 +index 059520e68160..5090e540bb39 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 @@ +@@ -71,6 +71,20 @@ if CONFIG["OS_TARGET"] == "Darwin": DEFINES["__STDC_CONSTANT_MACROS"] = True DEFINES["__STDC_FORMAT_MACROS"] = True +if CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_GLIB"] = "1" ++ DEFINES["USE_X11"] = "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 @@ +@@ -173,6 +187,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -189,6 +207,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -227,6 +248,12 @@ - +@@ -228,6 +250,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ 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 +index 7d0a0897c3cf..5ad975a4f42c 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index a32cecf159b3..84f15b829971 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 843e12faccf6..585faa5e4226 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index da03926a4f06..b8be9937e4e9 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 -@@ -67,6 +67,17 @@ +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ - "android_support" -+ ] -+ -+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": -+ -+ CXXFLAGS += [ -+ "-msse2" - ] - - if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": 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 +index 58da84e1ffc5..778ad73df1a1 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 23249247d88a..4767502bc819 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 38aaaf79ce6e..9572dd3569e9 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 -@@ -67,6 +67,17 @@ +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ - "android_support" -+ ] -+ -+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": -+ -+ CXXFLAGS += [ -+ "-msse2" - ] - - if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": 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 +index 2671d74f6f20..dc1e7eff53a5 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 7bb2a25e1bff..21895ff9b0d8 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -146,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" -@@ -162,6 +177,10 @@ +@@ -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 -@@ -186,6 +205,12 @@ - - OS_LIBS += [ +@@ -188,6 +208,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/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 +index 136d51a9d11f..0caeed45672d 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": +@@ -65,6 +65,20 @@ if CONFIG["OS_TARGET"] == "Darwin": DEFINES["__STDC_CONSTANT_MACROS"] = True DEFINES["__STDC_FORMAT_MACROS"] = True +if CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_GLIB"] = "1" ++ DEFINES["USE_X11"] = "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": +@@ -163,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" -@@ -179,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -179,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 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 +index e5e0c94c85ac..41285aea32b7 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -146,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" -@@ -162,6 +177,10 @@ +@@ -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 -@@ -186,6 +205,12 @@ - - OS_LIBS += [ +@@ -188,6 +208,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/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 +index 2c253858c30b..59173044b1aa 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": +@@ -65,6 +65,20 @@ if CONFIG["OS_TARGET"] == "Darwin": DEFINES["__STDC_CONSTANT_MACROS"] = True DEFINES["__STDC_FORMAT_MACROS"] = True +if CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_GLIB"] = "1" ++ DEFINES["USE_X11"] = "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": +@@ -163,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" -@@ -179,6 +196,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -179,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 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 +index 7d8e698644aa..1f877dcae301 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -154,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" -@@ -170,6 +185,10 @@ +@@ -170,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 -@@ -194,6 +213,12 @@ - - OS_LIBS += [ +@@ -196,6 +216,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/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 +index 76634d990fa1..ff84b06f133b 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 08df23072e09..b3f02657530b 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 087956f82c62..59ae25890c20 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -154,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" -@@ -170,6 +185,10 @@ +@@ -170,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 -@@ -194,6 +213,18 @@ - - OS_LIBS += [ +@@ -196,6 +216,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"] == "FreeBSD": -+ -+ CXXFLAGS += [ -+ "-msse2" - ] - if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index ca4e861e1294..827b44d5f368 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -158,6 +170,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -174,6 +190,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -200,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 356c9242cced..c849cfe1932c 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index a6d04ed27e88..754589b0ced3 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/api/bitrate_allocation_gn/moz.build third_party/libwebrtc/api/bitrate_allocation_gn/moz.build -index 2cc056678b..d7121e8987 100644 +index c7e126b5e8d8..bf5958772f47 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/api/call_api_gn/moz.build third_party/libwebrtc/api/call_api_gn/moz.build -index c6b01250ea..6fd6f7a615 100644 +index 32af3dea769b..0cf4abbbdbdf 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 9e9118429fb7..fd312666bf00 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 3ed2d8c9bb19..892e1be621f0 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/api/crypto/frame_encryptor_interface_gn/moz.build third_party/libwebrtc/api/crypto/frame_encryptor_interface_gn/moz.build -index aaaaeac661..64ae65e0dc 100644 +index 3340f15d9f18..bd768a3cde6e 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/api/crypto/options_gn/moz.build third_party/libwebrtc/api/crypto/options_gn/moz.build -index 1849070995..f31d4e2240 100644 +index dd951595090e..c36fa96c5e19 100644 --- third_party/libwebrtc/api/crypto/options_gn/moz.build +++ third_party/libwebrtc/api/crypto/options_gn/moz.build -@@ -68,6 +68,17 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 6b4009ab3454..cb0e3addc77e 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index bf251352f7b9..68f9d900ebc4 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": +@@ -64,6 +64,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -154,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" -@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -170,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 diff --git third_party/libwebrtc/api/function_view_gn/moz.build third_party/libwebrtc/api/function_view_gn/moz.build -index 67fc4e25a2..ff4bc2082b 100644 +index e7d52742a1ba..f90840b4abb8 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/api/libjingle_logging_api_gn/moz.build third_party/libwebrtc/api/libjingle_logging_api_gn/moz.build -index e2eb369f3e..22954f6943 100644 +index ad7ce43b2fae..60a6a9ed07a7 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index a3a735b26fe7..fc0752bbc3b2 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 70143324c945..8d4b164a8743 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 382532804568..132559343498 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index e74c5784e4a3..4e30b4cfc59e 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -152,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" -@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -168,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 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 +index a34927641e4a..5a9e0e130e5d 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 9591324717bb..4c614859a6ec 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 6350054658c6..244392f15b3a 100644 --- third_party/libwebrtc/api/numerics/numerics_gn/moz.build +++ third_party/libwebrtc/api/numerics/numerics_gn/moz.build -@@ -67,6 +67,17 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/api/priority_gn/moz.build third_party/libwebrtc/api/priority_gn/moz.build -index dbe91f7048..ac0e0c377e 100644 +index a96dbd49bad9..1c84e7289f07 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 54ae16a52c06..a0c74d2fb530 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/api/rtc_error_gn/moz.build third_party/libwebrtc/api/rtc_error_gn/moz.build -index 01b92cee7a..41bbb8718c 100644 +index 105bd8cffac0..620e0feef095 100644 --- third_party/libwebrtc/api/rtc_error_gn/moz.build +++ third_party/libwebrtc/api/rtc_error_gn/moz.build -@@ -67,6 +67,17 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index ac97ca6790f5..472c4d71ce69 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -154,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" -@@ -170,6 +185,10 @@ +@@ -170,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 -@@ -194,6 +213,12 @@ - - OS_LIBS += [ +@@ -196,6 +216,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/api/rtp_headers_gn/moz.build third_party/libwebrtc/api/rtp_headers_gn/moz.build -index 2a67aeb66e..b65a55e453 100644 +index 05720fb8745e..89d898986a5d 100644 --- third_party/libwebrtc/api/rtp_headers_gn/moz.build +++ third_party/libwebrtc/api/rtp_headers_gn/moz.build -@@ -67,6 +67,17 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 3c48e6cb77cc..ef77d957cf7a 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/api/rtp_parameters_gn/moz.build third_party/libwebrtc/api/rtp_parameters_gn/moz.build -index 23d200f8b0..8c778c8cb2 100644 +index 52f1bd3a5fc2..ca10524d1995 100644 --- third_party/libwebrtc/api/rtp_parameters_gn/moz.build +++ third_party/libwebrtc/api/rtp_parameters_gn/moz.build -@@ -68,6 +68,17 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -166,6 +181,10 @@ +@@ -166,6 +182,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -190,6 +209,12 @@ - - OS_LIBS += [ +@@ -192,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 0b14ca8f7a76..2484ef9b2dfb 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 8640dd39c05b..c0296981b176 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index ad8d869dbe62..aa5f011a90ef 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": +@@ -64,6 +64,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -154,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" -@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -170,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 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 +index 1206c9bf7dcf..b08905fadb5e 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 8336ce4b69da..196e0210cb77 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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/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 +index b11890444367..e0c4fb09aa6b 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index bbd03670d815..0dfc3c63820f 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index f774b4004613..03f4d1d4ff9c 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index b613d11065bc..7e8b700236ff 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 0548649d964a..b9e1bd959f42 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/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 +index 543aa18e866b..ad999a5ec9b6 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 74dc8edde6e4..3140f58e48ec 100644 --- third_party/libwebrtc/api/transport_api_gn/moz.build +++ third_party/libwebrtc/api/transport_api_gn/moz.build -@@ -63,6 +63,17 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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/api/units/data_rate_gn/moz.build third_party/libwebrtc/api/units/data_rate_gn/moz.build -index 6708de4bb0..3b2fc8ba9c 100644 +index 73fe3b80455f..08930114b536 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 3c32376248b7..79006bb7f52c 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/api/units/frequency_gn/moz.build third_party/libwebrtc/api/units/frequency_gn/moz.build -index 79fcff48ef..6790d9ceaa 100644 +index 4ad0edd064ad..839ab64d4ca7 100644 --- third_party/libwebrtc/api/units/frequency_gn/moz.build +++ third_party/libwebrtc/api/units/frequency_gn/moz.build -@@ -67,6 +67,17 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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": + ] + ++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/api/units/time_delta_gn/moz.build third_party/libwebrtc/api/units/time_delta_gn/moz.build -index 9cd9ff24f3..c32d6624b5 100644 +index 51ee435db07a..d460dccfa8b4 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/api/units/timestamp_gn/moz.build third_party/libwebrtc/api/units/timestamp_gn/moz.build -index 23aa0ba2c5..72d6220c6b 100644 +index 1e3e67cc2649..e6be5c6789b8 100644 --- third_party/libwebrtc/api/units/timestamp_gn/moz.build +++ third_party/libwebrtc/api/units/timestamp_gn/moz.build -@@ -67,6 +67,17 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 21f2ba78118c..642ee08e3eee 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 2771b5652041..0438b03d472a 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index cc30477c7365..39f142dd7e7e 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 456914a5644f..02cb3197b175 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/api/video/video_adaptation_gn/moz.build third_party/libwebrtc/api/video/video_adaptation_gn/moz.build -index 539cc93e02..3f6fd22ca3 100644 +index 8fbf277c02a2..a3d1c7eef0d4 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 367da43db90e..290c5a565fdb 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index be33b13bdab4..144252aec9f8 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/api/video/video_bitrate_allocator_gn/moz.build third_party/libwebrtc/api/video/video_bitrate_allocator_gn/moz.build -index 8726c6c5a5..891f5b2ac1 100644 +index 2bb0247e206b..81b553bf2b7d 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 3e0241b67848..e13964cfe918 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index fefb29304e7d..02f30af107f1 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -155,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" -@@ -171,6 +186,10 @@ +@@ -171,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 -@@ -195,6 +214,12 @@ - - OS_LIBS += [ +@@ -197,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index f7264918a028..21ea9e0de046 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 558a17591823..9fba38bf343a 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 0b5b69888b77..d5e1da5e0324 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 23d76d2fd9ea..24a1fce042a4 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 6d47e636a0ce..4895a3314e7b 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index b39549cb1ec8..e63adda322be 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -156,6 +168,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -172,6 +188,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -198,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 38c0bae20ba0..a8089fb8ccd0 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 1674dd1c95e0..9481b03dd87d 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/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 +index 34681377d4fa..aad4dc3fc0b2 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/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 +index cebf465e089f..e0fb338e5e68 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 78835081db92..94afae46d05f 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index dd3b4e323acc..6c992c640e2d 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +194,10 @@ +@@ -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 -@@ -203,6 +222,12 @@ - - OS_LIBS += [ +@@ -205,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 0bedb0c19938..abc2c989937a 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 @@ +@@ -75,6 +75,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 954a2332e694..f0a885fdd8c4 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/audio/audio_gn/moz.build third_party/libwebrtc/audio/audio_gn/moz.build -index 48c74e8063..78ccf8d0e2 100644 +index b02936781baa..e6fcc6742d49 100644 --- third_party/libwebrtc/audio/audio_gn/moz.build +++ third_party/libwebrtc/audio/audio_gn/moz.build -@@ -81,6 +81,17 @@ +@@ -81,6 +81,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -175,6 +187,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -191,6 +207,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -215,6 +234,12 @@ - - OS_LIBS += [ +@@ -217,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index e3d24b550252..f1f1897c0e7a 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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": + ] + ++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/call/adaptation/resource_adaptation_gn/moz.build third_party/libwebrtc/call/adaptation/resource_adaptation_gn/moz.build -index 0c08bff6a3..2a6e85ac47 100644 +index c94b5724c5e1..e155a01c8a4d 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 @@ +@@ -77,6 +77,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -171,6 +183,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -187,6 +203,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -213,6 +233,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/call/audio_sender_interface_gn/moz.build third_party/libwebrtc/call/audio_sender_interface_gn/moz.build -index a746c88078..cb4ace74be 100644 +index 7fe9922b83e1..bcfc532dffe8 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/call/bitrate_allocator_gn/moz.build third_party/libwebrtc/call/bitrate_allocator_gn/moz.build -index 8d140ba125..5ee40a51d4 100644 +index 1c9a1bed8de2..b7da274647fb 100644 --- third_party/libwebrtc/call/bitrate_allocator_gn/moz.build +++ third_party/libwebrtc/call/bitrate_allocator_gn/moz.build -@@ -67,6 +67,17 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/call/bitrate_configurator_gn/moz.build third_party/libwebrtc/call/bitrate_configurator_gn/moz.build -index 2dba19a53a..290ee2e201 100644 +index 93cdc9bd58bc..6febae04853a 100644 --- third_party/libwebrtc/call/bitrate_configurator_gn/moz.build +++ third_party/libwebrtc/call/bitrate_configurator_gn/moz.build -@@ -68,6 +68,17 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/call/call_gn/moz.build third_party/libwebrtc/call/call_gn/moz.build -index 8cb24f9748..7f3d3e0f33 100644 +index 4e34237e5d85..08e6d0eb5455 100644 --- third_party/libwebrtc/call/call_gn/moz.build +++ third_party/libwebrtc/call/call_gn/moz.build -@@ -72,6 +72,17 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -166,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" -@@ -182,6 +197,10 @@ +@@ -182,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 -@@ -206,6 +225,12 @@ - - OS_LIBS += [ +@@ -208,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/call/call_interfaces_gn/moz.build third_party/libwebrtc/call/call_interfaces_gn/moz.build -index 4f07c8b731..8ef60e959c 100644 +index ba457828691a..8b046cab01b4 100644 --- third_party/libwebrtc/call/call_interfaces_gn/moz.build +++ third_party/libwebrtc/call/call_interfaces_gn/moz.build -@@ -73,6 +73,17 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -167,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" -@@ -183,6 +198,10 @@ +@@ -183,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 -@@ -207,6 +226,12 @@ - - OS_LIBS += [ +@@ -209,6 +229,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/call/fake_network_gn/moz.build third_party/libwebrtc/call/fake_network_gn/moz.build -index 54b8d2df6b..2d2ebb2e84 100644 +index 1cd65eb3ba63..781d6b8d9b08 100644 --- third_party/libwebrtc/call/fake_network_gn/moz.build +++ third_party/libwebrtc/call/fake_network_gn/moz.build -@@ -68,6 +68,17 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/call/rtp_interfaces_gn/moz.build third_party/libwebrtc/call/rtp_interfaces_gn/moz.build -index 040939df59..814d9c1d92 100644 +index bc5238d99caf..cac5ebc08953 100644 --- third_party/libwebrtc/call/rtp_interfaces_gn/moz.build +++ third_party/libwebrtc/call/rtp_interfaces_gn/moz.build -@@ -68,6 +68,17 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/call/rtp_receiver_gn/moz.build third_party/libwebrtc/call/rtp_receiver_gn/moz.build -index 5c1f19a9da..f31fa589f9 100644 +index 6dcc8d7b007d..3b3b87e81c0f 100644 --- third_party/libwebrtc/call/rtp_receiver_gn/moz.build +++ third_party/libwebrtc/call/rtp_receiver_gn/moz.build -@@ -70,6 +70,17 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/call/rtp_sender_gn/moz.build third_party/libwebrtc/call/rtp_sender_gn/moz.build -index 1d14b03100..337dcfd1ce 100644 +index 0b865232b83e..33517edd5e5c 100644 --- third_party/libwebrtc/call/rtp_sender_gn/moz.build +++ third_party/libwebrtc/call/rtp_sender_gn/moz.build -@@ -70,6 +70,17 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/call/simulated_network_gn/moz.build third_party/libwebrtc/call/simulated_network_gn/moz.build -index 62ff82980c..6abb9718b7 100644 +index 0000a7122ef4..7fa437dcf78c 100644 --- third_party/libwebrtc/call/simulated_network_gn/moz.build +++ third_party/libwebrtc/call/simulated_network_gn/moz.build -@@ -68,6 +68,17 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 621724b064d7..29af8c97b1de 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": +@@ -64,6 +64,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -154,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" -@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -170,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 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 +index 57e0c821b48e..ae2fce579526 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +194,10 @@ +@@ -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 -@@ -203,6 +222,12 @@ - - OS_LIBS += [ +@@ -205,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 581e409b3a81..a25253b2fb81 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": +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -146,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" -@@ -162,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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 -@@ -184,6 +203,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": +@@ -188,6 +208,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 +index d5ffe3c10c68..6be4b3826f9d 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -142,6 +154,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -158,6 +174,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 60480a62ae7f..1266bed4bf30 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 @@ +@@ -110,6 +110,23 @@ 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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = 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 @@ +@@ -218,6 +235,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -234,6 +255,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -277,6 +301,12 @@ - UNIFIED_SOURCES += [ - "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", +@@ -279,6 +304,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": + -+ CXXFLAGS += [ ++ CFLAGS += [ + "-msse2" - ] - ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ 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 +index 9bd3921b44f8..1177a8b55ffc 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index f4c5fe9bfd9d..14ff95d26532 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 @@ +@@ -80,6 +80,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -173,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" -@@ -189,6 +204,10 @@ +@@ -189,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 -@@ -213,6 +232,12 @@ - - OS_LIBS += [ +@@ -215,6 +235,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_neon_c_gn/moz.build third_party/libwebrtc/common_audio/common_audio_neon_c_gn/moz.build -index 36ffd6add1..a16a1a6b1b 100644 +index 4cb5fcf91dfe..75927b793917 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": +@@ -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["USE_X11"] = "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["USE_AURA"] = "1" +@@ -148,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" -@@ -162,6 +178,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -160,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_neon_gn/moz.build third_party/libwebrtc/common_audio/common_audio_neon_gn/moz.build -index ba1537f7dd..c409afbddb 100644 +index 023ff03ebb67..06e5b01be8ce 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": +@@ -70,6 +70,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["USE_X11"] = "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["USE_AURA"] = "1" +@@ -147,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" -@@ -161,6 +177,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -159,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/common_audio/common_audio_sse2_gn/moz.build third_party/libwebrtc/common_audio/common_audio_sse2_gn/moz.build -index c516a1769e..a207526986 100644 +index dbbcc3470228..2a2e5527e728 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": +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -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" -@@ -165,6 +180,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -165,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 -@@ -194,6 +213,19 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": +@@ -198,6 +218,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 +index bd66e2d8072e..61e6383cd070 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index b6a04a3781dd..34a999099b1b 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index b71e2b34a717..851d45d784ba 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -152,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" -@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -168,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 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 +index cc014380746d..3c9dea1d1f04 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -182,6 +194,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -198,6 +214,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -236,6 +255,23 @@ +@@ -245,6 +265,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_64" and CONFIG["OS_TARGET"] == "Darwin": ++if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": + + CXXFLAGS += [ ++ "-msse2", + "-msse2" + ] + -+ UNIFIED_SOURCES += [ -+ "/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": ++if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD": + + CXXFLAGS += [ -+ "-msse2", + "-msse2" + ] + -+if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "FreeBSD": ++ UNIFIED_SOURCES += [ ++ "/third_party/libwebrtc/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc" ++ ] ++ + if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": CXXFLAGS += [ - "-msse2" 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 +index e20d6047c767..a46f9bdb878e 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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/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 +index 1777faaf534c..a52eb83bda14 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 @@ +@@ -63,6 +63,22 @@ 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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = 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 @@ +@@ -157,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" -@@ -173,6 +192,10 @@ +@@ -173,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 -@@ -213,6 +236,12 @@ - - UNIFIED_SOURCES += [ +@@ -215,6 +239,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ 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 +index 0479e8eaa193..69f34c421106 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 @@ +@@ -81,6 +81,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -175,6 +187,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -191,6 +207,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -215,6 +234,12 @@ - - OS_LIBS += [ +@@ -217,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 17012861fcef..118250d7013f 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index ddd457fb8415..fc6ad4d52de2 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 9a225715a87c..18aa11848953 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -156,6 +168,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -172,6 +188,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -198,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 07af234d639b..081ad4e58662 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -167,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" -@@ -183,6 +198,10 @@ +@@ -183,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 -@@ -207,6 +226,12 @@ - - OS_LIBS += [ +@@ -209,6 +229,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/logging/rtc_event_pacing_gn/moz.build third_party/libwebrtc/logging/rtc_event_pacing_gn/moz.build -index 5ce1736a8a..2c2277cfda 100644 +index b962c2be4a51..fe5742af06ac 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 55893f3ff588..84af0e8e2c26 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -165,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" -@@ -181,6 +196,10 @@ +@@ -181,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 -@@ -205,6 +224,12 @@ - - OS_LIBS += [ +@@ -207,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index ab117be3edf3..5799bcb5d771 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -154,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" -@@ -170,6 +185,10 @@ +@@ -170,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 -@@ -194,6 +213,12 @@ - - OS_LIBS += [ +@@ -196,6 +216,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/logging/rtc_stream_config_gn/moz.build third_party/libwebrtc/logging/rtc_stream_config_gn/moz.build -index 6b35e5a077..b1fe6b3bb3 100644 +index 6bc8696aca6e..d970f9b9b398 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/media/rtc_constants_gn/moz.build third_party/libwebrtc/media/rtc_constants_gn/moz.build -index 78cddb03a1..1e857b78e7 100644 +index 70155e01728c..8ce40712d15d 100644 --- third_party/libwebrtc/media/rtc_constants_gn/moz.build +++ third_party/libwebrtc/media/rtc_constants_gn/moz.build -@@ -63,6 +63,17 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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/media/rtc_encoder_simulcast_proxy_gn/moz.build third_party/libwebrtc/media/rtc_encoder_simulcast_proxy_gn/moz.build -index 4f84ca1381..cdc80664ad 100644 +index 4df284311700..fae8e356b01f 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 702a53893e7a..203569bd363e 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 24c16b1ee8ef..921e3e678e81 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index f2ee9ad8bf3b..1d1c00d9400d 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -167,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" -@@ -183,6 +198,10 @@ +@@ -183,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 -@@ -207,6 +226,12 @@ - - OS_LIBS += [ +@@ -209,6 +229,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/media/rtc_media_config_gn/moz.build third_party/libwebrtc/media/rtc_media_config_gn/moz.build -index e559dfd675..d24a1900d9 100644 +index 6f7141a69d8c..5a4b3c4c27eb 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 66faeda499af..440df7c10648 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 51079d89b996..ad8236bc4664 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 2445b95f0595..18fb79d38147 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 98116af0486f..4c1e6f7269e9 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 9919b488aefd..9755e0c44db9 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 17bcc21766cd..92a1ad7792c5 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index fce5ef96958b..b9fbbc0fc4e8 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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_coding/audio_network_adaptor_gn/moz.build third_party/libwebrtc/modules/audio_coding/audio_network_adaptor_gn/moz.build -index b38993845c..4660cc9b91 100644 +index d8f0a9f0a79b..d82cf4afb270 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 @@ +@@ -77,6 +77,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +201,10 @@ +@@ -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 -@@ -210,6 +229,12 @@ - - OS_LIBS += [ +@@ -212,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index ea8b966375da..78044a9a108c 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index e5b7ceb5ddc4..508e73299845 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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 += [ ++ CFLAGS += [ + "-msse2" - ] - ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ 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 +index d7e0bf8ab271..746e16cfe0e7 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -154,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" -@@ -170,6 +185,10 @@ +@@ -170,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 -@@ -194,6 +213,12 @@ - - OS_LIBS += [ +@@ -196,6 +216,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_coding/g722_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/g722_c_gn/moz.build -index 8910ce7cf4..0a1a559212 100644 +index dd562565b805..62028b9a00c2 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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 += [ ++ CFLAGS += [ + "-msse2" - ] - ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ 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 +index bfe44840d3d4..38990e0334d5 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -154,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" -@@ -170,6 +185,10 @@ +@@ -170,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 -@@ -194,6 +213,12 @@ - - OS_LIBS += [ +@@ -196,6 +216,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_coding/ilbc_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/ilbc_c_gn/moz.build -index 165ab4b8ac..1588baf881 100644 +index 0b18a615b4ec..73c163b91b10 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 @@ +@@ -135,6 +135,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -228,6 +240,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -244,6 +260,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -268,6 +287,12 @@ - - OS_LIBS += [ +@@ -270,6 +290,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": "android_support" -+ ] -+ + ] + +if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": + -+ CXXFLAGS += [ ++ CFLAGS += [ + "-msse2" - ] - ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ 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 +index fa5e569665cf..409287ef6630 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index b0d168c1691a..835262ba489b 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index f5594d5dd76d..3ba45953f202 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 @@ +@@ -89,6 +89,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -168,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" -@@ -184,6 +199,10 @@ +@@ -184,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 -@@ -208,6 +227,12 @@ - - OS_LIBS += [ +@@ -210,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 += [ ++ CFLAGS += [ + "-msse2" - ] - ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ 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 +index 79902fe4481d..53c5d4a867af 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/modules/audio_coding/isac_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_gn/moz.build -index 67f836250c..64781830bc 100644 +index 1c32c20085ac..5c91f569f099 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -147,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" -@@ -163,6 +178,10 @@ +@@ -163,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 -@@ -187,6 +206,12 @@ - - OS_LIBS += [ +@@ -189,6 +209,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_coding/isac_vad_gn/moz.build third_party/libwebrtc/modules/audio_coding/isac_vad_gn/moz.build -index b7c99fdd71..0a445df1f7 100644 +index a1a6d15ac826..5cee9c981540 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 @@ +@@ -66,6 +66,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -148,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" -@@ -164,6 +179,10 @@ +@@ -164,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 -@@ -188,6 +207,12 @@ - - OS_LIBS += [ +@@ -190,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 += [ ++ CFLAGS += [ + "-msse2" - ] - ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ 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 +index a9e8e18768c9..21ed6a850ddc 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 063bca6ce97c..e2dd6c9a4eba 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 @@ +@@ -99,6 +99,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -192,6 +204,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -208,6 +224,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -232,6 +251,12 @@ - - OS_LIBS += [ +@@ -234,6 +254,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_coding/pcm16b_c_gn/moz.build third_party/libwebrtc/modules/audio_coding/pcm16b_c_gn/moz.build -index 24cda76b67..99e02a289f 100644 +index 1b4ac252e184..061f5e1fc705 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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 += [ ++ CFLAGS += [ + "-msse2" - ] - ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ 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 +index bf63d4640191..f89e77b94c8a 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -155,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" -@@ -171,6 +186,10 @@ +@@ -171,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 -@@ -195,6 +214,12 @@ - - OS_LIBS += [ +@@ -197,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index f0b4a4acd7e7..afd7975d6821 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index fc3a9aab2030..f056f13b834b 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 24a2a598bd5a..05606be49632 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 @@ +@@ -73,6 +73,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["USE_X11"] = "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 @@ +@@ -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 +195,10 @@ +@@ -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 -@@ -214,6 +234,12 @@ - if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": +@@ -215,6 +236,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ 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 +index 11f36734a170..a1095cd56e6e 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 @@ +@@ -73,6 +73,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["USE_X11"] = "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 @@ +@@ -170,6 +183,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -186,6 +203,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -221,6 +241,12 @@ - if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": +@@ -222,6 +243,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ 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 +index 98971e19c0a3..de4b7d8d3d4f 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 @@ +@@ -72,6 +72,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["USE_X11"] = "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 @@ +@@ -162,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" -@@ -178,6 +194,10 @@ +@@ -178,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 -@@ -213,6 +233,12 @@ - if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": +@@ -214,6 +235,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + CXXFLAGS += [ 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 +index 6a63947c76b2..441d7df748a2 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/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 +index 8186c3d5f287..ec578a48d222 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 3ee7d2fbde98..62d1a12fa5c7 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/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 +index 23b6d1e299db..2f7155057e1f 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 879d7128f7d7..9e85448e63eb 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": +@@ -64,6 +64,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -154,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" -@@ -170,6 +185,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -170,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 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 +index 6e0d09b3de67..c785d268d1b3 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -165,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" -@@ -181,6 +196,10 @@ +@@ -181,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 -@@ -205,6 +224,12 @@ - - OS_LIBS += [ +@@ -207,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" - ] - ++ "-msse2" ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 7dfd0eb082b4..5da8d85e662c 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 405c6767000e..e5ba10a2bacc 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +194,10 @@ +@@ -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 -@@ -203,6 +222,12 @@ - - OS_LIBS += [ +@@ -205,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 3f4d47fd247b..1f3dde135024 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/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 +index 8e9ba114b04a..8c0ee0129508 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -152,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" -@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -168,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 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 +index dd09dca2f8f2..8b9401dfdddf 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": +@@ -77,6 +77,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -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" -@@ -166,6 +181,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -166,6 +182,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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": +@@ -192,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"] == "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 +index 169edba30a48..dc43bc1ef82d 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 0cf4b9a27473..158bddee5cc3 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -152,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" -@@ -168,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -168,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 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 +index 6f8dc432f810..ce7f6081f31b 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 @@ +@@ -121,6 +121,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -214,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" -@@ -230,6 +245,10 @@ +@@ -230,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 -@@ -254,6 +273,12 @@ - - OS_LIBS += [ +@@ -256,6 +276,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/fft_data_gn/moz.build third_party/libwebrtc/modules/audio_processing/aec3/fft_data_gn/moz.build -index d55b326e7c..f3c8f121e9 100644 +index 2c224c5bc66e..9579f747d48a 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/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 +index cfebcec74d3f..803c19d4dae8 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/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 +index 1adddab80679..0fcca4aeca74 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/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 +index 24ed7e7e6c2e..886d234ce80a 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/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 +index f68dd8556d5e..b608a2e3cf67 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/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 +index d6d02f7fb818..225a7088aa7d 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index efdba70e735b..e4bd7d72d20c 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index d01a01958539..8ff70ac3b7d1 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +201,10 @@ +@@ -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 -@@ -210,6 +229,12 @@ - - OS_LIBS += [ +@@ -212,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index b47b5e255eae..0bf147893e67 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index a44e6cb51717..9ea735980f11 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 9efe4caacc58..9177c057bedf 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 95223fd4dd2b..2549a49c4b90 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index cbd43b384337..bf7af8d47d20 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 938a22e55ef5..a748524a893a 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index f8eaa2c972f0..63f91ec0f999 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 6b01fe7a3cf2..7990cefe3666 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index e5a18a7ffd7e..d625aef85e0d 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +194,10 @@ +@@ -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 -@@ -203,6 +222,12 @@ - - OS_LIBS += [ +@@ -205,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 2eef15c4abf3..632577db20b9 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 69205a23fd8b..3c4075a0702a 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 795eb0e43801..bb307f7bd518 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 157295dcf0b3..34a5e5553eea 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 @@ +@@ -75,6 +75,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -168,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" -@@ -184,6 +199,10 @@ +@@ -184,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 -@@ -208,6 +227,12 @@ - - OS_LIBS += [ +@@ -210,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 0a0c9c1c3727..3aaf4b95292f 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index b05acf3b57d9..2e43186fbb14 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index f0cdd4bb49b1..2f17d946eb65 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index ecdebe1342fd..48eea1da0519 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +194,10 @@ +@@ -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 -@@ -203,6 +222,12 @@ - - OS_LIBS += [ +@@ -205,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 252ddd57846a..fedaf0da29d6 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 9e9fdc40f318..12881979cdc9 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/modules/audio_processing/audio_processing_gn/moz.build third_party/libwebrtc/modules/audio_processing/audio_processing_gn/moz.build -index f20b13bd0a..06d3996410 100644 +index 9ed0923d04b9..7208f9db8481 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 @@ +@@ -82,6 +82,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -175,6 +187,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -191,6 +207,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -215,6 +234,12 @@ - - OS_LIBS += [ +@@ -217,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 6622ae5378e3..67991e81e319 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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/config_gn/moz.build third_party/libwebrtc/modules/audio_processing/config_gn/moz.build -index efbaa9991f..01b95bf107 100644 +index da967fbb1dea..13339f97a8af 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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/high_pass_filter_gn/moz.build third_party/libwebrtc/modules/audio_processing/high_pass_filter_gn/moz.build -index 698d52d09c..5790ee2471 100644 +index 5ca53cc37e10..a0456d5efa49 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 225ae5526ac6..4461001328f9 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 @@ +@@ -80,6 +80,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -173,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" -@@ -189,6 +204,10 @@ +@@ -189,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 -@@ -213,6 +232,12 @@ - - OS_LIBS += [ +@@ -215,6 +235,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/optionally_built_submodule_creators_gn/moz.build third_party/libwebrtc/modules/audio_processing/optionally_built_submodule_creators_gn/moz.build -index aaaed22eeb..174e3ec82d 100644 +index e5d3c463b3c5..370cc5a3cb4e 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 0999b3a370c1..3fa083e70b9c 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 76ced54a9c78..e7b587f884c5 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 12b7f3840721..6232c72cfee4 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 01fc02a9178c..8045c03c2f10 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 3b51d9b2dfdd..5d9b07ca2ee3 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -166,6 +181,10 @@ +@@ -166,6 +182,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -190,6 +209,12 @@ - - OS_LIBS += [ +@@ -192,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 61eb9c051a60..ae671ec9b832 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index eb5f5e4dd11a..6961975c3dda 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 @@ +@@ -74,6 +74,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -167,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" -@@ -183,6 +198,10 @@ +@@ -183,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 -@@ -207,6 +226,12 @@ - - OS_LIBS += [ +@@ -209,6 +229,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/voice_detection_gn/moz.build third_party/libwebrtc/modules/audio_processing/voice_detection_gn/moz.build -index bea08f119f..c104d07962 100644 +index 6c3a778c0097..c0519ddd98a3 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 9bdf972c09fc..b7eabacb416c 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +194,10 @@ +@@ -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 -@@ -203,6 +222,12 @@ - - OS_LIBS += [ +@@ -205,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 67533c3f3298..2c4432de09be 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 0bbfdd1eb26e..196220f4735e 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +194,10 @@ +@@ -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 -@@ -203,6 +222,12 @@ - - OS_LIBS += [ +@@ -205,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 4a1273d5ea74..165d69b257b2 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 @@ +@@ -74,6 +74,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -168,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" -@@ -184,6 +199,10 @@ +@@ -184,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 -@@ -208,6 +227,12 @@ - - OS_LIBS += [ +@@ -210,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 1ad9df4e631e..943c1f213058 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +194,10 @@ +@@ -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 -@@ -203,6 +222,12 @@ - - OS_LIBS += [ +@@ -205,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index a9d9e3094da0..7a0319827e7f 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index b2b2f02ac919..5a060b051f9e 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index a65d3776b5ce..32197f39da47 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 30a93699f573..8b7da5576c82 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 658b17534064..25b3b48bb46c 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 6301809b05d5..0a26bd7766ca 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +194,10 @@ +@@ -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 -@@ -203,6 +222,12 @@ - - OS_LIBS += [ +@@ -205,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 45dee13f8f60..ad793675f80e 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": +@@ -54,6 +54,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -116,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" -@@ -128,6 +143,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -128,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 -@@ -140,6 +159,19 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "WINNT": +@@ -144,6 +164,19 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": - DEFINES["_HAS_ITERATOR_DEBUGGING"] = "0" + DEFINES["USE_X11"] = "1" +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 +index a337a370e3c8..df4ee570dcb9 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 -@@ -85,6 +85,59 @@ +@@ -85,6 +85,60 @@ 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["USE_X11"] = "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" -@@ -262,6 +315,10 @@ +@@ -262,6 +316,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_FORTIFY_SOURCE"] = "2" + if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Linux": DEFINES["_FORTIFY_SOURCE"] = "2" -@@ -274,6 +331,10 @@ +@@ -274,6 +332,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -313,6 +374,12 @@ - "/third_party/libwebrtc/modules/desktop_capture/linux/x_error_trap.cc", - "/third_party/libwebrtc/modules/desktop_capture/linux/x_server_pixel_buffer.cc", +@@ -315,6 +377,12 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": "/third_party/libwebrtc/modules/desktop_capture/linux/x_window_property.cc" -+ ] -+ + ] + +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/desktop_capture/desktop_capture_gn/moz.build third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build -index 4cf85ddfa7..0e133b2212 100644 +index 4bf43c55c5b8..261de89c7f1f 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": +@@ -46,6 +46,30 @@ if CONFIG["OS_TARGET"] == "Darwin": DEFINES["__STDC_CONSTANT_MACROS"] = True DEFINES["__STDC_FORMAT_MACROS"] = True +if CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_GLIB"] = "1" ++ DEFINES["USE_X11"] = "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": +@@ -135,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" -@@ -156,6 +183,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -147,6 +175,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 59041730d8d7..56d04b216b0c 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 @@ +@@ -54,6 +54,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -117,6 +129,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -129,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 -@@ -144,6 +163,12 @@ - if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": +@@ -145,6 +165,12 @@ if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["USE_X11"] = "1" -+ + +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/module_api_gn/moz.build third_party/libwebrtc/modules/module_api_gn/moz.build -index 18dcb08135..e60a418a5c 100644 +index cc26925123f8..a51d97fc676e 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 3949c1a2b699..2ad7653ed01a 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index b515f56396db..0a3e28ef72c7 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 05dce6370410..b32bebf718a3 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/modules/pacing/pacing_gn/moz.build third_party/libwebrtc/modules/pacing/pacing_gn/moz.build -index f6fde08638..01d969c0c9 100644 +index 9650568f3264..99d9ecb75881 100644 --- third_party/libwebrtc/modules/pacing/pacing_gn/moz.build +++ third_party/libwebrtc/modules/pacing/pacing_gn/moz.build -@@ -73,6 +73,17 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -167,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" -@@ -183,6 +198,10 @@ +@@ -183,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 -@@ -207,6 +226,12 @@ - - OS_LIBS += [ +@@ -209,6 +229,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/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 +index 80299c856e91..8d33e78a2553 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 @@ +@@ -79,6 +79,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -173,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" -@@ -189,6 +204,10 @@ +@@ -189,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 -@@ -213,6 +232,12 @@ - - OS_LIBS += [ +@@ -215,6 +235,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/rtp_rtcp/rtp_rtcp_format_gn/moz.build third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_format_gn/moz.build -index a5ec9f4951..e036ba0402 100644 +index dcc5ada67970..c25283a04393 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 @@ +@@ -109,6 +109,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -203,6 +215,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -219,6 +235,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -243,6 +262,12 @@ - - OS_LIBS += [ +@@ -245,6 +265,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/rtp_rtcp/rtp_rtcp_gn/moz.build third_party/libwebrtc/modules/rtp_rtcp/rtp_rtcp_gn/moz.build -index 33a43eeed5..13217b736d 100644 +index 798b0a5ff305..a10386c6a2f0 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 @@ +@@ -121,6 +121,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -215,6 +227,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -231,6 +247,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -255,6 +274,12 @@ - - OS_LIBS += [ +@@ -257,6 +277,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/rtp_rtcp/rtp_video_header_gn/moz.build third_party/libwebrtc/modules/rtp_rtcp/rtp_video_header_gn/moz.build -index aee62695af..087ee836d1 100644 +index c45fc2f0d200..a81c714be9cc 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 46db193aaee8..c93d28742e4e 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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 += [ ++ CFLAGS += [ + "-msse2" - ] - ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ 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 +index fdfdc1fbafa1..31b5ace5e0c9 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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 += [ ++ CFLAGS += [ + "-msse2" - ] - ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ 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 0fb10bee4bc4..2a811f40f750 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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 += [ ++ CFLAGS += [ + "-msse2" - ] - ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ diff --git third_party/libwebrtc/modules/utility/utility_gn/moz.build third_party/libwebrtc/modules/utility/utility_gn/moz.build -index e0b16b4073..5881ab6869 100644 +index 9021063ce8da..f1fab6d7170f 100644 --- third_party/libwebrtc/modules/utility/utility_gn/moz.build +++ third_party/libwebrtc/modules/utility/utility_gn/moz.build -@@ -72,6 +72,17 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -165,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" -@@ -181,6 +196,10 @@ +@@ -181,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 -@@ -205,6 +224,12 @@ - - OS_LIBS += [ +@@ -207,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index a310bfe12e65..62be8f11aa00 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 @@ +@@ -64,6 +64,23 @@ if CONFIG["OS_TARGET"] == "Darwin": DEFINES["__STDC_CONSTANT_MACROS"] = True DEFINES["__STDC_FORMAT_MACROS"] = True +if CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_GLIB"] = "1" ++ DEFINES["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = 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 @@ +@@ -179,6 +196,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -195,6 +216,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -215,6 +239,12 @@ - - OS_LIBS += [ +@@ -217,6 +242,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/video_capture/video_capture_module_gn/moz.build third_party/libwebrtc/modules/video_capture/video_capture_module_gn/moz.build -index 86bc0e277d..c0f82da6ef 100644 +index 15fe84223483..a530c52a66b3 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -166,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" -@@ -182,6 +197,10 @@ +@@ -182,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 -@@ -206,6 +225,12 @@ - - OS_LIBS += [ +@@ -208,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 92fc169bfa14..e7a9a7935d03 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 8ade002d0183..7bd98812e223 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/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 +index 6ae532c089c3..8c9264044d54 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 463f2a08ee63..512e6150c0ae 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 4aad533a809c..07c2d78fda22 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index af78e013468e..20b730aad06d 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 2dc04e5a9cf9..bb721d0a23f8 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 57a43caa16cd..319ba78eaf56 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -161,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" -@@ -177,6 +192,10 @@ +@@ -177,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 -@@ -201,6 +220,12 @@ - - OS_LIBS += [ +@@ -203,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 0a87d813647e..46196bdd271f 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +194,10 @@ +@@ -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 -@@ -203,6 +222,12 @@ - - OS_LIBS += [ +@@ -205,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" - ] - ++ "-msse2" ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 3e4ab79641cd..1c62a7c7c6b6 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 @@ +@@ -88,6 +88,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -182,6 +194,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -198,6 +214,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -222,6 +241,12 @@ - - OS_LIBS += [ +@@ -224,6 +244,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/video_coding/video_coding_utility_gn/moz.build third_party/libwebrtc/modules/video_coding/video_coding_utility_gn/moz.build -index b6e4b928cf..aef33114b0 100644 +index 9e6b6df5948b..66f5abaf5321 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 @@ +@@ -77,6 +77,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -171,6 +183,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -187,6 +203,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -213,6 +233,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/video_coding/webrtc_h264_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_h264_gn/moz.build -index 2dced7c944..efa5dcadbb 100644 +index 4ae92da9a8fa..5a35d818a775 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -167,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" -@@ -183,6 +198,10 @@ +@@ -183,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 -@@ -207,6 +226,12 @@ - - OS_LIBS += [ +@@ -209,6 +229,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/video_coding/webrtc_multiplex_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_multiplex_gn/moz.build -index 35b41b3c67..f82513bdc4 100644 +index e2ab1612c3c1..5185eb5a05b0 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -165,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" -@@ -181,6 +196,10 @@ +@@ -181,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 -@@ -205,6 +224,12 @@ - - OS_LIBS += [ +@@ -207,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 2ae04231ee01..30f7f1d5c184 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -166,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" -@@ -182,6 +197,10 @@ +@@ -182,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 -@@ -206,6 +225,12 @@ - - OS_LIBS += [ +@@ -208,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 3d3414fadfe1..6d602facfdde 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -167,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" -@@ -183,6 +198,10 @@ +@@ -183,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 -@@ -207,6 +226,12 @@ - - OS_LIBS += [ +@@ -209,6 +229,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/video_coding/webrtc_vp9_gn/moz.build third_party/libwebrtc/modules/video_coding/webrtc_vp9_gn/moz.build -index cd75be3c84..9d1ce64bba 100644 +index 47791807b58c..086038e359e8 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -164,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" -@@ -180,6 +195,10 @@ +@@ -180,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 -@@ -204,6 +223,12 @@ - - OS_LIBS += [ +@@ -206,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 90ce8177ccaa..5d0416fe28bd 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +194,10 @@ +@@ -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 -@@ -203,6 +222,12 @@ - - OS_LIBS += [ +@@ -205,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 943d2880e350..35f5ca6d1574 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 3d850cb742c1..635c679a60da 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 @@ +@@ -74,6 +74,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -168,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" -@@ -184,6 +199,10 @@ +@@ -184,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 -@@ -208,6 +227,12 @@ - - OS_LIBS += [ +@@ -210,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 3502df6640a3..8a5d8f455d4f 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": +@@ -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["USE_X11"] = "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["USE_AURA"] = "1" +@@ -131,6 +144,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -143,6 +160,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index da44c9b360ab..985bf2d12081 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": +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -148,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" -@@ -164,6 +179,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -164,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 -@@ -193,6 +212,19 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Android": +@@ -197,6 +217,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 +index 11313553ede4..ee4cf1c70d14 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 +index 0f2278b14022..5612c44e9e73 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 6fde827159a2..d3afdcc420f6 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/rtc_base/checks_gn/moz.build third_party/libwebrtc/rtc_base/checks_gn/moz.build -index cd0f53f896..9bc0698b2a 100644 +index 5fdd263725eb..c385eb05e46d 100644 --- third_party/libwebrtc/rtc_base/checks_gn/moz.build +++ third_party/libwebrtc/rtc_base/checks_gn/moz.build -@@ -67,6 +67,17 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index cc9fb4afeeb7..358af6937a47 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index dc7af0cc7b4e..5b6a97914d13 100644 --- third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build +++ third_party/libwebrtc/rtc_base/criticalsection_gn/moz.build -@@ -67,6 +67,17 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/rtc_base/deprecation_gn/moz.build third_party/libwebrtc/rtc_base/deprecation_gn/moz.build -index e270de4c35..e3ba310b6f 100644 +index e576ec263e33..f0986a3bd2d0 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index ee977f0b91f7..8f8d56d658ba 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/rtc_base/experiments/alr_experiment_gn/moz.build third_party/libwebrtc/rtc_base/experiments/alr_experiment_gn/moz.build -index 82b2d0f65b..5c95c7e43a 100644 +index 5076aa3951db..b8ee320a0e62 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index c48685df8e03..78a27d0efddd 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 5f2f908122bf..7ce9c47f10da 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index bf646534f8f8..f9dd309d8cf3 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -156,6 +168,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -172,6 +188,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -198,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index ed518edf357e..28796ebf9568 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 7df6c18a56f4..2e5f8e4e2d47 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 35a5009b34ea..abd9bb149720 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 2c99c2c421d4..319ae51143b9 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index b528e59e49a7..8dc3f18273bb 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 9eaaf07e6765..5874c42d75d3 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 3e07bebe0728..9cb798710726 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 75793c100c1b..c762b39da093 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 18f87abc115d..e1f34dc446f5 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index b837b3be93e4..3c29ace274c5 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index c9bd4aaf7cce..1778c8910649 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 4ddf3d502c67..8e0a387efa26 100644 --- third_party/libwebrtc/rtc_base/logging_gn/moz.build +++ third_party/libwebrtc/rtc_base/logging_gn/moz.build -@@ -67,6 +67,17 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/rtc_base/macromagic_gn/moz.build third_party/libwebrtc/rtc_base/macromagic_gn/moz.build -index bf9b26b06d..f400c123d1 100644 +index 3e73fcc95526..801274649bb5 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 601a6b8f2e06..782efcccd542 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 8be1fae0a0c0..720f0931d3fc 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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/rtc_base/platform_thread_gn/moz.build third_party/libwebrtc/rtc_base/platform_thread_gn/moz.build -index 27d304aa8a..4e0da258de 100644 +index b6293be69792..b68d967de875 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index eb194f6ed06e..5adbd7cf775b 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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/rtc_base/protobuf_utils_gn/moz.build third_party/libwebrtc/rtc_base/protobuf_utils_gn/moz.build -index 29bb85689a..51a5a79011 100644 +index f97f10d57ab0..55dd021acb7b 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 26c5559e1a30..baadf7fc54f3 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ - - OS_LIBS += [ +@@ -202,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/rtc_base/refcount_gn/moz.build third_party/libwebrtc/rtc_base/refcount_gn/moz.build -index 0bb1831752..e1e97a1c61 100644 +index 5940fcf85e96..b9d96b70b765 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 3e717cd1514e..71ba1ead7d69 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 @@ +@@ -80,6 +80,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +201,10 @@ +@@ -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 -@@ -210,6 +229,12 @@ - - OS_LIBS += [ +@@ -212,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 329aeaeead7a..32274c815a64 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 @@ +@@ -94,6 +94,22 @@ if CONFIG["OS_TARGET"] == "Darwin": "/third_party/libwebrtc/rtc_base/mac_ifaddrs_converter.cc" ] +if CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_GLIB"] = "1" ++ DEFINES["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = 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 @@ +@@ -203,6 +219,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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 @@ +@@ -219,6 +239,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -243,6 +266,12 @@ - - OS_LIBS += [ +@@ -245,6 +269,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/rtc_base/rtc_event_gn/moz.build third_party/libwebrtc/rtc_base/rtc_event_gn/moz.build -index 76376fd45d..a299d4f539 100644 +index af655f6cdd2f..f93f5340f469 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 7132b7de4c65..2e92d7344341 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 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -155,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" -@@ -171,6 +186,10 @@ +@@ -171,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 -@@ -195,6 +214,12 @@ - - OS_LIBS += [ +@@ -197,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index cb528e769092..cd0e19301272 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 4b03f7145e97..7c825e4608c1 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 719f61950dd9..19cab3746d29 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/rtc_base/safe_minmax_gn/moz.build third_party/libwebrtc/rtc_base/safe_minmax_gn/moz.build -index cced167265..3a03342908 100644 +index 9dab259015b2..d30709ad50e4 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/rtc_base/sanitizer_gn/moz.build third_party/libwebrtc/rtc_base/sanitizer_gn/moz.build -index 5e7a5ecc50..5d37d4610f 100644 +index 6ad477795ef6..72f60a087101 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index dd57b533a6ee..3ab60bc2433a 100644 --- third_party/libwebrtc/rtc_base/stringutils_gn/moz.build +++ third_party/libwebrtc/rtc_base/stringutils_gn/moz.build -@@ -71,6 +71,17 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 28a348f23b38..f1e461427937 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index bba961a57406..b36abfe0f431 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 @@ +@@ -71,6 +71,22 @@ 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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = 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 @@ +@@ -169,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" -@@ -185,6 +204,10 @@ +@@ -185,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 -@@ -209,6 +232,12 @@ - - OS_LIBS += [ +@@ -211,6 +235,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/rtc_base/synchronization/sequence_checker_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/sequence_checker_gn/moz.build -index 5ec0cff625..5d5103a811 100644 +index 88ca07fad511..04aff66fe6ce 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 29e8fea9bb64..52a10290862f 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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/rtc_base/synchronization/yield_policy_gn/moz.build third_party/libwebrtc/rtc_base/synchronization/yield_policy_gn/moz.build -index 5939126563..3d272a6f47 100644 +index bbe945437b4a..b112811f5be5 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 34b3e7ce3f03..70d4d54a080e 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 4270970a6caf..f5f8017e0ea7 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index a309c892c7b2..ae730662b413 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 560b2c6c8a2a..8a1ca508f7d4 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 808489cd5377..c2c5d71ce33d 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 839aa9fd442f..455fad587b89 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -145,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" -@@ -161,6 +176,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -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/rtc_base/system/unused_gn/moz.build third_party/libwebrtc/rtc_base/system/unused_gn/moz.build -index 0b8030c571..99f9f67bd6 100644 +index 2e07907d9bd6..84c342e4205f 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index c7f38056fefe..de6ea9995e0f 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 9ce3ee38ebc2..15ab4fd4c17d 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 4565e236463e..cf4e034b9d1a 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -160,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" -@@ -176,6 +191,10 @@ +@@ -176,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 -@@ -200,6 +219,12 @@ +@@ -202,6 +222,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": + "android_support" + ] - OS_LIBS += [ - "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/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 +index 94eb61355690..65b1605d357a 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/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 +index d9860d658db2..a6f6f0ad62d9 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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/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 +index f1565d997d35..ddcee9314727 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -145,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" -@@ -161,6 +176,10 @@ +@@ -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 -@@ -185,6 +204,12 @@ - - OS_LIBS += [ +@@ -187,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/rtc_base/thread_checker_gn/moz.build third_party/libwebrtc/rtc_base/thread_checker_gn/moz.build -index eb1c598134..3b4bd04a61 100644 +index 2854447fc96b..fe22df70bbef 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/rtc_base/time/timestamp_extrapolator_gn/moz.build third_party/libwebrtc/rtc_base/time/timestamp_extrapolator_gn/moz.build -index 7dd65b9bb4..9ecca631cd 100644 +index dbdeabc46618..19c81e523ffc 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 @@ +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/rtc_base/timeutils_gn/moz.build third_party/libwebrtc/rtc_base/timeutils_gn/moz.build -index 39632fc6d5..0224cebffc 100644 +index 86ae9ca6a443..63d80e45ef47 100644 --- third_party/libwebrtc/rtc_base/timeutils_gn/moz.build +++ third_party/libwebrtc/rtc_base/timeutils_gn/moz.build -@@ -69,6 +69,17 @@ +@@ -69,6 +69,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -155,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" -@@ -171,6 +186,10 @@ +@@ -171,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 -@@ -195,6 +214,12 @@ - - OS_LIBS += [ +@@ -197,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index dc45b6a74d26..793d754ec4f6 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": +@@ -59,6 +59,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -137,6 +149,10 @@ if not CONFIG["MOZ_DEBUG"] and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_FORTIFY_SOURCE"] = "2" +if not CONFIG["MOZ_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": +@@ -153,6 +169,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 9c760fe00b9e..7aa0672ec4c3 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": +@@ -63,6 +63,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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": +@@ -141,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" -@@ -157,6 +172,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -157,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/rtc_base/weak_ptr_gn/moz.build third_party/libwebrtc/rtc_base/weak_ptr_gn/moz.build -index a9a520b2bc..507a1f5c53 100644 +index ff01c7b9dccd..faae6f06aff5 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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" -@@ -165,6 +180,10 @@ +@@ -165,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 -@@ -189,6 +208,12 @@ - - OS_LIBS += [ +@@ -191,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 0850c19cc547..03bc05e949f4 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 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/system_wrappers/metrics_gn/moz.build third_party/libwebrtc/system_wrappers/metrics_gn/moz.build -index 0edfd92501..c3e0662ddc 100644 +index 1af4cfb73ea0..72587bfd04c6 100644 --- third_party/libwebrtc/system_wrappers/metrics_gn/moz.build +++ third_party/libwebrtc/system_wrappers/metrics_gn/moz.build -@@ -67,6 +67,17 @@ +@@ -67,6 +67,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -153,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" -@@ -169,6 +184,10 @@ +@@ -169,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 -@@ -193,6 +212,12 @@ - - OS_LIBS += [ +@@ -195,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index b2db1033c0c2..fa9d4673a73c 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 @@ +@@ -77,6 +77,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -174,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" -@@ -190,6 +205,10 @@ +@@ -190,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 -@@ -214,6 +233,12 @@ - - OS_LIBS += [ +@@ -216,6 +236,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/test/rtp_test_utils_gn/moz.build third_party/libwebrtc/test/rtp_test_utils_gn/moz.build -index c222e6a3af..1379660d79 100644 +index 6d55c4efca50..832868bfc02c 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index e7ec08362c24..f2b5b71ae69a 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 459f50119e8b..0d815459ed2b 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 88c576bac924..1f10b01ac3fa 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index b6dbc4831206..6064d1afef6d 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index d60a3ca6b7ed..49a9d2b65d50 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 85745df10c47..681f4b22e070 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 44ab35fde497..94bcbae1581c 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 @@ +@@ -48,6 +48,14 @@ 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["USE_X11"] = "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 @@ +@@ -113,6 +121,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -139,6 +151,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/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 +index d5e6e2bf6d20..579f4ccca507 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 @@ +@@ -48,6 +48,14 @@ 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["USE_X11"] = "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 @@ +@@ -113,6 +121,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -139,6 +151,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/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 +index b3b0e076fbff..31847b3fe52a 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 8ebc5b523840..49655a97a232 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 59b6d217a4f9..e42c17269f3f 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 421f42ed6ac6..4c550cf75754 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index f9e9fe1859b3..3edb6e26bb9a 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index e3ea4178efc9..53af047d3ec1 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 39badc7e0341..10e847de8f0a 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 @@ +@@ -48,6 +48,14 @@ 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["USE_X11"] = "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 @@ +@@ -113,6 +121,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -139,6 +151,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/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 +index 7e46bc347c15..5c8e81a1e33b 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 @@ +@@ -50,6 +50,14 @@ 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["USE_X11"] = "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 @@ +@@ -115,6 +123,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -139,6 +150,12 @@ - - OS_LIBS += [ +@@ -141,6 +153,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/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 +index 0930e8268321..06f4c57d939e 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 @@ +@@ -63,6 +63,14 @@ 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["USE_X11"] = "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 @@ +@@ -128,6 +136,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -152,6 +163,12 @@ - - OS_LIBS += [ +@@ -154,6 +166,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/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 +index 3a9117056235..e5c3cee2db83 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 @@ +@@ -48,6 +48,14 @@ 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["USE_X11"] = "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 @@ +@@ -113,6 +121,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -139,6 +151,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/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 +index 5808130012ea..b6c189186518 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 @@ +@@ -48,6 +48,14 @@ 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["USE_X11"] = "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 @@ +@@ -113,6 +121,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 @@ - - OS_LIBS += [ +@@ -139,6 +151,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/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 +index 175ea37f849c..f25d808dbbd8 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 106d55b1407d..9fee5781b0bf 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 9ba72b7037e9..9f2e9bc6c69d 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index 216ae1445304..d4dcd7b36fa4 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": +@@ -44,6 +44,14 @@ 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["USE_X11"] = "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": +@@ -105,6 +113,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["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 +index c43237502665..16e4c3b016c6 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 @@ +@@ -49,6 +49,16 @@ if CONFIG["OS_TARGET"] == "Darwin": DEFINES["__STDC_CONSTANT_MACROS"] = True DEFINES["__STDC_FORMAT_MACROS"] = True +if CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_GLIB"] = "1" ++ DEFINES["USE_X11"] = "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 @@ +@@ -117,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" -@@ -133,6 +146,10 @@ +@@ -133,6 +147,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": DEFINES["_DEBUG"] = True +if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["_DEBUG"] = True + if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Linux": DEFINES["_DEBUG"] = True -@@ -157,6 +174,12 @@ - - OS_LIBS += [ +@@ -159,6 +177,12 @@ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android": "android_support" -+ ] -+ + ] + +if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "FreeBSD": + -+ CXXFLAGS += [ ++ CFLAGS += [ + "-msse2" - ] - ++ ] ++ if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CFLAGS += [ 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 +index 03a23911d300..bcecb6cbdf2b 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 @@ +@@ -49,6 +49,16 @@ if CONFIG["OS_TARGET"] == "Darwin": DEFINES["__STDC_CONSTANT_MACROS"] = True DEFINES["__STDC_FORMAT_MACROS"] = True +if CONFIG["OS_TARGET"] == "FreeBSD": + + DEFINES["USE_GLIB"] = "1" ++ DEFINES["USE_X11"] = "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 @@ +@@ -116,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" -@@ -132,6 +145,10 @@ +@@ -132,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 -@@ -156,6 +173,12 @@ - - OS_LIBS += [ +@@ -158,6 +176,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/video/adaptation/video_adaptation_gn/moz.build third_party/libwebrtc/video/adaptation/video_adaptation_gn/moz.build -index 1490845fcf..00e22b881a 100644 +index 29b48f1806dc..226ea02c507a 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 @@ +@@ -75,6 +75,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -169,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" -@@ -185,6 +200,10 @@ +@@ -185,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 -@@ -209,6 +228,12 @@ - - OS_LIBS += [ +@@ -211,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ 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 +index 69f17d6ac507..29bb5f3e934e 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 @@ +@@ -68,6 +68,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -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 +193,10 @@ +@@ -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 -@@ -202,6 +221,12 @@ - - OS_LIBS += [ +@@ -204,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"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + + CXXFLAGS += [ diff --git third_party/libwebrtc/video/video_gn/moz.build third_party/libwebrtc/video/video_gn/moz.build -index c361d527ed..b37479a9be 100644 +index 279acd20f733..a9b92a87e4c2 100644 --- third_party/libwebrtc/video/video_gn/moz.build +++ third_party/libwebrtc/video/video_gn/moz.build -@@ -97,6 +97,17 @@ +@@ -97,6 +97,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -191,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" -@@ -207,6 +222,10 @@ +@@ -207,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 -@@ -231,6 +250,12 @@ - - OS_LIBS += [ +@@ -233,6 +253,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/video/video_stream_encoder_impl_gn/moz.build third_party/libwebrtc/video/video_stream_encoder_impl_gn/moz.build -index 71efcab220..43c68adedd 100644 +index d6aa75d2b9b5..55b3a673307a 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 @@ +@@ -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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = True + DEFINES["_FILE_OFFSET_BITS"] = "64" + DEFINES["_LARGEFILE64_SOURCE"] = 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 @@ +@@ -167,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" -@@ -183,6 +198,10 @@ +@@ -183,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 -@@ -207,6 +226,12 @@ - - OS_LIBS += [ +@@ -209,6 +229,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/webrtc_gn/moz.build third_party/libwebrtc/webrtc_gn/moz.build -index 625bd0b5dd..4dddfea2fd 100644 +index 72e51bf251f7..35d8ffb0923a 100644 --- third_party/libwebrtc/webrtc_gn/moz.build +++ third_party/libwebrtc/webrtc_gn/moz.build -@@ -64,6 +64,28 @@ if CONFIG["OS_TARGET"] == "Darwin": +@@ -64,6 +64,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["USE_X11"] = "1" + DEFINES["WEBRTC_BSD"] = True + DEFINES["WEBRTC_POSIX"] = 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": +@@ -172,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" -@@ -196,6 +222,10 @@ if CONFIG["MOZ_DEBUG"] == "1" and CONFIG["OS_TARGET"] == "Darwin": +@@ -188,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