RFC: base compiler preferences
Joshua Root
jmr at macports.org
Mon Mar 24 03:10:52 PDT 2014
On 2014-3-24 06:18 , Jeremy Huddleston Sequoia wrote:
> I'm considering adjusting compiler preferences in base trunk for Xcode >= 3.2 as follows:
> 1) Add macports-clang-3.4 before macports-clang-3.3
> 2) Prefer macports-clang-* over other port-provided compilers
>
> So in general, we prefer Xcode-provided compilers and then fall back on port-provided compilers in the order of clang, llvm-gcc-4.2, gcc-4.2.
>
> Ports that don't work with any clang are blacklisting *clang*, so they'll skip the promoted macports-clang-* versions and still fall back on macports-llvm-gcc-4.2.
>
> Thoughts?
>
> Index: portconfigure.tcl
> ===================================================================
> --- portconfigure.tcl (revision 118094)
> +++ portconfigure.tcl (working copy)
> @@ -431,16 +431,16 @@
> } elseif {$xcodeversion eq "none" || $xcodeversion eq ""} {
> return {cc}
> } elseif {[vercmp $xcodeversion 5.0] >= 0} {
> - return {clang macports-llvm-gcc-4.2 apple-gcc-4.2 macports-clang-3.3}
> + return {clang macports-clang-3.4 macports-clang-3.3 macports-llvm-gcc-4.2 apple-gcc-4.2}
> } elseif {[vercmp $xcodeversion 4.3] >= 0} {
> - return {clang llvm-gcc-4.2 apple-gcc-4.2 macports-clang-3.3}
> + return {clang llvm-gcc-4.2 macports-clang-3.4 macports-clang-3.3 apple-gcc-4.2}
> } elseif {[vercmp $xcodeversion 4.0] >= 0} {
> - return {llvm-gcc-4.2 clang gcc-4.2 macports-clang-3.3 apple-gcc-4.2}
> + return {llvm-gcc-4.2 clang gcc-4.2 macports-clang-3.4 macports-clang-3.3 apple-gcc-4.2}
> } elseif {[vercmp $xcodeversion 3.2] >= 0} {
> if {[string match *10.4u* ${configure.sdkroot}]} {
> return {gcc-4.0}
> } else {
> - return {gcc-4.2 clang llvm-gcc-4.2 macports-clang-3.3 macports-llvm-gcc-4.2 apple-gcc-4.2 gcc-4.0}
> + return {gcc-4.2 clang llvm-gcc-4.2 macports-clang-3.4 macports-clang-3.3 macports-llvm-gcc-4.2 apple-gcc-4.2 gcc-4.0}
> }
> } elseif {[vercmp $xcodeversion 3.0] >= 0} {
> return {gcc-4.2 apple-gcc-4.2 gcc-4.0 macports-clang-3.3}
The patch looks reasonable, assuming clang-3.4 builds on 10.6. I notice
there currently isn't an archive available.
- Josh
More information about the macports-dev
mailing list