# Linking gcc



## amnixed (Jan 14, 2015)

Hello,

On a 10.1-STABLE system I have installed lang/gcc and linked /usr/bin/gcc -> /usr/local/bin/gcc48. I needed GCC to compile and install djbdns as instructed by the web site http://cr.yp.to/djbdns.html. With this exception, I normally build everything from ports.

I was able to compile and install djbdns on this 10.1-STABLE system with no errors and it seems to work as well as it does on my 8.x and 9.x systems.

My question is: does the /usr/bin/gcc -> /usr/local/bin/gcc48 link have the potential to cause problems or should I remove it?


----------



## tobik@ (Jan 14, 2015)

If you build everything else from ports why keep the symlink?

gcc is not really needed to build djbdns, if you replace gcc in  conf-cc and conf-ld in djbdns's sources with gcc48 or cc, you don't need the symlink at all. There are the ports dns/djbdns or dns/libdjbdns as well.


----------



## SirDice (Jan 14, 2015)

Probably a better solution would be to set CC to /usr/local/bin/gcc48. See https://www.freebsd.org/doc/en/articles/custom-gcc/article.html



amnixed said:


> My question is: does the /usr/bin/gcc -> /usr/local/bin/gcc48 link have the potential to cause problems or should I remove it?


Yes, this could cause problems.


----------



## amnixed (Jan 14, 2015)

Thank you both for the quick replies.


----------

