[131767] trunk/dports/lang/llvm-3.5/files
jeremyhu at macports.org
jeremyhu at macports.org
Sat Jan 17 21:07:17 PST 2015
Revision: 131767
https://trac.macports.org/changeset/131767
Author: jeremyhu at macports.org
Date: 2015-01-17 21:07:16 -0800 (Sat, 17 Jan 2015)
Log Message:
-----------
llvm-3.5: Add missing patches
Added Paths:
-----------
trunk/dports/lang/llvm-3.5/files/2001-MacPorts-Only-Comment-out-SL-cctools-workaround.patch
trunk/dports/lang/llvm-3.5/files/2002-Do-not-build-a-separate-x86_64h-Haswell-slice-for-th.patch
trunk/dports/lang/llvm-3.5/files/2003-Build-Darwin-libclang_rt-libraries-against-real-SDKs.patch
trunk/dports/lang/llvm-3.5/files/2004-Clean-up-indentation-after-previous-change.patch
trunk/dports/lang/llvm-3.5/files/2005-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch
trunk/dports/lang/llvm-3.5/files/2006-Fall-back-on-xcodebuild-sdk-when-xcrun-sdk-is-not-su.patch
Added: trunk/dports/lang/llvm-3.5/files/2001-MacPorts-Only-Comment-out-SL-cctools-workaround.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/2001-MacPorts-Only-Comment-out-SL-cctools-workaround.patch (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/2001-MacPorts-Only-Comment-out-SL-cctools-workaround.patch 2015-01-18 05:07:16 UTC (rev 131767)
@@ -0,0 +1,37 @@
+From 6bbdf306119e75b71b2ef893f77d668d9ae85e0a Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Mon, 15 Apr 2013 22:38:18 -0700
+Subject: [PATCH 2001/2007] MacPorts Only: Comment out SL cctools workaround
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+(cherry picked from commit 2972ffafff4a394f521986b47810324cd1b7e3ba)
+---
+ make/platform/clang_darwin.mk | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+index 50f8b01..2e455e5 100644
+--- llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
++++ macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+@@ -110,12 +110,12 @@ UniversalArchs.ubsan_osx := $(call CheckArches,i386 x86_64 x86_64h,ubsan_osx)
+ # object files. If we are on that platform, strip out all ARM archs. We still
+ # build the libraries themselves so that Clang can find them where it expects
+ # them, even though they might not have an expected slice.
+-ifneq ($(shell test -x /usr/bin/sw_vers && sw_vers -productVersion | grep 10.6),)
+-UniversalArchs.ios := $(filter-out armv7, $(UniversalArchs.ios))
+-UniversalArchs.cc_kext := $(filter-out armv7, $(UniversalArchs.cc_kext))
+-UniversalArchs.cc_kext_ios5 := $(filter-out armv7, $(UniversalArchs.cc_kext_ios5))
+-UniversalArchs.profile_ios := $(filter-out armv7, $(UniversalArchs.profile_ios))
+-endif
++#ifneq ($(shell test -x /usr/bin/sw_vers && sw_vers -productVersion | grep 10.6),)
++#UniversalArchs.ios := $(filter-out armv7, $(UniversalArchs.ios))
++#UniversalArchs.cc_kext := $(filter-out armv7, $(UniversalArchs.cc_kext))
++#UniversalArchs.cc_kext_ios5 := $(filter-out armv7, $(UniversalArchs.cc_kext_ios5))
++#UniversalArchs.profile_ios := $(filter-out armv7, $(UniversalArchs.profile_ios))
++#endif
+
+ # If RC_SUPPORTED_ARCHS is defined, treat it as a list of the architectures we
+ # are intended to support and limit what we try to build to that.
+--
+2.2.2
+
Added: trunk/dports/lang/llvm-3.5/files/2002-Do-not-build-a-separate-x86_64h-Haswell-slice-for-th.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/2002-Do-not-build-a-separate-x86_64h-Haswell-slice-for-th.patch (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/2002-Do-not-build-a-separate-x86_64h-Haswell-slice-for-th.patch 2015-01-18 05:07:16 UTC (rev 131767)
@@ -0,0 +1,84 @@
+From b97ea4165e1e20a6937d34af8460a8a9008ddef9 Mon Sep 17 00:00:00 2001
+From: Bob Wilson <bob.wilson at apple.com>
+Date: Mon, 10 Nov 2014 17:05:21 +0000
+Subject: [PATCH 2002/2007] Do not build a separate x86_64h Haswell slice for
+ the iOS simulator.
+
+r199996 added new x86_64h slices for all the Darwin compiler_rt libraries
+that had an x86_64 slice, but that is overkill for the iOS Simulator
+platform where the x86_64h slice is never used.
+
+git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221610 91177308-0d34-0410-b5e6-96231b3b80d8
+(cherry picked from commit 60927db68941599e8e1bda74e64a1142642f3829)
+
+Conflicts:
+ make/platform/clang_darwin.mk
+---
+ make/platform/clang_darwin.mk | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+diff --git llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+index 2e455e5..4030383 100644
+--- llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
++++ macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+@@ -71,7 +71,7 @@ UniversalArchs.10.4 := $(call CheckArches,i386 x86_64,10.4)
+ # Configuration for targeting iOS for a couple of functions that didn't
+ # make it into libSystem.
+ Configs += ios
+-UniversalArchs.ios := $(call CheckArches,i386 x86_64 x86_64h armv7,ios)
++UniversalArchs.ios := $(call CheckArches,i386 x86_64 armv7,ios)
+
+ # Configuration for targeting OSX. These functions may not be in libSystem
+ # so we should provide our own.
+@@ -85,13 +85,13 @@ UniversalArchs.cc_kext := $(call CheckArches,armv7 i386 x86_64 x86_64h,cc_kext)
+ # Configuration for use with kernel/kexts for iOS 5.0 and earlier (which used
+ # a different code generation strategy).
+ Configs += cc_kext_ios5
+-UniversalArchs.cc_kext_ios5 := $(call CheckArches,x86_64 x86_64h armv7,cc_kext_ios5)
++UniversalArchs.cc_kext_ios5 := $(call CheckArches,x86_64 armv7,cc_kext_ios5)
+
+ # Configurations which define the profiling support functions.
+ Configs += profile_osx
+ UniversalArchs.profile_osx := $(call CheckArches,i386 x86_64 x86_64h,profile_osx)
+ Configs += profile_ios
+-UniversalArchs.profile_ios := $(call CheckArches,i386 x86_64 x86_64h armv7,profile_ios)
++UniversalArchs.profile_ios := $(call CheckArches,i386 x86_64 armv7,profile_ios)
+
+ # Configurations which define the ASAN support functions.
+ Configs += asan_osx_dynamic
+@@ -100,7 +100,7 @@ UniversalArchs.asan_osx_dynamic := $(call CheckArches,i386 x86_64 x86_64h,asan_o
+ IOSSIM_SDK_PATH := $(call XCRunSdkPath,iphonesimulator)
+ ifneq ($(IOSSIM_SDK_PATH),)
+ Configs += asan_iossim_dynamic
+-UniversalArchs.asan_iossim_dynamic := $(call CheckArches,i386 x86_64 x86_64h,asan_iossim_dynamic)
++UniversalArchs.asan_iossim_dynamic := $(call CheckArches,i386 x86_64,asan_iossim_dynamic)
+ endif
+
+ Configs += ubsan_osx
+@@ -172,7 +172,6 @@ CFLAGS.ubsan_osx := $(CFLAGS) -mmacosx-version-min=10.6 -fno-builtin
+
+ CFLAGS.ios.i386 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
+ CFLAGS.ios.x86_64 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
+-CFLAGS.ios.x86_64h := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
+ CFLAGS.ios.armv7 := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
+ CFLAGS.ios.armv7k := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
+ CFLAGS.ios.armv7s := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
+@@ -193,7 +192,6 @@ CFLAGS.profile_osx.x86_64 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
+ CFLAGS.profile_osx.x86_64h := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
+ CFLAGS.profile_ios.i386 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
+ CFLAGS.profile_ios.x86_64 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
+-CFLAGS.profile_ios.x86_64h := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
+ CFLAGS.profile_ios.armv7 := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
+ CFLAGS.profile_ios.armv7k := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
+ CFLAGS.profile_ios.armv7s := $(CFLAGS) $(IOS_DEPLOYMENT_ARGS)
+@@ -218,7 +216,6 @@ FUNCTIONS.ios := divmodsi4 udivmodsi4 mulosi4 mulodi4 muloti4
+ FUNCTIONS.ios.i386 := $(FUNCTIONS.ios) \
+ divsi3 udivsi3
+ FUNCTIONS.ios.x86_64 := $(FUNCTIONS.ios.i386)
+-FUNCTIONS.ios.x86_64h := $(FUNCTIONS.ios.x86_64)
+
+ FUNCTIONS.osx := mulosi4 mulodi4 muloti4
+
+--
+2.2.2
+
Added: trunk/dports/lang/llvm-3.5/files/2003-Build-Darwin-libclang_rt-libraries-against-real-SDKs.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/2003-Build-Darwin-libclang_rt-libraries-against-real-SDKs.patch (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/2003-Build-Darwin-libclang_rt-libraries-against-real-SDKs.patch 2015-01-18 05:07:16 UTC (rev 131767)
@@ -0,0 +1,830 @@
+From b685e04c707b14dbf27fc0d7d2ba9d3649fea5bb Mon Sep 17 00:00:00 2001
+From: Bob Wilson <bob.wilson at apple.com>
+Date: Mon, 10 Nov 2014 19:38:15 +0000
+Subject: [PATCH 2003/2007] Build Darwin libclang_rt libraries against real
+ SDKs.
+
+The minimal fake SDK was very useful in allowing us to build for all
+Darwin platforms without needing access to the real SDKs, but it did
+not support building any of the sanitizer runtimes. It's important to
+fix that. As a consequence, if you don't have the iOS SDKs installed,
+we will now skip building the iOS-specific libclang_rt libraries.
+rdar://problem/18825276
+
+git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221621 91177308-0d34-0410-b5e6-96231b3b80d8
+(cherry picked from commit f028d70fcadd9b6c4d3ce1dd1af89703e422f6fa)
+
+Conflicts:
+ SDKs/darwin/usr/include/stdio.h
+ SDKs/darwin/usr/include/string.h
+ SDKs/darwin/usr/include/sys/fcntl.h
+ make/platform/clang_darwin.mk
+---
+ CMakeLists.txt | 1 -
+ SDKs/darwin/README.txt | 3 --
+ SDKs/darwin/usr/include/errno.h | 17 -------
+ SDKs/darwin/usr/include/fcntl.h | 17 -------
+ SDKs/darwin/usr/include/inttypes.h | 86 -----------------------------------
+ SDKs/darwin/usr/include/limits.h | 23 ----------
+ SDKs/darwin/usr/include/stdio.h | 90 -------------------------------------
+ SDKs/darwin/usr/include/stdlib.h | 32 -------------
+ SDKs/darwin/usr/include/string.h | 52 ---------------------
+ SDKs/darwin/usr/include/sys/errno.h | 31 -------------
+ SDKs/darwin/usr/include/sys/fcntl.h | 52 ---------------------
+ SDKs/darwin/usr/include/sys/mman.h | 42 -----------------
+ SDKs/darwin/usr/include/sys/stat.h | 25 -----------
+ SDKs/darwin/usr/include/sys/types.h | 20 ---------
+ make/platform/clang_darwin.mk | 88 +++++++++++++++++++++---------------
+ 15 files changed, 52 insertions(+), 527 deletions(-)
+ delete mode 100644 SDKs/darwin/README.txt
+ delete mode 100644 SDKs/darwin/usr/include/errno.h
+ delete mode 100644 SDKs/darwin/usr/include/fcntl.h
+ delete mode 100644 SDKs/darwin/usr/include/inttypes.h
+ delete mode 100644 SDKs/darwin/usr/include/limits.h
+ delete mode 100644 SDKs/darwin/usr/include/stdio.h
+ delete mode 100644 SDKs/darwin/usr/include/stdlib.h
+ delete mode 100644 SDKs/darwin/usr/include/string.h
+ delete mode 100644 SDKs/darwin/usr/include/sys/errno.h
+ delete mode 100644 SDKs/darwin/usr/include/sys/fcntl.h
+ delete mode 100644 SDKs/darwin/usr/include/sys/mman.h
+ delete mode 100644 SDKs/darwin/usr/include/sys/stat.h
+ delete mode 100644 SDKs/darwin/usr/include/sys/types.h
+
+diff --git llvm_release_35/projects/compiler-rt/CMakeLists.txt macports_release_35/projects/compiler-rt/CMakeLists.txt
+index f35a096..57362ac 100644
+--- llvm_release_35/projects/compiler-rt/CMakeLists.txt
++++ macports_release_35/projects/compiler-rt/CMakeLists.txt
+@@ -160,7 +160,6 @@ include(CompilerRTUtils)
+ set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ set(COMPILER_RT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+ # Setup custom SDK sysroots.
+-set(COMPILER_RT_DARWIN_SDK_SYSROOT ${COMPILER_RT_SOURCE_DIR}/SDKs/darwin)
+ set(COMPILER_RT_LINUX_SDK_SYSROOT ${COMPILER_RT_SOURCE_DIR}/SDKs/linux)
+
+ set(COMPILER_RT_EXTRA_ANDROID_HEADERS ${COMPILER_RT_SOURCE_DIR}/android/include)
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/README.txt macports_release_35/projects/compiler-rt/SDKs/darwin/README.txt
+deleted file mode 100644
+index ea30af3..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/README.txt
++++ /dev/null
+@@ -1,3 +0,0 @@
+-The Darwin platforms are all similar enough we roll them into one SDK, and use
+-preprocessor tricks to get the right definitions for the few things which
+-diverge between OS X and iOS.
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/errno.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/errno.h
+deleted file mode 100644
+index f06e537..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/errno.h
++++ /dev/null
+@@ -1,17 +0,0 @@
+-/* ===-- errno.h - stub SDK header for compiler-rt --------------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#include <sys/errno.h>
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/fcntl.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/fcntl.h
+deleted file mode 100644
+index a5f91e3..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/fcntl.h
++++ /dev/null
+@@ -1,17 +0,0 @@
+-/* ===-- fcntl.h - stub SDK header for compiler-rt --------------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#include <sys/fcntl.h>
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/inttypes.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/inttypes.h
+deleted file mode 100644
+index 406fa6f..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/inttypes.h
++++ /dev/null
+@@ -1,86 +0,0 @@
+-/* ===-- inttypes.h - stub SDK header for compiler-rt -----------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#ifndef __INTTYPES_H__
+-#define __INTTYPES_H__
+-
+-#if __WORDSIZE == 64
+-#define __INTTYPE_PRI64__ "l"
+-#else
+-#define __INTTYPE_PRI64__ "ll"
+-#endif
+-
+-#define PRId8 "hhd"
+-#define PRId16 "hd"
+-#define PRId32 "d"
+-#define PRId64 __INTTYPE_PRI64__ "d"
+-
+-#define PRIi8 "hhi"
+-#define PRIi16 "hi"
+-#define PRIi32 "i"
+-#define PRIi64 __INTTYPE_PRI64__ "i"
+-
+-#define PRIo8 "hho"
+-#define PRIo16 "ho"
+-#define PRIo32 "o"
+-#define PRIo64 __INTTYPE_PRI64__ "o"
+-
+-#define PRIu8 "hhu"
+-#define PRIu16 "hu"
+-#define PRIu32 "u"
+-#define PRIu64 __INTTYPE_PRI64__ "u"
+-
+-#define PRIx8 "hhx"
+-#define PRIx16 "hx"
+-#define PRIx32 "x"
+-#define PRIx64 __INTTYPE_PRI64__ "x"
+-
+-#define PRIX8 "hhX"
+-#define PRIX16 "hX"
+-#define PRIX32 "X"
+-#define PRIX64 __INTTYPE_PRI64__ "X"
+-
+-#define SCNd8 "hhd"
+-#define SCNd16 "hd"
+-#define SCNd32 "d"
+-#define SCNd64 __INTTYPE_PRI64__ "d"
+-
+-#define SCNi8 "hhi"
+-#define SCNi16 "hi"
+-#define SCNi32 "i"
+-#define SCNi64 __INTTYPE_PRI64__ "i"
+-
+-#define SCNo8 "hho"
+-#define SCNo16 "ho"
+-#define SCNo32 "o"
+-#define SCNo64 __INTTYPE_PRI64__ "o"
+-
+-#define SCNu8 "hhu"
+-#define SCNu16 "hu"
+-#define SCNu32 "u"
+-#define SCNu64 __INTTYPE_PRI64__ "u"
+-
+-#define SCNx8 "hhx"
+-#define SCNx16 "hx"
+-#define SCNx32 "x"
+-#define SCNx64 __INTTYPE_PRI64__ "x"
+-
+-#define SCNX8 "hhX"
+-#define SCNX16 "hX"
+-#define SCNX32 "X"
+-#define SCNX64 __INTTYPE_PRI64__ "X"
+-
+-#endif /* __INTTYPES_H__ */
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/limits.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/limits.h
+deleted file mode 100644
+index 5495a78..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/limits.h
++++ /dev/null
+@@ -1,23 +0,0 @@
+-/* ===-- limits.h - stub SDK header for compiler-rt -------------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#ifndef __LIMITS_H__
+-#define __LIMITS_H__
+-
+-/* This is only here as a landing pad for the include_next from the compiler's
+- built-in limits.h. */
+-
+-#endif /* __LIMITS_H__ */
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/stdio.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/stdio.h
+deleted file mode 100644
+index 629b450..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/stdio.h
++++ /dev/null
+@@ -1,90 +0,0 @@
+-/* ===-- stdio.h - stub SDK header for compiler-rt --------------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#ifndef __STDIO_H__
+-#define __STDIO_H__
+-
+-#if defined(__cplusplus)
+-extern "C" {
+-#endif
+-
+-typedef struct __sFILE FILE;
+-typedef __SIZE_TYPE__ size_t;
+-
+-/* Determine the appropriate fdopen, fopen(), and fwrite() functions. */
+-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
+-# if defined(__i386)
+-# define __FDOPEN_NAME "_fdopen$UNIX2003"
+-# define __FOPEN_NAME "_fopen$UNIX2003"
+-# define __FWRITE_NAME "_fwrite$UNIX2003"
+-# elif defined(__x86_64__)
+-# define __FDOPEN_NAME "_fdopen"
+-# define __FOPEN_NAME "_fopen"
+-# define __FWRITE_NAME "_fwrite"
+-# elif defined(__arm)
+-# define __FDOPEN_NAME "_fdopen"
+-# define __FOPEN_NAME "_fopen"
+-# define __FWRITE_NAME "_fwrite"
+-# else
+-# error "unrecognized architecture for targeting OS X"
+-# endif
+-#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
+-# if defined(__i386) || defined (__x86_64)
+-# define __FDOPEN_NAME "_fdopen"
+-# define __FOPEN_NAME "_fopen"
+-# define __FWRITE_NAME "_fwrite"
+-# elif defined(__arm)
+-# define __FDOPEN_NAME "_fdopen"
+-# define __FOPEN_NAME "_fopen"
+-# define __FWRITE_NAME "_fwrite"
+-# else
+-# error "unrecognized architecture for targeting iOS"
+-# endif
+-#else
+-# error "unrecognized architecture for targeting Darwin"
+-#endif
+-
+-# define stderr __stderrp
+-extern FILE *__stderrp;
+-
+-#ifndef SEEK_SET
+-#define SEEK_SET 0 /* set file offset to offset */
+-#endif
+-#ifndef SEEK_CUR
+-#define SEEK_CUR 1 /* set file offset to current plus offset */
+-#endif
+-#ifndef SEEK_END
+-#define SEEK_END 2 /* set file offset to EOF plus offset */
+-#endif
+-
+-int fclose(FILE *);
+-int fflush(FILE *);
+-FILE *fopen(const char * __restrict, const char * __restrict) __asm(__FOPEN_NAME);
+-FILE *fdopen(int, const char *) __asm(__FDOPEN_NAME);
+-int fprintf(FILE * __restrict, const char * __restrict, ...);
+-int fputc(int, FILE *);
+-size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict)
+- __asm(__FWRITE_NAME);
+-size_t fread(void * __restrict, size_t, size_t, FILE * __restrict);
+-long ftell(FILE *);
+-int fseek(FILE *, long, int);
+-int snprintf(char * __restrict, size_t, const char * __restrict, ...);
+-
+-#if defined(__cplusplus)
+-}
+-#endif
+-
+-#endif /* __STDIO_H__ */
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/stdlib.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/stdlib.h
+deleted file mode 100644
+index b6d3171..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/stdlib.h
++++ /dev/null
+@@ -1,32 +0,0 @@
+-/* ===-- stdlib.h - stub SDK header for compiler-rt -------------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#ifndef __STDLIB_H__
+-#define __STDLIB_H__
+-
+-#define NULL ((void *)0)
+-
+-typedef __SIZE_TYPE__ size_t;
+-
+-void abort(void) __attribute__((__noreturn__));
+-int atexit(void (*)(void));
+-int atoi(const char *);
+-void free(void *);
+-char *getenv(const char *);
+-void *malloc(size_t);
+-void *realloc(void *, size_t);
+-
+-#endif /* __STDLIB_H__ */
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/string.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/string.h
+deleted file mode 100644
+index 1a00574..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/string.h
++++ /dev/null
+@@ -1,52 +0,0 @@
+-/* ===-- string.h - stub SDK header for compiler-rt -------------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#ifndef __STRING_H__
+-#define __STRING_H__
+-
+-typedef __SIZE_TYPE__ size_t;
+-
+-int memcmp(const void *, const void *, size_t);
+-void *memcpy(void *, const void *, size_t);
+-void *memset(void *, int, size_t);
+-char *strcat(char *, const char *);
+-char *strcpy(char *, const char *);
+-char *strdup(const char *);
+-size_t strlen(const char *);
+-char *strncpy(char *, const char *, size_t);
+-
+-/* Determine the appropriate strerror() function. */
+-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
+-# if defined(__i386)
+-# define __STRERROR_NAME "_strerror$UNIX2003"
+-# elif defined(__x86_64__) || defined(__arm)
+-# define __STRERROR_NAME "_strerror"
+-# else
+-# error "unrecognized architecture for targeting OS X"
+-# endif
+-#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
+-# if defined(__i386) || defined (__x86_64) || defined(__arm)
+-# define __STRERROR_NAME "_strerror"
+-# else
+-# error "unrecognized architecture for targeting iOS"
+-# endif
+-#else
+-# error "unrecognized architecture for targeting Darwin"
+-#endif
+-
+-char *strerror(int) __asm(__STRERROR_NAME);
+-
+-#endif /* __STRING_H__ */
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/errno.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/errno.h
+deleted file mode 100644
+index 4befe38..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/errno.h
++++ /dev/null
+@@ -1,31 +0,0 @@
+-/* ===-- errno.h - stub SDK header for compiler-rt --------------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#ifndef _SYS_ERRNO_H_
+-#define _SYS_ERRNO_H_
+-
+-#if defined(__cplusplus)
+-extern "C" {
+-#endif
+-
+-extern int *__error(void);
+-#define errno (*__error())
+-
+-#if defined(__cplusplus)
+-}
+-#endif
+-
+-#endif
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/fcntl.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/fcntl.h
+deleted file mode 100644
+index e121949..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/fcntl.h
++++ /dev/null
+@@ -1,52 +0,0 @@
+-/* ===-- fcntl.h - stub SDK header for compiler-rt --------------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#ifndef _SYS_FCNTL_H_
+-#define _SYS_FCNTL_H_
+-
+-/* Determine the appropriate open function. */
+-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
+-# if defined(__i386)
+-# define __OPEN_NAME "_open$UNIX2003"
+-# elif defined(__x86_64__)
+-# define __OPEN_NAME "_open"
+-# elif defined(__arm)
+-# define __OPEN_NAME "_open"
+-# else
+-# error "unrecognized architecture for targeting OS X"
+-# endif
+-#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
+-# if defined(__i386) || defined (__x86_64)
+-# define __OPEN_NAME "_open"
+-# elif defined(__arm)
+-# define __OPEN_NAME "_open"
+-# else
+-# error "unrecognized architecture for targeting iOS"
+-# endif
+-#else
+-# error "unrecognized architecture for targeting Darwin"
+-#endif
+-
+-#define O_RDONLY 0x0000 /* open for reading only */
+-#define O_WRONLY 0x0001 /* open for writing only */
+-#define O_RDWR 0x0002 /* open for reading and writing */
+-#define O_ACCMODE 0x0003 /* mask for above modes */
+-
+-#define O_CREAT 0x0200 /* create if nonexistent */
+-
+-int open(const char *, int, ...) __asm(__OPEN_NAME);
+-
+-#endif /* !_SYS_FCNTL_H_ */
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/mman.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/mman.h
+deleted file mode 100644
+index 84561f1..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/mman.h
++++ /dev/null
+@@ -1,42 +0,0 @@
+-/* ===-- mman.h - stub SDK header for compiler-rt ---------------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#ifndef __SYS_MMAN_H__
+-#define __SYS_MMAN_H__
+-
+-typedef __SIZE_TYPE__ size_t;
+-
+-#define PROT_NONE 0x00
+-#define PROT_READ 0x01
+-#define PROT_WRITE 0x02
+-#define PROT_EXEC 0x04
+-
+-#define MAP_SHARED 0x0001
+-#define MAP_PRIVATE 0x0002
+-
+-#define MAP_FILE 0x0000
+-#define MAP_ANON 0x1000
+-
+-#define MS_ASYNC 0x0001
+-#define MS_INVALIDATE 0x0002
+-#define MS_SYNC 0x0010
+-
+-void *mmap(void *addr, size_t len, int prot, int flags, int fd,
+- long long offset);
+-int munmap(void *addr, size_t len);
+-int msync(void *addr, size_t len, int flags);
+-
+-#endif /* __SYS_MMAN_H__ */
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/stat.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/stat.h
+deleted file mode 100644
+index 6225f90..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/stat.h
++++ /dev/null
+@@ -1,25 +0,0 @@
+-/* ===-- stat.h - stub SDK header for compiler-rt ---------------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#ifndef __SYS_STAT_H__
+-#define __SYS_STAT_H__
+-
+-typedef unsigned short uint16_t;
+-typedef uint16_t mode_t;
+-
+-int mkdir(const char *, mode_t);
+-
+-#endif /* __SYS_STAT_H__ */
+diff --git llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/types.h macports_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/types.h
+deleted file mode 100644
+index b425767..0000000
+--- llvm_release_35/projects/compiler-rt/SDKs/darwin/usr/include/sys/types.h
++++ /dev/null
+@@ -1,20 +0,0 @@
+-/* ===-- types.h - stub SDK header for compiler-rt --------------------------===
+- *
+- * The LLVM Compiler Infrastructure
+- *
+- * This file is dual licensed under the MIT and the University of Illinois Open
+- * Source Licenses. See LICENSE.TXT for details.
+- *
+- * ===-----------------------------------------------------------------------===
+- *
+- * This is a stub SDK header file. This file is not part of the interface of
+- * this library nor an official version of the appropriate SDK header. It is
+- * intended only to stub the features of this header required by compiler-rt.
+- *
+- * ===-----------------------------------------------------------------------===
+- */
+-
+-#ifndef __SYS_TYPES_H__
+-#define __SYS_TYPES_H__
+-
+-#endif /* __SYS_TYPES_H__ */
+diff --git llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+index 4030383..1358b17 100644
+--- llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
++++ macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+@@ -6,16 +6,21 @@
+
+ Description := Static runtime libraries for clang/Darwin.
+
+-# A function that ensures we don't try to build for architectures that we
+-# don't have working toolchains for.
++# A function that ensures we don't try to build for architectures and SDKs
++# that we don't have working toolchains for. Arguments:
++# (1): List of architectures
++# (2): Library name
++# (3): SDK path
++# The result is a possibly empty subset of the architectures from argument 1.
+ CheckArches = \
+ $(shell \
+ result=""; \
+- for arch in $(1); do \
++ if [ "X$(3)" != X ]; then \
++ for arch in $(1); do \
+ if $(CC) -arch $$arch -c \
+ -integrated-as \
+ $(ProjSrcRoot)/make/platform/clang_darwin_test_input.c \
+- -isysroot $(ProjSrcRoot)/SDKs/darwin \
++ -isysroot $(3) \
+ -o /dev/null > /dev/null 2> /dev/null; then \
+ if $(LD) -v 2>&1 | grep "configured to support" \
+ | tr ' ' '\n' | grep "^$$arch$$" >/dev/null 2>/dev/null; then \
+@@ -30,7 +35,8 @@ CheckArches = \
+ "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'"; \
+ printf 1>&2 " (clang does not support it)\n"; \
+ fi; \
+- done; \
++ done; \
++ fi; \
+ echo $$result)
+
+ XCRun = \
+@@ -53,6 +59,10 @@ STRIP := $(call XCRun,strip)
+ LIPO := $(call XCRun,lipo)
+ DSYMUTIL := $(call XCRun,dsymutil)
+
++OSX_SDK := $(call XCRunSdkPath,macosx)
++IOS_SDK := $(call XCRunSdkPath,iphoneos)
++IOSSIM_SDK := $(call XCRunSdkPath,iphonesimulator)
++
+ Configs :=
+ UniversalArchs :=
+
+@@ -60,51 +70,53 @@ UniversalArchs :=
+ # still be referenced from Darwin system headers. This symbol is only ever
+ # needed on i386.
+ Configs += eprintf
+-UniversalArchs.eprintf := $(call CheckArches,i386,eprintf)
++UniversalArchs.eprintf := $(call CheckArches,i386,eprintf,$(OSX_SDK))
+
+ # Configuration for targeting 10.4. We need a few functions missing from
+ # libgcc_s.10.4.dylib. We only build x86 slices since clang doesn't really
+ # support targeting PowerPC.
+ Configs += 10.4
+-UniversalArchs.10.4 := $(call CheckArches,i386 x86_64,10.4)
++UniversalArchs.10.4 := $(call CheckArches,i386 x86_64,10.4,$(OSX_SDK))
+
+ # Configuration for targeting iOS for a couple of functions that didn't
+ # make it into libSystem.
+ Configs += ios
+-UniversalArchs.ios := $(call CheckArches,i386 x86_64 armv7,ios)
++UniversalArchs.ios := $(call CheckArches,i386 x86_64,ios,$(IOSSIM_SDK))
++UniversalArchs.ios += $(call CheckArches,armv7,ios,$(IOS_SDK))
+
+ # Configuration for targeting OSX. These functions may not be in libSystem
+ # so we should provide our own.
+ Configs += osx
+-UniversalArchs.osx := $(call CheckArches,i386 x86_64 x86_64h,osx)
++UniversalArchs.osx := $(call CheckArches,i386 x86_64 x86_64h,osx,$(OSX_SDK))
+
+ # Configuration for use with kernel/kexts.
+ Configs += cc_kext
+-UniversalArchs.cc_kext := $(call CheckArches,armv7 i386 x86_64 x86_64h,cc_kext)
++UniversalArchs.cc_kext := $(call CheckArches,i386 x86_64 x86_64h,cc_kext,$(OSX_SDK))
++UniversalArchs.cc_kext += $(call CheckArches,armv7,cc_kext,$(IOS_SDK))
+
+ # Configuration for use with kernel/kexts for iOS 5.0 and earlier (which used
+-# a different code generation strategy).
++# a different code generation strategy). Note: the x86_64 slice is unused but
++# it avoids build problems (see pr14013).
+ Configs += cc_kext_ios5
+-UniversalArchs.cc_kext_ios5 := $(call CheckArches,x86_64 armv7,cc_kext_ios5)
++UniversalArchs.cc_kext_ios5 := $(call CheckArches,x86_64,cc_kext_ios5,$(IOSSIM_SDK))
++UniversalArchs.cc_kext_ios5 += $(call CheckArches,armv7,cc_kext_ios5,$(IOS_SDK))
+
+ # Configurations which define the profiling support functions.
+ Configs += profile_osx
+-UniversalArchs.profile_osx := $(call CheckArches,i386 x86_64 x86_64h,profile_osx)
++UniversalArchs.profile_osx := $(call CheckArches,i386 x86_64 x86_64h,profile_osx,$(OSX_SDK))
+ Configs += profile_ios
+-UniversalArchs.profile_ios := $(call CheckArches,i386 x86_64 armv7,profile_ios)
++UniversalArchs.profile_ios := $(call CheckArches,i386 x86_64,profile_ios,$(IOSSIM_SDK))
++UniversalArchs.profile_ios += $(call CheckArches,armv7,profile_ios,$(IOS_SDK))
+
+ # Configurations which define the ASAN support functions.
+ Configs += asan_osx_dynamic
+-UniversalArchs.asan_osx_dynamic := $(call CheckArches,i386 x86_64 x86_64h,asan_osx_dynamic)
++UniversalArchs.asan_osx_dynamic := $(call CheckArches,i386 x86_64 x86_64h,asan_osx_dynamic,$(OSX_SDK))
+
+-IOSSIM_SDK_PATH := $(call XCRunSdkPath,iphonesimulator)
+-ifneq ($(IOSSIM_SDK_PATH),)
+ Configs += asan_iossim_dynamic
+-UniversalArchs.asan_iossim_dynamic := $(call CheckArches,i386 x86_64,asan_iossim_dynamic)
+-endif
++UniversalArchs.asan_iossim_dynamic := $(call CheckArches,i386 x86_64,asan_iossim_dynamic,$(IOSSIM_SDK))
+
+ Configs += ubsan_osx
+-UniversalArchs.ubsan_osx := $(call CheckArches,i386 x86_64 x86_64h,ubsan_osx)
++UniversalArchs.ubsan_osx := $(call CheckArches,i386 x86_64 x86_64h,ubsan_osx,$(OSX_SDK))
+
+ # Darwin 10.6 has a bug in cctools that makes it unable to use ranlib on our ARM
+ # object files. If we are on that platform, strip out all ARM archs. We still
+@@ -119,17 +131,18 @@ UniversalArchs.ubsan_osx := $(call CheckArches,i386 x86_64 x86_64h,ubsan_osx)
+
+ # If RC_SUPPORTED_ARCHS is defined, treat it as a list of the architectures we
+ # are intended to support and limit what we try to build to that.
+-#
+-# We make sure to remove empty configs if we end up dropping all the requested
+-# archs for a particular config.
+ ifneq ($(RC_SUPPORTED_ARCHS),)
+ $(foreach config,$(Configs),\
+ $(call Set,UniversalArchs.$(config),\
+- $(filter $(RC_SUPPORTED_ARCHS),$(UniversalArchs.$(config))))\
+- $(if $(UniversalArchs.$(config)),,\
+- $(call Set,Configs,$(filter-out $(config),$(Configs)))))
++ $(filter $(RC_SUPPORTED_ARCHS),$(UniversalArchs.$(config))))
+ endif
+
++# Remove empty configs if we end up dropping all the requested
++# archs for a particular config.
++$(foreach config,$(Configs),\
++ $(if $(strip $(UniversalArchs.$(config))),,\
++ $(call Set,Configs,$(filter-out $(config),$(Configs)))))
++
+ ###
+
+ # Forcibly strip off any -arch, as that totally breaks our universal support.
+@@ -147,28 +160,31 @@ IOS_DEPLOYMENT_ARGS := -mios-version-min=1.0
+ IOS6_DEPLOYMENT_ARGS := -mios-version-min=6.0
+ IOSSIM_DEPLOYMENT_ARGS := -mios-simulator-version-min=1.0
+
+-# Use our stub SDK as the sysroot to support more portable building.
+-OSX_DEPLOYMENT_ARGS += -isysroot $(ProjSrcRoot)/SDKs/darwin
+-IOS_DEPLOYMENT_ARGS += -isysroot $(ProjSrcRoot)/SDKs/darwin
+-IOS6_DEPLOYMENT_ARGS += -isysroot $(ProjSrcRoot)/SDKs/darwin
+-IOSSIM_DEPLOYMENT_ARGS += -isysroot $(ProjSrcRoot)/SDKs/darwin
++OSX_DEPLOYMENT_ARGS += -isysroot $(OSX_SDK)
++IOS_DEPLOYMENT_ARGS += -isysroot $(IOS_SDK)
++IOS6_DEPLOYMENT_ARGS += -isysroot $(IOS_SDK)
++IOSSIM_DEPLOYMENT_ARGS += -isysroot $(IOSSIM_SDK)
+
+ CFLAGS.eprintf := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
+ CFLAGS.10.4 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
+-# FIXME: We can't build ASAN with our stub SDK yet.
++
+ CFLAGS.asan_osx_dynamic := \
+- $(CFLAGS) -mmacosx-version-min=10.6 -fno-builtin \
++ $(CFLAGS) -mmacosx-version-min=10.6 \
++ -isysroot $(OSX_SDK) \
++ -fno-builtin \
+ -gline-tables-only \
+ -DMAC_INTERPOSE_FUNCTIONS=1
+
+ CFLAGS.asan_iossim_dynamic := \
+ $(CFLAGS) -mios-simulator-version-min=7.0 \
+- -isysroot $(IOSSIM_SDK_PATH) \
++ -isysroot $(IOSSIM_SDK) \
+ -fno-builtin \
+ -gline-tables-only \
+ -DMAC_INTERPOSE_FUNCTIONS=1
+
+-CFLAGS.ubsan_osx := $(CFLAGS) -mmacosx-version-min=10.6 -fno-builtin
++CFLAGS.ubsan_osx := $(CFLAGS) -mmacosx-version-min=10.6 \
++ -isysroot $(OSX_SDK) \
++ -fno-builtin
+
+ CFLAGS.ios.i386 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
+ CFLAGS.ios.x86_64 := $(CFLAGS) $(IOSSIM_DEPLOYMENT_ARGS)
+@@ -206,7 +222,7 @@ SHARED_LIBRARY.asan_iossim_dynamic := 1
+ # or -Wl,-syslibroot.
+ LDFLAGS.asan_iossim_dynamic := -undefined dynamic_lookup \
+ -Wl,-ios_simulator_version_min,7.0.0 \
+- -mios-simulator-version-min=7.0 -isysroot $(IOSSIM_SDK_PATH)
++ -mios-simulator-version-min=7.0 -isysroot $(IOSSIM_SDK)
+
+ FUNCTIONS.eprintf := eprintf
+ FUNCTIONS.10.4 := eprintf floatundidf floatundisf floatundixf
+--
+2.2.2
+
Added: trunk/dports/lang/llvm-3.5/files/2004-Clean-up-indentation-after-previous-change.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/2004-Clean-up-indentation-after-previous-change.patch (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/2004-Clean-up-indentation-after-previous-change.patch 2015-01-18 05:07:16 UTC (rev 131767)
@@ -0,0 +1,62 @@
+From ca5f37834f494bfc968dcb3c54df85ed98e7e827 Mon Sep 17 00:00:00 2001
+From: Bob Wilson <bob.wilson at apple.com>
+Date: Mon, 10 Nov 2014 19:38:18 +0000
+Subject: [PATCH 2004/2007] Clean up indentation after previous change.
+
+git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221622 91177308-0d34-0410-b5e6-96231b3b80d8
+(cherry picked from commit 7c2a39493c7e0ee26078a380ca0f0890dd7566eb)
+---
+ make/platform/clang_darwin.mk | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+index 1358b17..6d3a0f8 100644
+--- llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
++++ macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+@@ -16,26 +16,26 @@ CheckArches = \
+ $(shell \
+ result=""; \
+ if [ "X$(3)" != X ]; then \
+- for arch in $(1); do \
+- if $(CC) -arch $$arch -c \
+- -integrated-as \
+- $(ProjSrcRoot)/make/platform/clang_darwin_test_input.c \
+- -isysroot $(3) \
+- -o /dev/null > /dev/null 2> /dev/null; then \
+- if $(LD) -v 2>&1 | grep "configured to support" \
+- | tr ' ' '\n' | grep "^$$arch$$" >/dev/null 2>/dev/null; then \
+- result="$$result$$arch "; \
++ for arch in $(1); do \
++ if $(CC) -arch $$arch -c \
++ -integrated-as \
++ $(ProjSrcRoot)/make/platform/clang_darwin_test_input.c \
++ -isysroot $(3) \
++ -o /dev/null > /dev/null 2> /dev/null; then \
++ if $(LD) -v 2>&1 | grep "configured to support" \
++ | tr ' ' '\n' | grep "^$$arch$$" >/dev/null 2>/dev/null; then \
++ result="$$result$$arch "; \
++ else \
++ printf 1>&2 \
++ "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'";\
++ printf 1>&2 " (ld does not support it)\n"; \
++ fi; \
+ else \
+ printf 1>&2 \
+- "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'"; \
+- printf 1>&2 " (ld does not support it)\n"; \
++ "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'"; \
++ printf 1>&2 " (clang does not support it)\n"; \
+ fi; \
+- else \
+- printf 1>&2 \
+- "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'"; \
+- printf 1>&2 " (clang does not support it)\n"; \
+- fi; \
+- done; \
++ done; \
+ fi; \
+ echo $$result)
+
+--
+2.2.2
+
Added: trunk/dports/lang/llvm-3.5/files/2005-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/2005-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/2005-Update-CheckArches-to-fallback-on-Intel-ppc-if-ld-v-.patch 2015-01-18 05:07:16 UTC (rev 131767)
@@ -0,0 +1,32 @@
+From d181817db18a2172b616050e9d8d674d0d1ca003 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Sat, 10 Jan 2015 03:34:51 -0800
+Subject: [PATCH 2005/2007] Update CheckArches to fallback on Intel/ppc if ld
+ -v doesn't report supported architectures
+
+Older versions of ld64 (eg: Xcode 3.x) do not report this.
+
+http://www.llvm.org/bugs/show_bug.cgi?id=22182
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+(cherry picked from commit b16ca706de5eeb244b1fe889760ae4339b23a170)
+---
+ make/platform/clang_darwin.mk | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+index 6d3a0f8..2917c1e 100644
+--- llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
++++ macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+@@ -25,6 +25,8 @@ CheckArches = \
+ if $(LD) -v 2>&1 | grep "configured to support" \
+ | tr ' ' '\n' | grep "^$$arch$$" >/dev/null 2>/dev/null; then \
+ result="$$result$$arch "; \
++ elif ! ( $(LD) -v 2>&1 | grep "configured to support" ) && test "$$arch" = "i386" -o "$$arch" = "x86_64" -o "$$arch" = "ppc" -o "$$arch" = "ppc64" ; then \
++ result="$$result$$arch "; \
+ else \
+ printf 1>&2 \
+ "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'";\
+--
+2.2.2
+
Added: trunk/dports/lang/llvm-3.5/files/2006-Fall-back-on-xcodebuild-sdk-when-xcrun-sdk-is-not-su.patch
===================================================================
--- trunk/dports/lang/llvm-3.5/files/2006-Fall-back-on-xcodebuild-sdk-when-xcrun-sdk-is-not-su.patch (rev 0)
+++ trunk/dports/lang/llvm-3.5/files/2006-Fall-back-on-xcodebuild-sdk-when-xcrun-sdk-is-not-su.patch 2015-01-18 05:07:16 UTC (rev 131767)
@@ -0,0 +1,30 @@
+From 0d05e3a5a64eb7640c627c2e45af69c670cc7215 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Sat, 17 Jan 2015 17:45:27 -0800
+Subject: [PATCH 2006/2007] Fall back on xcodebuild -sdk when xcrun --sdk is
+ not supported
+
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+(cherry picked from commit e1ded9c3e06fb5c97d8936b77ccf8982e52a7b69)
+---
+ make/platform/clang_darwin.mk | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+index 2917c1e..068034e 100644
+--- llvm_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
++++ macports_release_35/projects/compiler-rt/make/platform/clang_darwin.mk
+@@ -49,6 +49,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)
+ ###
+--
+2.2.2
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150117/d1d11ef2/attachment-0001.html>
More information about the macports-changes
mailing list