Use %%set_build_flags macro to export buildflags, if available

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
This commit is contained in:
Björn Esser 2020-02-05 13:26:07 +01:00
parent b151dcbd6f
commit c5f5b6b1c0
No known key found for this signature in database
GPG Key ID: F52E98007594C21D

View File

@ -37,7 +37,15 @@ fast as possible.
%autosetup -n ninja-%{version} -p1 %autosetup -n ninja-%{version} -p1
%build %build
CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" \ %if 0%{?set_build_flags:1}
%{set_build_flags}
%else
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS
FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS
FCFLAGS="${FCFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FCFLAGS
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
%endif
%if 0%{?rhel} && 0%{?rhel} <= 7 %if 0%{?rhel} && 0%{?rhel} <= 7
%{__python2} \ %{__python2} \
%else %else
@ -92,6 +100,7 @@ ln -s ninja %{buildroot}%{_bindir}/ninja-build
%changelog %changelog
* Wed Feb 05 2020 Björn Esser <besser82@fedoraproject.org> - 1.9.0-5 * Wed Feb 05 2020 Björn Esser <besser82@fedoraproject.org> - 1.9.0-5
- Add conditional for bootstrapping new architectures - Add conditional for bootstrapping new architectures
- Use %%set_build_flags macro to export buildflags, if available
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-4 * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild