diff --git a/firefox.spec b/firefox.spec index 301bc55f346627450593b35ccb61f95744e4f4ac..ba6977f875ac7e0fc52df9a44487ac41153191ac 100644 --- a/firefox.spec +++ b/firefox.spec @@ -26,6 +26,7 @@ %global system_drm 0 %global use_pipewire_camera 0 %global use_gcc_ts 0 +%global use_bundled_cbindgen 1 # TODO: Revert this after SM2 & SM3 issue is fixed %global system_nss 0 @@ -58,7 +59,7 @@ Summary: Mozilla Firefox Web browser Name: firefox Version: 140.4.0 -Release: 2 +Release: 3 URL: https://www.mozilla.org/firefox/ License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.0-or-later Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz @@ -189,6 +190,10 @@ BuildRequires: mesa-libgbm-devel BuildRequires: pipewire-devel %endif +%if !0%{?use_bundled_cbindgen} +BuildRequires: rust-cbindgen +%endif + BuildRequires: cargo BuildRequires: %{llvm}-clang-devel >= %{llvm_version} BuildRequires: %{llvm}-clang >= %{llvm_version} @@ -612,6 +617,8 @@ which ld which nasm which node which python3 + +%if 0%{?use_bundled_cbindgen} # Bundled cbindgen mkdir -p my_rust_vendor cd my_rust_vendor @@ -632,6 +639,7 @@ export PATH=`pwd`/.cargo/bin:$PATH cd - # end of Bundled cbindgen +%endif mkdir %{_buildrootdir}/bin || : chmod a+x %{SOURCE32} @@ -655,11 +663,12 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g0/') export MOZ_DEBUG_FLAGS=" " %endif +MOZ_LINK_FLAGS="%{?build_ldflags}" ### NOTE: these sections are not required anymore. Alson --no-keep-memory + -Wl,-z,pack-relative-relocs causes ### ld to go OOM (https://sourceware.org/bugzilla/show_bug.cgi?id=30756) # Limit RAM usage during link #%ifarch s390x aarch64 %{ix86} -#MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" #%endif %if 0%{?flatpak} @@ -1012,6 +1021,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %endif %changelog +* Wed Oct 22 2025 Funda Wang - 140.4.0-3 +- support building with system cbindgen +- build with system ldflags + * Tue Oct 21 2025 Peng Haitao - 140.4.0-2 - Modify openEuler to %{vendor}