diff --git a/rust.spec b/rust.spec index d46d6e9..d0f9d40 100644 --- a/rust.spec +++ b/rust.spec @@ -86,18 +86,22 @@ %endif # Use hardening ldflags. %global rustflags -Clink-arg=-Wl,-z,relro,-z,now +# eliminate complain from RPMlint +%global nocomplain CPPFLAGS="%{optflags}" # Cargo use system libs if not bootstrapping %if !%with rust_bootstrap %global cargo_git LIBGIT2_SYS_USE_PKG_CONFIG=1 %global cargo_ssh LIBSSH2_SYS_USE_PKG_CONFIG=1 -%endif -# eliminate complain from RPMlint -%global nocomplain CPPFLAGS="%{optflags}" - # Must be exported before running x.py in both build and install # If the environments between build and install and different, # everything will be rebuilt during installation! %global build_env_vars RUSTFLAGS="%{rustflags}" %{cargo_git} %{cargo_ssh} %{nocomplain} +%else +%global build_env_vars RUSTFLAGS="%{rustflags}" %{nocomplain} +%endif + +# enable the --with-rust_bootstrap flag +%bcond_with rust_bootstrap Name: rust Version: 1.32.0 @@ -144,7 +148,7 @@ ExclusiveArch: x86_64 %{arm} aarch64 ppc64 ppc64le s390x %{ix86} %ifarch %{ix86} ExclusiveArch: i686 %endif -# Reall LLVM minimum version should be 7.x, but rust has a fallback mode +# Real LLVM minimum version should be 7.x, but rust has a fallback mode %if !%with bundled_llvm BuildRequires: llvm-devel >= 6.0 %endif