From f679bd2f5a247761febd6b1ad5132cab4e5629d2 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Wed, 14 Apr 2021 19:33:21 +0200 Subject: [PATCH] reduce opt-level on %{ix86} to fix build for whatever reason build crashes with opt-level > 1: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc error: could not compile `adblock`. --- python3-adblock.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/python3-adblock.spec b/python3-adblock.spec index b612f66..d3dc9b3 100644 --- a/python3-adblock.spec +++ b/python3-adblock.spec @@ -52,11 +52,14 @@ directory = '$PWD/vendor' EOF %build -CARGO_HOME="$(pwd)/.cargo" \ -CARGO_NET_OFFLINE=true \ -CARGO_TERM_VERBOSE=true \ -%{?__jobs:CARGO_BUILD_JOBS="%{__jobs}"} \ -RUSTFLAGS="%{rpmrustflags}" \ +export CARGO_HOME="$(pwd)/.cargo" +export CARGO_NET_OFFLINE=true +export CARGO_TERM_VERBOSE=true +%{?__jobs:export CARGO_BUILD_JOBS="%{__jobs}"} +export RUSTFLAGS="%{rpmrustflags}" +%ifarch %{ix86} +export RUSTFLAGS="$RUSTFLAGS -C opt-level=1" +%endif /usr/bin/maturin build --release --no-sdist \ %ifarch x32 --target x86_64-unknown-linux-gnux32 -- 2.44.0