Message161962
| Author |
ronaldoussoren |
| Recipients |
Matthew.Scott, ned.deily, ronaldoussoren, s7v7nislands, tarek |
| Date |
2012年05月30日.15:07:14 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1338390435.25.0.670004521234.issue14499@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
What I'd prefer to look for the compiler:
* in distutils: if $CC is an absolute path and exists, use that
* look for clang on $PATH, use it if found
(default configure looks for GCC in preference of other compilers,
but with Apple's toolchain it is better to use clang)
* look for gcc on $PATH, use it if found
(needed to use the Fink compiler when Fink is on $PATH, alternative
for 3.3 is to document that configure will try to pick and Apple
compiler)
* use $(xcodebuild -find clang)
To look for the SDK:
* in distutils: if -isysroot is set, is not '/' and exists, use that
* in distutils: extract SDK version from -isysroot string (if set),
then use $(xcode-select) to find the root of the installation and
construct a path relative to that. If the requested SDK version exists,
use that
* if osx release < 10.5 and building universal:
- use /Developer/SDKs/MacOSX10.4u.sdk
(needed for universal builds on early releases of OSX 10.4)
* if /usr/include/stdint.h exists: use -isysroot /
(older Xcode, or Xcode >=4.3 with Command Line Tools installed)
* use $(xcodebuild -showsdks) to find list of SDKs and use most recent
one.
I haven't tried to capture this in code yet, and haven't tested the procedure on earlier releases (or even a 10.7 system with Xcode 4.3 without unix tools), but this should work. |
|