# Trying to update gcc from 4.2.1 to 4.7.3



## cartland (Nov 12, 2012)

In 9 the latest version is 4.2.1. I used pkgng to "install" 4.7.3 (from http://pkgbeta.freebsd.org/freebsd-9-amd64/latest).

/usr/local/bin/gcc47 is there but *gcc -v* (which is only in /usr/bin) reports 4.2.1.

I was planning to follow the instructions in http://www.freebsd.org/doc/en/articles/custom-gcc/article.html but this may now be out of date.

What's the advice about resolving this?

thanks


----------



## SirDice (Nov 12, 2012)

cartland said:
			
		

> I was planning to follow the instructions in http://www.freebsd.org/doc/en/articles/custom-gcc/article.html but this may now be out of date.
> 
> What's the advice about resolving this?


Follow the article.


----------



## ColdfireMC (Nov 13, 2012)

cartland said:
			
		

> In 9 the latest version is 4.2.1. I used pkgng to "install" 4.7.3 (from http://pkgbeta.freebsd.org/freebsd-9-amd64/latest).
> 
> /usr/local/bin/gcc47 is there but *gcc -v* (which is only in /usr/bin) reports 4.2.1.
> 
> ...



don't touch that, except if you will use it for testing.

now ports tree and base system are being moved to Clang/LLVM, newer than gcc42 and similar to newer gcc versions. if a specific port needs a newer GCC it's marked as an option(some ports let you choose GCC version) or dependency.


----------



## cartland (Nov 17, 2012)

ColdfireMC said:
			
		

> don't touch that, except if you will use it for testing.



Thanks. After additional reading I left gcc alone. I adapted my code and build to be gcc 4.2.1 compliant. I'll add clang support at a later date.


----------

