@@ -81,6 +81,7 @@ git apply "$COMMAND_DIR/patches/fix_payload_type_picker_compile.patch" -v --igno
8181git apply " $COMMAND_DIR /patches/fix_pipewire_utils_compile.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
8282git apply " $COMMAND_DIR /patches/fix_ssl_stream_adapter_compile.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
8383git apply " $COMMAND_DIR /patches/fix_copy_on_write_buffer_compile.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
84+ git apply " $COMMAND_DIR /patches/fix_rtp_config_compile.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
8485
8586# Disable CREL (compact relocations). Chromium's build enables experimental
8687# CREL via -Wa,--crel which causes segfaults on aarch64-linux (and is known
111112# Note: use_clang_modules=false is required to avoid C++ module compilation issues.
112113# Without this flag, the build may fail partway through, resulting in missing
113114# or incomplete artifacts.
115+ #
116+ # Note: use_sysroot=false is required because use_custom_libcxx=false makes the
117+ # public API's ABI depend on whichever libstdc++ built it. m150 uses std::span
118+ # by value across that API (it replaced rtc::ArrayView), and libstdc++ reordered
119+ # std::span's members: the bundled debian_bullseye sysroot (GCC 10) lays it out
120+ # as {extent, ptr} while GCC >= 14 uses {ptr, extent}. Since std::span is 16
121+ # bytes and trivially copyable it is passed in two registers, so building
122+ # against the sysroot while webrtc-sys compiles with the system compiler swaps
123+ # pointer and size on every such call. Building against the system libstdc++
124+ # keeps both sides consistent.
114125args=" is_debug=$debug \
115126 target_os=\" linux\" \
116127 target_cpu=\" $arch \" \
117128 rtc_enable_protobuf=false \
118129 treat_warnings_as_errors=false \
119130 use_llvm_libatomic=false \
131+ use_sysroot=false \
120132 use_custom_libcxx=false \
121133 use_custom_libcxx_for_host=false \
122134 use_clang_modules=false \
0 commit comments