From 9fb7ec9c17a951cb63739036630f8f2d4db699a2 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Thu, 23 Feb 2023 16:15:24 -0600 Subject: [PATCH] Include RUSTFLAGS in %set_build_flags Resolves: https://bugzilla.redhat.com/2167183 --- macros | 5 ++++- redhat-rpm-config.spec | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/macros b/macros index b9dccf1..c69ba73 100644 --- a/macros +++ b/macros @@ -86,12 +86,15 @@ # have not been set already. RPM_OPT_FLAGS and RPM_LD_FLAGS have already # been set implicitly at the start of the %%build section. # LT_SYS_LIBRARY_PATH is used by libtool script. +# RUSTFLAGS is only set when rust-packaging which defines %%{build_rustflags} is +# available. %set_build_flags \ CFLAGS="${CFLAGS:-%{build_cflags}}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \ FCFLAGS="${FCFLAGS:-%{build_fflags}}" ; export FCFLAGS ; \ - VALAFLAGS="${VALAFLAGS:-%{build_valaflags}}" ; export VALAFLAGS ; \ + VALAFLAGS="${VALAFLAGS:-%{build_valaflags}}" ; export VALAFLAGS ;%{?build_rustflags: + RUSTFLAGS="${RUSTFLAGS:-%{build_rustflags}}" ; export RUSTFLAGS ;} \ LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \ LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-%_libdir:}" ; export LT_SYS_LIBRARY_PATH ; \ CC="${CC:-%{__cc}}" ; export CC ; \ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 3dc603b..ffb1e04 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -4,7 +4,7 @@ # 2) When making changes, increment the version (in baserelease) by 1. # rpmdev-bumpspec and other tools update the macro below, which is used # in Version: to get the desired effect. -%global baserelease 252 +%global baserelease 253 Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config @@ -252,6 +252,10 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %doc buildflags.md %changelog +* Tue Feb 28 2023 Maxwell G - 253-1 +- Include RUSTFLAGS in %%set_build_flags +- Fixes: rhbz#2167183 + * Tue Feb 28 2023 Tom Stellard - 252-1 - Rename _pkg_extra_* macros to _distro_extra_*