xcode portgroup and using the right compiler: GCC_VERSION vs CC and CXX

Jeremy Huddleston Sequoia jeremyhu at apple.com
Wed Mar 13 16:54:21 PDT 2013


Yeah.  Unfortunately, there's no easy way to work around this… sorry…

On Mar 12, 2013, at 11:29 PM, Joshua Root <jmr at macports.org> wrote:

> On 2013-3-13 16:37 , Ryan Schmidt wrote:
>> The xcode-1.0 portgroup doesn't use the configure phase, so it doesn't benefit from the automatic setting of CC, CXX and related variables that MacPorts base does during the configure phase.
>> 
>> Instead it does this:
>> 
>>    switch -- [option configure.compiler] {
>>        gcc-3.3 {set gcc_version 3.3}
>>        gcc-4.0 {set gcc_version 4.0}
>>        gcc-4.2 {set gcc_version 4.2}
>>        llvm-gcc-4.2 {set gcc_version com.apple.compilers.llvmgcc42}
>>        clang {set gcc_version com.apple.compilers.llvm.clang.1_0}
>>    }
>>    if {[info exists gcc_version]} {
>>        append xcode_build_args " GCC_VERSION=${gcc_version}"
>>    }
>> 
>> So for any other compiler (i.e. any MacPorts gcc or clang or llvm-gcc) it will do nothing.
>> 
>> Why do we have to use this Xcode-specific GCC_VERSION variable? Could we just use CC and CXX and thereby support all compilers?
> 
> If that works right with all supported Xcode versions, fine. IIRC,
> GCC_VERSION was just the only documented way to set the compiler used in
> an Xcode project. (The compilers included with Xcode are probably the
> only ones supported for use in Xcode projects.)
> 
> - Josh
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4136 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130313/222256e9/attachment.p7s>


More information about the macports-dev mailing list