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

Re: alternatives for gcc



On Wed, 02 Feb 2011 06:31:30 +0100
deloptes <deloptes@yahoo.com> wrote:

> Joe Riel wrote:
> 
> > Why are there no alternatives, configurable with
> > update-alternatives, for gcc? Seems like I should be able to
> > configure whether /usr/bin/gcc is linked to gcc-4.3, gcc-4.4,
> > etc.   Of course I can just set the link manually (which I do),
> > but ...
> > 
> 
> every normal automake or cmake accepts the CC,CXX, CPP or equivalents
> to manage this. Especially in later releases of gcc this seems to be
> working very well, so I'm not sure if it's really necessary to do so.
> Let me know if you are  able to update it with update-alternatives
> and how, because I've been asking myself how this could be setup as
> default in the past.

The problem I ran into was that Matlab R2010b works with gcc 4.3 but not
4.4 and I didn't know how to configure Matlab to use 4.3.  However,
I now see that that can be solved by editing
~/.matlab/R2010b/mexopts.sh, changing

CC="gcc"
to
CC="gcc-4.3"

So I didn't need the use the debian alternatives after all.
But see my other response for how I did it. As you suggest, this is
probably the typical case, which explains why alternatives are not
used with gcc.

-- 
Joe Riel


Reply to: