PDA

View Full Version : How to Set a Different C and C++ Compiler When Building RPM's?



uncholowapo
14th January 2010, 10:24 PM
Hi, I am in the process of building some packages with the Intel compiler (icc) and was wondering how to make it the default compiler when using rpmbuild.

Any help would be great.

uncholowapo
15th January 2010, 11:47 PM
Well can anyone tell me if it's put in the rpmmacros or rpmrc file?

Firewing1
16th January 2010, 12:59 AM
Usually you can override the defaults by setting the CC, CPP and CXX variables in the shell:

export CC=icc CXX=icc CPP=icc
%configure
Looking at /usr/lib/rpm/macros also reveals the following:

%__cc gcc
%__cpp gcc -E
so if the above doesn't work, then try overriding the values of %__cc and %__cpp.

uncholowapo
16th January 2010, 05:51 AM
Thanks alot! I really appriciate it.