Define RUSTFLAGS only when rust macros are installed

Now that rust-packaging absorbed rust-srpm-macros in Fedora, RHEL rust
will need to provide an srpm-macros subpackage so that no part of
rust-packaging will be pulled into RHEL 10.  This will then allow
rust-packaging (minus macros.rust-srpm) to exist in EPEL.
This commit is contained in:
Yaakov Selkowitz 2024-01-04 21:31:24 -05:00
parent 4daef93aa9
commit 19a840bac0
2 changed files with 8 additions and 4 deletions

5
macros
View File

@ -86,13 +86,14 @@
# have not been set already. RPM_OPT_FLAGS and RPM_LD_FLAGS have already # have not been set already. RPM_OPT_FLAGS and RPM_LD_FLAGS have already
# been set implicitly at the start of the %%build section. # been set implicitly at the start of the %%build section.
# LT_SYS_LIBRARY_PATH is used by libtool script. # LT_SYS_LIBRARY_PATH is used by libtool script.
# RUSTFLAGS is only set when %%{build_rustflags} is available.
%set_build_flags \ %set_build_flags \
CFLAGS="${CFLAGS:-%{build_cflags}}" ; export CFLAGS ; \ CFLAGS="${CFLAGS:-%{build_cflags}}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" ; export CXXFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \ FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \
FCFLAGS="${FCFLAGS:-%{build_fflags}}" ; export FCFLAGS ; \ 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 ; \ RUSTFLAGS="${RUSTFLAGS:-%{build_rustflags}}" ; export RUSTFLAGS ;} \
LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \ LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \
LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-%_libdir:}" ; export LT_SYS_LIBRARY_PATH ; \ LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-%_libdir:}" ; export LT_SYS_LIBRARY_PATH ; \
CC="${CC:-%{__cc}}" ; export CC ; \ CC="${CC:-%{__cc}}" ; export CC ; \

View File

@ -4,7 +4,7 @@
# 2) When making changes, increment the version (in baserelease) by 1. # 2) When making changes, increment the version (in baserelease) by 1.
# rpmdev-bumpspec and other tools update the macro below, which is used # rpmdev-bumpspec and other tools update the macro below, which is used
# in Version: to get the desired effect. # in Version: to get the desired effect.
%global baserelease 274 %global baserelease 275
Summary: Red Hat specific rpm configuration files Summary: Red Hat specific rpm configuration files
Name: redhat-rpm-config Name: redhat-rpm-config
@ -256,7 +256,10 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora common.lua
%doc buildflags.md %doc buildflags.md
%changelog %changelog
* Wed Jan 3 2024 Florian Weimer <fweimer@redhat.com> - 275-1 * Fri Jan 05 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 275-1
- Define RUSTFLAGS only when rust macros are installed
* Wed Jan 3 2024 Florian Weimer <fweimer@redhat.com> - 274-1
- Missing packed relative relocation support on aarch64, s390x (#2256645) - Missing packed relative relocation support on aarch64, s390x (#2256645)
* Tue Jan 2 2024 Florian Weimer <fweimer@redhat.com> - 273-1 * Tue Jan 2 2024 Florian Weimer <fweimer@redhat.com> - 273-1