From: Jan Palus Date: Wed, 14 Apr 2021 17:33:21 +0000 (+0200) Subject: reduce opt-level on %{ix86} to fix build X-Git-Tag: auto/th/python3-adblock-0.4.4-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=f679bd2f5a247761febd6b1ad5132cab4e5629d2;p=packages%2Fpython3-adblock.git 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`. --- 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