Re: How to change dafault gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks a lot for You help Tom.

Today, finaly I understand You suggestion about CXX and CC environment variables.
I add file gcc.sh to /etc/profilr.d directory
and everything works fine. When I change export CC=/user/bin/gcc-X.Y.Z then I change default compiler to X.Y.Z. I try the same beafor but I don't discover so I must relogin. When I'm logout and login again then everythings work ok.

Very very thanks for You help and patience.

Marek


----- Original Message ----- From: "Tom Browder" <tom.browder@xxxxxxxxx>
To: "wp" <qwertygd@xxxxx>
Cc: <gcc-help@xxxxxxxxxxx>
Sent: Monday, April 07, 2008 12:47 PM
Subject: Re: How to change dafault gcc


On Sun, Apr 6, 2008 at 12:47 PM, wp <qwertygd@xxxxx> wrote:
Hi
I have installed gcc-4.0.1 in my mandriva2006 as default gcc compiler. (its
 a an rpm package)
 I compile and install another gcc (4.2.0 or 3.4.6)
 I try change symlinks. I try change alternatives. Everything looks Ok.
when I type gcc -- version I have 4.2.0. But when I try rebuild surces by rpmrebuild it's still use default gcc (4.0.1) and i have compilation error
 (incompatible with gcc 4.0.1).
 When I uninstall rpm package with gcc-4.0.1 everything works fine,
rpmrebuild goes without any error. But when I install gcc-4.0.1 again, then
 it'is again default gcc and again can't rebuild my source.
 My question is: How to change default gcc ?

Did you try my suggestion to set the CXX and CC environment variables
to the desired compilers?  I use rpm build all the time and that seems
to work for me.

-Tom



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux