[129438] trunk/dports/lang/llvm-3.6
larryv at macports.org
larryv at macports.org
Fri Dec 12 23:53:52 PST 2014
Revision: 129438
https://trac.macports.org/changeset/129438
Author: larryv at macports.org
Date: 2014-12-12 23:53:52 -0800 (Fri, 12 Dec 2014)
Log Message:
-----------
clang-3.6: Don't rely on xcrun to find SDKs
Parse the output of `xcodebuild -sdk FOO -version` as an fallback,
fixing builds on Lion (and hopefully Snow Leopard).
The libclang_rt builds previously used a minimal stub SDK, but they
require real Xcode SDKs now.[1][2] The upstream implementation finds
them with `xcrun --sdk FOO --show-sdk-path`, but the `--show-sdk-path`
option was added in Mountain Lion.
We may have to start explicitly requiring Xcode on OS X; not sure yet.
[1] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20131111/195205
[2] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141110/243757
Modified Paths:
--------------
trunk/dports/lang/llvm-3.6/Portfile
Added Paths:
-----------
trunk/dports/lang/llvm-3.6/files/lion-xcrun-fallback.patch
Modified: trunk/dports/lang/llvm-3.6/Portfile
===================================================================
--- trunk/dports/lang/llvm-3.6/Portfile 2014-12-13 07:53:49 UTC (rev 129437)
+++ trunk/dports/lang/llvm-3.6/Portfile 2014-12-13 07:53:52 UTC (rev 129438)
@@ -105,7 +105,8 @@
clang-modernize.patch \
snowleopard-cmath.patch \
move-clang-resources.patch \
- fix-libclang_rt-dylib-ids.patch
+ fix-libclang_rt-dylib-ids.patch \
+ lion-xcrun-fallback.patch
build.target clang-only
destroot.target install-clang
Added: trunk/dports/lang/llvm-3.6/files/lion-xcrun-fallback.patch
===================================================================
--- trunk/dports/lang/llvm-3.6/files/lion-xcrun-fallback.patch (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/lion-xcrun-fallback.patch 2014-12-13 07:53:52 UTC (rev 129438)
@@ -0,0 +1,15 @@
+diff --git a/projects/compiler-rt/make/platform/clang_darwin.mk b/projects/compiler-rt/make/platform/clang_darwin.mk
+index 6ed3230..b4917c8 100644
+--- a/projects/compiler-rt/make/platform/clang_darwin.mk
++++ b/projects/compiler-rt/make/platform/clang_darwin.mk
+@@ -47,6 +47,10 @@ XCRun = \
+ XCRunSdkPath = \
+ $(shell \
+ result=`xcrun --sdk $(1) --show-sdk-path 2> /dev/null`; \
++ if [ "$$?" != "0" ]; then \
++ result=`xcodebuild -sdk $(1) -version 2> /dev/null \
++ | sed -n 's/^Path: \(..*\)$$/\1/p'`; \
++ fi; \
+ if [ "$$?" != "0" ]; then result=""; fi; \
+ echo $$result)
+ ###
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141212/af414a52/attachment.html>
More information about the macports-changes
mailing list