[152653] branches/release_2_3/base

raimue at macports.org raimue at macports.org
Wed Sep 14 06:23:41 PDT 2016


Revision: 152653
          https://trac.macports.org/changeset/152653
Author:   raimue at macports.org
Date:     2016-09-14 06:23:41 -0700 (Wed, 14 Sep 2016)
Log Message:
-----------
merge r141134 from trunk:
 Refactor and update portconfigure::get_compiler_fallback
 
 Separate out list generation into stages for easier updates in the future.
 Use newer clang versions when using libc++ as our default C++ runtime.
 Don't add legacy gcc fallbacks on El Capitan.

Revision Links:
--------------
    https://trac.macports.org/changeset/141134

Modified Paths:
--------------
    branches/release_2_3/base/src/port1.0/portconfigure.tcl

Property Changed:
----------------
    branches/release_2_3/base/
    branches/release_2_3/base/src/


Property changes on: branches/release_2_3/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502,134511,136965,137850,138461,138530,138749,139270,140693,140724,152447
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502,134511,136965,137850,138461,138530,138749,139270,140693,140724,141134,152447
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692


Property changes on: branches/release_2_3/base/src
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src:37343-46937
/branches/gsoc09-logging/base/src:51231-60371
/branches/gsoc11-rev-upgrade/base/src:78828-88375
/branches/gsoc11-statistics/base/src:79520,79666
/branches/gsoc13-tests/src:106692-111324
/branches/universal-sanity/base/src:51872-52323
/branches/variant-descs-14482/base/src:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502,134511,135851,136965,137850,138461,138530,138749,139270,152447
/users/perry/base-bugs_and_notes/src:45682-46060
/users/perry/base-select/src:44044-44692
   + /branches/gsoc08-privileges/base/src:37343-46937
/branches/gsoc09-logging/base/src:51231-60371
/branches/gsoc11-rev-upgrade/base/src:78828-88375
/branches/gsoc11-statistics/base/src:79520,79666
/branches/gsoc13-tests/src:106692-111324
/branches/universal-sanity/base/src:51872-52323
/branches/variant-descs-14482/base/src:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502,134511,135851,136965,137850,138461,138530,138749,139270,141134,152447
/users/perry/base-bugs_and_notes/src:45682-46060
/users/perry/base-select/src:44044-44692

Modified: branches/release_2_3/base/src/port1.0/portconfigure.tcl
===================================================================
--- branches/release_2_3/base/src/port1.0/portconfigure.tcl	2016-09-14 13:21:09 UTC (rev 152652)
+++ branches/release_2_3/base/src/port1.0/portconfigure.tcl	2016-09-14 13:23:41 UTC (rev 152653)
@@ -425,28 +425,58 @@
 
 # internal function to choose compiler fallback list based on platform
 proc portconfigure::get_compiler_fallback {} {
-    global xcodeversion macosx_deployment_target default_compilers configure.sdkroot
+    global xcodeversion macosx_deployment_target default_compilers configure.sdkroot configure.cxx_stdlib os.major
+
+    # Check our override
     if {[info exists default_compilers]} {
         return $default_compilers
-    } elseif {$xcodeversion eq "none" || $xcodeversion eq ""} {
+    }
+
+    # Check for platforms without Xcode
+    if {$xcodeversion eq "none" || $xcodeversion eq ""} {
         return {cc}
-    } elseif {[vercmp $xcodeversion 5.0] >= 0} {
-        return {clang macports-clang-3.4 macports-clang-3.3 macports-llvm-gcc-4.2 apple-gcc-4.2}
+    }
+
+    # Legacy cases
+    if {[vercmp $xcodeversion 4.0] < 0} {
+        if {[vercmp $xcodeversion 3.2] >= 0} {
+            if {[string match *10.4u* ${configure.sdkroot}]} {
+                return {gcc-4.0}
+            }
+        } elseif {[vercmp $xcodeversion 3.0] >= 0} {
+            return {gcc-4.2 apple-gcc-4.2 gcc-4.0 macports-clang-3.4 macports-clang-3.3}
+        } else {
+            return {apple-gcc-4.2 gcc-4.0 gcc-3.3 macports-clang-3.3}
+        }
+    }
+
+    set compilers {}
+
+    # Set our preferred Xcode-provided compilers
+    if {[vercmp $xcodeversion 5.0] >= 0} {
+        lappend compilers clang
     } elseif {[vercmp $xcodeversion 4.3] >= 0} {
-        return {clang llvm-gcc-4.2 macports-clang-3.4 macports-clang-3.3 apple-gcc-4.2}
+        lappend compilers clang llvm-gcc-4.2
     } elseif {[vercmp $xcodeversion 4.0] >= 0} {
-        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.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.4 macports-clang-3.3}
+        lappend compilers llvm-gcc-4.2 clang
     } else {
-        return {apple-gcc-4.2 gcc-4.0 gcc-3.3 macports-clang-3.3}
+        lappend compilers gcc-4.2 clang llvm-gcc-4.2
     }
+
+    # Determine which versions of clang we prefer
+    if {${configure.cxx_stdlib} eq "libc++"} { # clang-3.5+ require libc++
+        lappend compilers macports-clang-3.7 macports-clang-3.6 macports-clang-3.5 macports-clang-3.4
+    } else {
+        lappend compilers macports-clang-3.4 macports-clang-3.3
+    }
+
+    # Determine if we have MacPorts-provided legacy gcc fallbacks
+    if {${os.major} < 15} {
+        lappend compilers macports-llvm-gcc-4.2 apple-gcc-4.2
+    }
+
+    ui_debug "Preferred compilers: $compilers"
+    return $compilers
 }
 
 # Find a developer tool
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160914/50a55910/attachment-0001.html>


More information about the macports-changes mailing list