TLDR: I want to use the llvm compiler, not some other gcc compiler that I installed using macports.
Whilst trying to compile a c++ library, I ran into this error:
c++: error: unrecognized option '-arch'
After searching on SO, I found this post post which indicates that the '-arch'
option is part of Apple's extensions to gcc.
A while ago I installed a different GCC version, using Macports, in order to compile some tools for some other software. Now when I check this, I can confirm that it is using the version from Macports:
$ g++ --version
g++ (MacPorts gcc46 4.6.4_3) 4.6.4
$ which g++ --version
/opt/local/bin/g++
Using port select
only yields two options,
$ port select --list gcc
Available versions for gcc:
mp-gcc46 (active)
none
So I can't change the default compiler here. Where can I change this to use the llvm compiler in /usr/bin/
?