# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/firefox/hotfix-ia64-webrtc-gn.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- # # libwebrtc's moz.build files are generated from GN and enumerate sources, # DIRS and DEFINES per (OS_TARGET, TARGET_CPU). ia64 is unknown to upstream # GN, so every arch-gated block skips it: the SPL C fallbacks # (WebRtcSpl_SqrtFloor, WebRtcSpl_ComplexFFT/IFFT, WebRtcSpl_ComplexBitReverse, # WebRtcSpl_FilterARFastQ12) are never compiled, and the desktop_capture / # primitives libraries are never even added to DIRS -- leaving libxul.so with # undefined references to webrtc::DesktopCaptureOptions, webrtc::DesktopCapturer, # webrtc::BasicDesktopFrame, etc. (The GPREL22 relocation overflow that used to # mask this link failure is fixed separately in gcc; see # package/*/gcc/hotfix-ia64-gprel22-constpool.patch.) # # ia64 is a 64-bit little-endian, non-SIMD Linux target, exactly like ppc64 # here (endianness itself is handled in rtc_base/system/arch.h, patched by # hotfix-ia64-webrtc-arch.patch). ppc64 selects the generic C signal-processing # sources and the X11-only desktop capturer (no Wayland/PipeWire/portal/libepoxy # dependency), which suits the ia64 bring-up. Mirror each ppc64-gated block for # ia64 in the five affected moz.build files. --- firefox-152.0.5/third_party/libwebrtc/moz.build.vanilla 2026-07-12 19:13:00.804031998 +0200 +++ firefox-152.0.5/third_party/libwebrtc/moz.build 2026-07-12 19:13:00.806197961 +0200 @@ -761,6 +761,13 @@ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn" ] +if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "ia64": + + DIRS += [ + "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", + "/third_party/libwebrtc/modules/desktop_capture/primitives_gn" + ] + if CONFIG["MOZ_X11"] == "1" and CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"] == "riscv64": DIRS += [ --- firefox-152.0.5/third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build.vanilla 2026-07-12 19:13:00.811877322 +0200 +++ firefox-152.0.5/third_party/libwebrtc/third_party/pffft/pffft_gn/moz.build 2026-07-12 19:13:00.813198080 +0200 @@ -128,6 +128,10 @@ DEFINES["PFFFT_SIMD_DISABLE"] = True +if CONFIG["TARGET_CPU"] == "ia64": + + DEFINES["PFFFT_SIMD_DISABLE"] = True + if CONFIG["TARGET_CPU"] == "riscv64": DEFINES["PFFFT_SIMD_DISABLE"] = True --- firefox-152.0.5/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build.vanilla 2026-07-12 19:13:00.819315738 +0200 +++ firefox-152.0.5/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_gn/moz.build 2026-07-12 19:13:00.821198215 +0200 @@ -180,6 +180,12 @@ "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" ] +if CONFIG["TARGET_CPU"] == "ia64": + + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c" + ] + if CONFIG["TARGET_CPU"] == "x86": DEFINES["WEBRTC_ENABLE_AVX2"] = True --- firefox-152.0.5/third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build.vanilla 2026-07-12 19:13:00.826868831 +0200 +++ firefox-152.0.5/third_party/libwebrtc/common_audio/common_audio_c_gn/moz.build 2026-07-12 19:13:00.828896032 +0200 @@ -250,6 +250,14 @@ "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" ] +if CONFIG["TARGET_CPU"] == "ia64": + + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/common_audio/signal_processing/complex_bit_reverse.c", + "/third_party/libwebrtc/common_audio/signal_processing/complex_fft.c", + "/third_party/libwebrtc/common_audio/signal_processing/filter_ar_fast_q12.c" + ] + if CONFIG["TARGET_CPU"] == "x86": DEFINES["WEBRTC_ENABLE_AVX2"] = True --- firefox-152.0.5/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build.vanilla 2026-07-12 19:13:00.834383581 +0200 +++ firefox-152.0.5/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn/moz.build 2026-07-12 19:13:00.836198470 +0200 @@ -383,6 +383,32 @@ "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" ] +if CONFIG["TARGET_CPU"] == "ia64": + + DEFINES["WEBRTC_USE_X11"] = True + + OS_LIBS += [ + "X11", + "Xcomposite", + "Xdamage", + "Xext", + "Xfixes", + "Xrandr", + "Xrender" + ] + + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/x11/screen_capturer_x11.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/x11/shared_x_display.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_capturer_x11.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_finder_x11.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/x11/window_list_utils.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_atom_cache.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc", + "/third_party/libwebrtc/modules/desktop_capture/linux/x11/x_window_property.cc" + ] + if CONFIG["TARGET_CPU"] == "x86": DEFINES["WEBRTC_ENABLE_AVX2"] = True