Fix CC/CXX exports and allow overrides like CFLAGS and CXXFLAGS

Some packages require being able to redefine the compiler variables
set to add additional base arguments that must be used everywhere.
This change makes it possible for that to work correctly.
This commit is contained in:
Neal Gompa 2020-08-20 08:45:21 -04:00
parent 61f9eb90ba
commit 8a5ee87c50
2 changed files with 7 additions and 3 deletions

4
macros
View File

@ -100,8 +100,8 @@
FCFLAGS="${FCFLAGS:-%{build_fflags}}" ; export FCFLAGS ; \
LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \
LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-%_libdir:}" ; export LT_SYS_LIBRARY_PATH ; \
CC=%{__cc}; export CC ; \
CXX=%{__cxx}; export CXX
CC="${CC:-%{__cc}}" ; export CC ; \
CXX="${CXX:-%{__cxx}}" ; export CXX
# Internal-only. Do not use. Expand a variable and strip the flags
# not suitable to extension builders.

View File

@ -6,7 +6,7 @@
Summary: Red Hat specific rpm configuration files
Name: redhat-rpm-config
Version: 167
Version: 168
Release: 1%{?dist}
# No version specified.
License: GPL+
@ -212,6 +212,10 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
%{_rpmconfigdir}/macros.d/macros.kmp
%changelog
* Thu Aug 20 2020 Neal Gompa <ngompa13@gmail.com> - 168-1
- Fix CC/CXX exports so arguments are included in exported variable
- Allow overrides of CC/CXX like CFLAGS and CXXFLAGS from shell variables
* Mon Aug 03 2020 Troy Dawson <tdawson@redhat.com> - 167-1
- Add Requires: kernel-srpm-macros