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

Re: GCC



Johan Grönqvist wrote:
simon h skrev:
I wonder why Debian needs three versions of the GCC compiler: 4.1, 4.2,
and 4.3? Shouldn't one be enough? Is it because the compiler has no
down-compatibility?

I think that is the reason, yes. I also think that lack of manpower is the reason there are not even more (older) versions of gcc in debian.

At <http://gcc.gnu.org/gcc-4.4/changes.html>, you can see that there are changes between versions that can break certain programs. I was recently asked for advice by someone that needs a 3.x version of gcc.

(For completeness: I will suggest debootstrap/schroot for running gcc3.X without affecting his current installation.)


When you install a later version, it doesn't necessarily become the new default GCC. For example, even though I have installed GCC 4.4 on my machine, 4.3 is still the version I get when I type gcc --version. Again, this is generally because the kernel and other system programs were probably compiled using it.

To use 4.4, I can specify 4.4 on the command line:

#gcc-4.4 -o hello hello.c


When building a large program than has been packaged by Debian, or in the usual GNU .tar.gz/.tgz style, (something that uses make) one can usually set an environment variable:

#export CC=gcc-4.4
#./configure
#make
#make install
#export CC=


Or even just:

#CC=gcc-4.4; ./configure; make; make install


Hope this helps,

Mark Allums






Reply to: