Bug 447945 - RFE: Define CC and CXX in %configure
RFE: Define CC and CXX in %configure
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Florian Festi
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2008-05-22 11:35 EDT by Jerry James
Modified: 2016-04-20 08:57 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jerry James 2008-05-22 11:35:56 EDT
Description of problem:
Please consider adding this to the %configure macro:

  CC=%{__cc} ; export CC ; \
  CXX=%{__cxx} ; export CXX ; \

The rationale is that this makes it possible to write custom rpmrc files for
other compilers and have things work sanely.  For example, I have written one
for the Intel C/C++ compiler.  It would be nice to just set __cc and __cxx and
have everything work.  That would make it possible to select a compiler from the
rpmbuild command line, instead of including custom hacks in the spec file.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. N/A
Actual results:

Expected results:

Additional info:
Comment 1 Jerry James 2009-05-13 13:45:37 EDT
A year with no response isn't encouraging.  Is this something I should ask rpm upstream to do?
Comment 2 Ville Skyttä 2011-09-25 05:10:58 EDT
No objections, but I'd like to point out that you can set CC and CXX in the environment before invoking rpmbuild, it does not reset/filter them:

   CC=/path/to/mycc CXX=/path/to/myc++ rpmbuild -bb ... foo.spec

If added to %configure or some other macro, it'd be better to define these conditionally like CFLAGS etc are done:

   CC="${CC:-%__cc}" ; export CC ; \
   CXX="${CXX:-%__cxx}" ; export CXX ; \
Comment 3 Fedora Admin XMLRPC Client 2014-11-14 02:24:31 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Note You need to log in before you can comment on or make changes to this bug.