Bug 447945 - RFE: Define CC and CXX in %configure
Summary: RFE: Define CC and CXX in %configure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-22 15:35 UTC by Jerry James
Modified: 2026-08-10 08:06 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-08-10 08:06:59 UTC
Type: ---
Embargoed:
fedora-admin-xmlrpc: mirror+


Attachments (Terms of Use)

Description Jerry James 2008-05-22 15:35:56 UTC
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):
redhat-rpm-config-9.0.2-1.fc9.noarch

How reproducible:
N/A

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

Expected results:
N/A

Additional info:

Comment 1 Jerry James 2009-05-13 17:45:37 UTC
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 09:10:58 UTC
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 07:24:31 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora Admin user for bugzilla script actions 2025-09-17 02:09:53 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 5 Florian Weimer 2026-08-10 08:06:59 UTC
Added in:

commit 7562b38ec5edac3da0e150fcbe57cabbcd7b7f9e
Author: Igor Raits <ignatenkobrain>
Date:   Wed Jun 3 21:03:31 2020 +0200

    Add support for selecting a clang as a toolchain
    
    Signed-off-by: Igor Raits <ignatenkobrain>


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