Chosing the C and C++ compilers

Anders F Björklund afb at macports.org
Thu Nov 6 09:44:54 PST 2008


Akim Demaille wrote:

> Thank you, but there seems to be some misunderstanding here: I am  
> not asking for help on how I should talk to GCC, but rather how I  
> should tell macports to use the compiler in a more useful way.  I  
> do think that rather than leaving gcc-4.0 what's to be done,  
> macports should use its knowledge about the variants asked by the  
> user to decide what flags to pass to the compiler, in which case  
> distcc comes for free.

Just meant that those are rather straightforwardly mapped from  
configure.march and configure.mtune along with configure.m32 and  
configure.m64 to make up the configure.cflags, and the settings for  
configure.universal_archs (when cross-compiling)

"GNU style" cross-compiling uses host-prefixed binaries, where as  
"Mac style" cross-compiling normally just uses -arch... or Xcode :-)

> That would be the ideal.
>
> Meanwhile, I'm asking how I can educate macports to stop using a  
> hard coded path for gcc and let *me* do what I know I want to do.

I assume it's reasonable to expect being able to set configure. 
{cc,cxx} from the configuration and not have MacPorts clobber those  
with the platform setting guessed with configure.compiler. So it's  
probably a missing feature (a.k.a. bug) and should be fixed in base.

Guess you need to just override it on the command line for now ? It's  
all doable, just falls a bit outside the numbered paint fields.

--anders



More information about the macports-users mailing list