[88777] trunk/base/src/port1.0/portconfigure.tcl

jberry at macports.org jberry at macports.org
Wed Jan 11 08:16:36 PST 2012


Revision: 88777
          http://trac.macports.org/changeset/88777
Author:   jberry at macports.org
Date:     2012-01-11 08:16:36 -0800 (Wed, 11 Jan 2012)
Log Message:
-----------
Use xcrun to discover all compilers supplied by xcode.

Xcode 4.3 previews continue to not install all compilers in /usr/bin,
so we call xcrun to ask it where these compilers are. This should
continue to work if or when xcode builds actually do install in
expected locations, and shields us from this sort of change.

xcrun --find works back into the xcode 3 days as far as I can tell.

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

Modified: trunk/base/src/port1.0/portconfigure.tcl
===================================================================
--- trunk/base/src/port1.0/portconfigure.tcl	2012-01-11 16:12:32 UTC (rev 88776)
+++ trunk/base/src/port1.0/portconfigure.tcl	2012-01-11 16:16:36 UTC (rev 88777)
@@ -442,7 +442,6 @@
 # internal function to find correct compilers
 proc portconfigure::configure_get_compiler {type {compiler {}}} {
     global configure.compiler prefix
-    # we likely should call find_developer_tool for cc, gcc, gcc-3.3, gcc-4.0, & gcc-4.2
     set ret ""
     if {$compiler == {}} {
         set compiler ${configure.compiler}
@@ -450,42 +449,42 @@
     switch -exact ${compiler} {
         cc {
             switch -exact ${type} {
-                cc   { set ret /usr/bin/cc }
-                objc { set ret /usr/bin/cc }
-                cxx  { set ret /usr/bin/c++ }
-                cpp  { set ret /usr/bin/cpp }
+                cc   { set ret [find_developer_tool cc] }
+                objc { set ret [find_developer_tool cc] }
+                cxx  { set ret [find_developer_tool c++] }
+                cpp  { set ret [find_developer_tool cpp] }
             }
         }
         gcc {
             switch -exact ${type} {
-                cc   { set ret /usr/bin/gcc }
-                objc { set ret /usr/bin/gcc }
-                cxx  { set ret /usr/bin/g++ }
-                cpp  { set ret /usr/bin/cpp }
+                cc   { set ret [find_developer_tool gcc] }
+                objc { set ret [find_developer_tool gcc] }
+                cxx  { set ret [find_developer_tool g++] }
+                cpp  { set ret [find_developer_tool cpp] }
             }
         }
         gcc-3.3 {
             switch -exact ${type} {
-                cc   { set ret /usr/bin/gcc-3.3 }
-                objc { set ret /usr/bin/gcc-3.3 }
-                cxx  { set ret /usr/bin/g++-3.3 }
-                cpp  { set ret /usr/bin/cpp-3.3 }
+                cc   { set ret [find_developer_tool gcc-3.3] }
+                objc { set ret [find_developer_tool gcc-3.3] }
+                cxx  { set ret [find_developer_tool g++-3.3] }
+                cpp  { set ret [find_developer_tool cpp-3.3] }
             }
         }
         gcc-4.0 {
             switch -exact ${type} {
-                cc   { set ret /usr/bin/gcc-4.0 }
-                objc { set ret /usr/bin/gcc-4.0 }
-                cxx  { set ret /usr/bin/g++-4.0 }
-                cpp  { set ret /usr/bin/cpp-4.0 }
+                cc   { set ret [find_developer_tool gcc-4.0] }
+                objc { set ret [find_developer_tool gcc-4.0] }
+                cxx  { set ret [find_developer_tool g++-4.0] }
+                cpp  { set ret [find_developer_tool cpp-4.0] }
             }
         }
         gcc-4.2 {
             switch -exact ${type} {
-                cc   { set ret /usr/bin/gcc-4.2 }
-                objc { set ret /usr/bin/gcc-4.2 }
-                cxx  { set ret /usr/bin/g++-4.2 }
-                cpp  { set ret /usr/bin/cpp-4.2 }
+                cc   { set ret [find_developer_tool gcc-4.2] }
+                objc { set ret [find_developer_tool gcc-4.2] }
+                cxx  { set ret [find_developer_tool g++-4.2] }
+                cpp  { set ret [find_developer_tool cpp-4.2] }
             }
         }
         llvm-gcc-4.2 {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120111/8aa121cf/attachment.html>


More information about the macports-changes mailing list