newbie question on upgrading GCC

Erik Trulsson ertr1013 at
Mon Apr 10 14:50:53 UTC 2006

On Mon, Apr 10, 2006 at 10:43:51AM -0400, Jim Stapleton wrote:
> I did a "make install clean" in the lang/gcc40/ directory to get a
> newer version of GCC, and it seems happy, so the next thing I did was
> I replaced my /usr/bin/gcc, /usr/bin/g++, etc. binaries with hard
> links to the /usr/local/bin/gcc-freebsd-4.0,
> /usr/local/bin/g++-freebsd-4.0, etc. binaries.

That sounds like a bad idea.

> Now when I try to make things, I get a lot of errors and most compilation fails.

Yes, a bad idea indeed.  Do not try to change the base compiler unless you
really know what you are doing.

> I backed up the original binaries (gcc -> gcc-original), and things
> seem to be fixed, and compiles work. What should I do?

You should leave the standard compiler alone.  If you wish to use the
newer compiler invoke it as gcc40 (IIRC), but don't try use it to rebuild
FreeBSD itself.

> Also, the ports install does not make a "cc-freebsd-4.0" binary, so
> I'm leary of replacing it with a hard link to the gcc-freebsd-4.0
> biary, although when I run "cc --version", it tells me that it is gcc
> 3.4.x, which is the default gcc install.

<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at

More information about the freebsd-questions mailing list