[OT] change default compiler version to build an rpm

Michael A. Peters mpeters at mac.com
Thu May 4 21:28:30 UTC 2006


On Thu, 2006-05-04 at 22:29 +0200, Gianluca Cecchi wrote:
> On my FC5 system I have problems running rpmbuild for a program with
> default gcc that is  4.1.0.
> I have the compat-gcc-32 package installed on my system.
> Getting the source tgz file, setting CC with
> export CC=gcc32
> and then running configure and make it works and I can compile the
> program, but I am not able to replicate this in spec file for
> rpmbuild.
> 
> So I'm trying to change compiler settings from gcc to gcc32.
> I added for dependency into the spec file the line
> BuildRequires:  compat-gcc-32
> 
> but I'm not able to have the gcc32 compiler set up.
> I tried something like
> %define %{__cc} gcc32
> before the prep and build phases, but in
>  %configure step in build phase
> I see that the detected compiler is gcc and not gcc32.
> Any hints and pointers? Already sent to rpm-list too.
> Thanks in advance,
> Gianluca
> 

in %build section:

try export CC=%{_bindir}/gcc32

or

make CC=%{_bindir}/gcc32

-=-
If I remember correctly, you may also have to change the %optflags macro
because FC4/FC5 use some flags that not compatible with gcc32




More information about the fedora-devel-list mailing list