macros: use the language build flag macros for compiler flags

These macros have existed since 2018 and can be relied on in
RHEL 8+ and all current Fedora releases.
This commit is contained in:
Neal Gompa 2023-05-19 07:16:59 -04:00
parent 24f5e409dd
commit 16329cac89
2 changed files with 9 additions and 6 deletions

View File

@ -76,7 +76,7 @@
%endif
# For handling bump release by rpmdev-bumpspec and mass rebuild
%global baserelease 1
%global baserelease 2
# Uncomment if building for EPEL
#global name_suffix %%{major_version}
@ -535,6 +535,9 @@ popd
%changelog
* Fri May 19 2023 Neal Gompa <ngompa@fedoraproject.org> - 3.26.4-2
- macros: use the language build flag macros for compiler flags
* Fri May 19 2023 Björn Esser <besser82@fedoraproject.org> - 3.26.4-1
- cmake-3.26.4
Fixes rhbz#2208383

View File

@ -20,11 +20,11 @@
%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 ;} \
CFLAGS="${CFLAGS:-%build_cflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%build_cxxflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%build_fflags}" ; export FFLAGS ; \
FCFLAGS="${FCFLAGS:-%build_fflags}" ; export FCFLAGS ; \
%{?build_ldflags:LDFLAGS="${LDFLAGS:-%build_ldflags}" ; export LDFLAGS ;} \
%endif \
%__cmake \\\
%{!?__cmake_in_source_build:-S "%{_vpath_srcdir}"} \\\