From 69510db0506067e3b711bdd4bef180812009286d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 1 Feb 2024 14:25:58 +0100 Subject: [PATCH] Build with enable-replace-malloc on intel only --- firefox-mozconfig | 1 - firefox.spec | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/firefox-mozconfig b/firefox-mozconfig index cac0e76..676a0e0 100644 --- a/firefox-mozconfig +++ b/firefox-mozconfig @@ -16,7 +16,6 @@ ac_add_options --enable-js-shell ac_add_options --with-unsigned-addon-scopes=app,system ac_add_options --without-sysroot ac_add_options --without-wasm-sandboxed-libraries -ac_add_options --enable-replace-malloc export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/firefox.spec b/firefox.spec index 0912a62..ee54f8a 100644 --- a/firefox.spec +++ b/firefox.spec @@ -29,6 +29,11 @@ ExcludeArch: i686 %global system_libevent 1 %global build_with_asan 0 %global test_on_wayland 0 +%ifarch x86_64 %{ix86} +%global enable_replace_malloc 1 +%else +%global enable_replace_malloc 0 +%endif %if "%{toolchain}" == "clang" %global build_with_clang 1 @@ -437,7 +442,9 @@ BuildRequires: pciutils-libs BuildRequires: mesa-libgbm-devel BuildRequires: libproxy-devel # Required for --enable-replace-malloc +%if %{enable_replace_malloc} BuildRequires: libstdc++-static +%endif Obsoletes: mozilla <= 37:1.7.13 Provides: webclient @@ -690,6 +697,10 @@ echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key # where to look echo "ac_add_options --with-libclang-path=`llvm-config --libdir`" >> .mozconfig +%if %{enable_replace_malloc} +ac_add_options --enable-replace-malloc +%endif + echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig # Remove executable bit to make brp-mangle-shebangs happy.