[97607] trunk/dports/lang/clang-3.2

jeremyhu at macports.org jeremyhu at macports.org
Sun Sep 9 14:42:40 PDT 2012


Revision: 97607
          https://trac.macports.org/changeset/97607
Author:   jeremyhu at macports.org
Date:     2012-09-09 14:42:39 -0700 (Sun, 09 Sep 2012)
Log Message:
-----------
clang-3.2: Install C++ headers and build fix for Leopard.  See #34288

Modified Paths:
--------------
    trunk/dports/lang/clang-3.2/Portfile

Added Paths:
-----------
    trunk/dports/lang/clang-3.2/files/leopard-no-asan.patch

Modified: trunk/dports/lang/clang-3.2/Portfile
===================================================================
--- trunk/dports/lang/clang-3.2/Portfile	2012-09-09 21:27:20 UTC (rev 97606)
+++ trunk/dports/lang/clang-3.2/Portfile	2012-09-09 21:42:39 UTC (rev 97607)
@@ -4,7 +4,7 @@
 PortGroup select        1.0
 
 set llvm_version        3.2
-revision		0
+revision		1
 name                    clang-${llvm_version}
 set suffix              mp-${llvm_version}
 set sub_prefix          ${prefix}/libexec/llvm-${llvm_version}
@@ -36,6 +36,7 @@
 svn.revision            163429
 version                 ${llvm_version}-r${svn.revision}
 set compiler_rt_rev     ${svn.revision}
+set libcxx_rev          ${svn.revision}
 worksrcdir              trunk
 svn.url                 http://llvm.org/svn/llvm-project/llvm/trunk
 #worksrcdir              release_32
@@ -44,6 +45,7 @@
 
 #version                 ${llvm_version}
 #set compiler_rt_rev     150641
+#set libcxx_rev          ${compiler_rt_rev}
 #epoch                   1
 #master_sites            http://llvm.org/releases/${version}/
 #extract.suffix          .tar.gz
@@ -124,6 +126,10 @@
         # http://trac.macports.org/ticket/33987
         configure.args-append --with-optimize-option=-Os
     }
+
+    if {${os.major} <= 9} {
+        patchfiles-append       leopard-no-asan.patch
+    }
 }
 
 platform darwin 8 {
@@ -142,9 +148,14 @@
     system "cd ${worksrcpath}/tools && svn co -r ${svn.revision} http://llvm.org/svn/llvm-project/cfe/trunk clang"
     #system "cd ${worksrcpath}/tools && svn co -r ${svn.revision} http://llvm.org/svn/llvm-project/cfe/branches/release_32 clang"
     #file rename ${workpath}/clang-${llvm_version}.src ${worksrcpath}/tools/clang
+
     system "cd ${worksrcpath}/projects && svn co -r ${compiler_rt_rev} http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt"
     #system "cd ${worksrcpath}/projects && svn co -r ${compiler_rt_rev} http://llvm.org/svn/llvm-project/compiler-rt/branches/release_32 compiler-rt"
     #file rename ${workpath}/compiler-rt-${llvm_version}.src ${worksrcpath}/projects/compiler-rt
+
+    system "cd ${worksrcpath}/projects && svn co -r ${libcxx_rev} http://llvm.org/svn/llvm-project/libcxx/trunk libcxx"
+    #system "cd ${worksrcpath}/projects && svn co -r ${libcxx_rev} http://llvm.org/svn/llvm-project/libcxx/branches/release_32 libcxx"
+    #file rename ${workpath}/libcxx-${llvm_version}.src ${worksrcpath}/projects/libcxx
 }
 
 variant arm_runtime description {Build and install the arm runtime for iOS development (requires iOS SDK)} {}
@@ -232,6 +243,8 @@
         reinplace "s:EXEC_PATH:${exec_path}:" "${bin_filename}"
     }
 
+    system "ditto ${worksrcpath}/projects/libcxx/include ${destroot}${sub_prefix}/lib/c++/v1"
+
     # http://trac.macports.org/ticket/33207
     ln -s ${prefix}/libexec/ld64/ld ${destroot}${sub_prefix}/bin/ld
 

