From 8a5ee87c500404a71b7d7f20312283d6a9c285e6 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Thu, 20 Aug 2020 08:45:21 -0400 Subject: [PATCH] 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. --- macros | 4 ++-- redhat-rpm-config.spec | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/macros b/macros index 858cac1..78022c8 100644 --- a/macros +++ b/macros @@ -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. diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 0dfd651..091af53 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -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 - 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 - 167-1 - Add Requires: kernel-srpm-macros