Chosing the C and C++ compilers

Ryan Schmidt ryandesign at macports.org
Thu Nov 6 13:56:13 PST 2008


On Nov 6, 2008, at 08:06, Akim Demaille wrote:

> Le 5 nov. 08 à 23:55, Ryan Schmidt a écrit :
>
>> configure.cc is a Portfile command; it doesn't do anything in  
>> macports.conf.
>>
>> I was not familiar with distcc. I just looked it up  
>> (www.distcc.org) and it sounds interesting. I'm not sure how to  
>> best use it with MacPorts. MacPorts always defaults to using e.g. / 
>> usr/bin/gcc-4.0 to compile on Tiger and Leopard. Maybe distcc has  
>> a way to translate that?
>
> It seems that "configuredistcc yes" does the trick from  
> macports.conf, I did nothing else (and running distccmontext I saw  
> that the compilation was indeed distributed).  But yes, there are  
> means to play symlinks treaks to have gcc bounce to "distcc gcc",  
> yet I don't like that.
>
> Really, I just wish I had a simple means (= not by having to  
> specify it on each port command line) to specify CC and CXX.

Why would you want to do that? We have few enough volunteers with few  
enough resources as it is; I don't think we can afford to require  
port maintainers to allow any compiler to be used with their ports.  
It's good that we lock it down to a specific compiler. Port  
maintainers can override that if necessary for their specific ports,  
but it should not be for users to change.

> Or else, I would prefer that the hard coded values be fully  
> qualified (/usr/bin/i686-apple-darwin9-gcc-4.0.1) instead of short  
> (/usr/bin/gcc-4.0).

But then we would have to find out what that value is, for the  
current processor architecture and OS version. And what happens when  
we want to build a universal binary?

> In that case I have nothing special to do to use distcc with macports.

Since we already have some distcc options in MacPorts we obviously  
want it to be easy to use with MacPorts. But I personally have never  
used it so I have no input on how best to do so.


More information about the macports-users mailing list