Added: trunk/dports/lang/clang-3.2/files/leopard-no-asan.patch
===================================================================
--- trunk/dports/lang/clang-3.2/files/leopard-no-asan.patch	                        (rev 0)
+++ trunk/dports/lang/clang-3.2/files/leopard-no-asan.patch	2012-09-09 21:42:39 UTC (rev 97607)
@@ -0,0 +1,74 @@
+--- projects/compiler-rt/make/platform/clang_darwin.mk.orig	2012-09-09 12:50:49.000000000 -0700
++++ projects/compiler-rt/make/platform/clang_darwin.mk	2012-09-09 12:51:36.000000000 -0700
+@@ -58,11 +58,11 @@ Configs += profile_osx
+ UniversalArchs.profile_osx := $(call CheckArches,i386 x86_64,profile_osx)
+ 
+ # Configurations which define the ASAN support functions.
+-Configs += asan_osx
+-UniversalArchs.asan_osx := $(call CheckArches,i386 x86_64,asan_osx)
+-
+-Configs += asan_osx_dynamic
+-UniversalArchs.asan_osx_dynamic := $(call CheckArches,i386 x86_64,asan_osx_dynamic)
++#Configs += asan_osx
++#UniversalArchs.asan_osx := $(call CheckArches,i386 x86_64,asan_osx)
++#
++#Configs += asan_osx_dynamic
++#UniversalArchs.asan_osx_dynamic := $(call CheckArches,i386 x86_64,asan_osx_dynamic)
+ 
+ # 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.
+@@ -97,10 +97,10 @@ OSX_DEPLOYMENT_ARGS += -isysroot $(ProjS
+ 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         := $(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin
+-CFLAGS.asan_osx_dynamic := \
+-	$(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin \
+-	-DMAC_INTERPOSE_FUNCTIONS=1
++#CFLAGS.asan_osx         := $(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin
++#CFLAGS.asan_osx_dynamic := \
++#	$(CFLAGS) -mmacosx-version-min=10.5 -fno-builtin \
++#	-DMAC_INTERPOSE_FUNCTIONS=1
+ 
+ CFLAGS.osx.i386		:= $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
+ CFLAGS.osx.x86_64	:= $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
+@@ -110,8 +110,8 @@ CFLAGS.profile_osx.i386   := $(CFLAGS) $
+ CFLAGS.profile_osx.x86_64 := $(CFLAGS) $(OSX_DEPLOYMENT_ARGS)
+ 
+ # Configure the asan_osx_dynamic library to be built shared.
+-SHARED_LIBRARY.asan_osx_dynamic := 1
+-LDFLAGS.asan_osx_dynamic := -framework Foundation -lc++
++#SHARED_LIBRARY.asan_osx_dynamic := 1
++#LDFLAGS.asan_osx_dynamic := -framework Foundation -lc++
+ 
+ FUNCTIONS.eprintf := eprintf
+ FUNCTIONS.10.4 := eprintf floatundidf floatundisf floatundixf
+@@ -120,11 +120,11 @@ FUNCTIONS.osx	:= mulosi4 mulodi4 muloti4
+ 
+ FUNCTIONS.profile_osx := GCDAProfiling
+ 
+-FUNCTIONS.asan_osx := $(AsanFunctions) $(InterceptionFunctions) \
+-                                       $(SanitizerCommonFunctions)
+-FUNCTIONS.asan_osx_dynamic := $(AsanFunctions) $(InterceptionFunctions) \
+-                              $(SanitizerCommonFunctions) \
+-	                      $(AsanDynamicFunctions)
++#FUNCTIONS.asan_osx := $(AsanFunctions) $(InterceptionFunctions) \
++#                                       $(SanitizerCommonFunctions)
++#FUNCTIONS.asan_osx_dynamic := $(AsanFunctions) $(InterceptionFunctions) \
++#                              $(SanitizerCommonFunctions) \
++#	                      $(AsanDynamicFunctions)
+ 
+ CCKEXT_COMMON_FUNCTIONS := \
+ 	absvdi2 \
+--- tools/clang/runtime/compiler-rt/Makefile.orig	2012-09-09 12:41:38.000000000 -0700
++++ tools/clang/runtime/compiler-rt/Makefile	2012-09-09 12:42:04.000000000 -0700
+@@ -75,7 +75,7 @@ ifeq ($(OS),Darwin)
+ RuntimeDirs += darwin
+ RuntimeLibrary.darwin.Configs := \
+ 	eprintf 10.4 osx cc_kext \
+-	asan_osx profile_osx
++	profile_osx
+ endif
+ 
+ # On Linux, include a library which has all the runtime functions.
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120909/8bcd8cc0/attachment-0001.html>


More information about the macports-changes mailing list