[97614] trunk/dports/lang
jeremyhu at macports.org
jeremyhu at macports.org
Sun Sep 9 16:16:10 PDT 2012
Revision: 97614
https://trac.macports.org/changeset/97614
Author: jeremyhu at macports.org
Date: 2012-09-09 16:16:08 -0700 (Sun, 09 Sep 2012)
Log Message:
-----------
{clang,dragonegg,llvm}-3.2: Bump to r163481 and move clang-3.2 to be a subport of llvm-3.2
Revision Links:
--------------
https://trac.macports.org/changeset/163481
Modified Paths:
--------------
trunk/dports/lang/dragonegg-3.2/Portfile
trunk/dports/lang/llvm-3.2/Portfile
Added Paths:
-----------
trunk/dports/lang/llvm-3.2/files/install_target.patch
trunk/dports/lang/llvm-3.2/files/leopard-no-asan.patch
trunk/dports/lang/llvm-3.2/files/mp-clang-3.2
trunk/dports/lang/llvm-3.2/files/scan-build-PR-35006.patch
trunk/dports/lang/llvm-3.2/files/tiger-libclang.patch
trunk/dports/lang/llvm-3.2/files/tiger-shlib-clang.patch
Removed Paths:
-------------
trunk/dports/lang/clang-3.2/
Modified: trunk/dports/lang/dragonegg-3.2/Portfile
===================================================================
--- trunk/dports/lang/dragonegg-3.2/Portfile 2012-09-09 23:05:00 UTC (rev 97613)
+++ trunk/dports/lang/dragonegg-3.2/Portfile 2012-09-09 23:16:08 UTC (rev 97614)
@@ -29,7 +29,7 @@
depends_skip_archcheck-append gcc${gcc_version}
fetch.type svn
-svn.revision 163429
+svn.revision 163481
version ${llvm_version}-r${svn.revision}
worksrcdir trunk
svn.url http://llvm.org/svn/llvm-project/dragonegg/trunk
Modified: trunk/dports/lang/llvm-3.2/Portfile
===================================================================
--- trunk/dports/lang/llvm-3.2/Portfile 2012-09-09 23:05:00 UTC (rev 97613)
+++ trunk/dports/lang/llvm-3.2/Portfile 2012-09-09 23:16:08 UTC (rev 97614)
@@ -4,30 +4,53 @@
PortGroup select 1.0
set llvm_version 3.2
-revision 0
name llvm-${llvm_version}
+subport clang-${llvm_version} {}
set suffix mp-${llvm_version}
-set sub_prefix ${prefix}/libexec/${name}
+set sub_prefix ${prefix}/libexec/llvm-${llvm_version}
dist_subdir llvm
categories lang
platforms darwin
license NCSA
maintainers jeremyhu openmaintainer
-description llvm is a next generation compiler infrastructure (svn trunk version)
-long_description The LLVM Core libraries provide a modern source- and \
+
+if {${subport} == "llvm-${llvm_version}"} {
+ homepage http://llvm.org/
+ description llvm is a next generation compiler infrastructure (svn trunk version)
+ long_description The LLVM Core libraries provide a modern source- and \
target-independent optimizer, along with code \
generation support for many popular CPUs (as well as \
some less common ones!) These libraries are built \
around a well specified code representation known as \
the LLVM intermediate representation ("LLVM IR").
-homepage http://llvm.org/
+ depends_lib port:libffi
+ depends_run bin:perl:perl5 port:llvm_select
+} elseif {${subport} == "clang-${llvm_version}"} {
+ homepage http://clang.llvm.org/
+ description C, C++, Objective C and Objective C++ compiler
+ long_description Clang is an "LLVM native" C/C++/Objective-C compiler, \
+ which aims to deliver amazingly fast compiles (e.g. \
+ about 3x faster than GCC when compiling Objective-C \
+ code in a debug configuration), extremely useful error \
+ and warning messages and to provide a platform for \
+ building great source level tools. The included Clang \
+ Static Analyzer is a tool automatically finds bugs in \
+ your code, and is a great example of the sort of tool \
+ that can be built using the Clang frontend as a \
+ library to parse C/C++ code.
-depends_lib port:libffi
-depends_run bin:perl:perl5 port:llvm_select
+ depends_lib port:llvm-${llvm_version} port:libffi
+ depends_run port:clang_select port:ld64
+ depends_skip_archcheck-append ld64
+ default_variants +analyzer
+}
+
fetch.type svn
-svn.revision 163429
+svn.revision 163481
+set compiler_rt_rev ${svn.revision}
+set libcxx_rev ${svn.revision}
version ${llvm_version}-r${svn.revision}
worksrcdir trunk
svn.url http://llvm.org/svn/llvm-project/llvm/trunk
@@ -36,15 +59,31 @@
default_variants-append +assertions
#version ${llvm_version}
+#set compiler_rt_rev 150641
+#set libcxx_rev ${compiler_rt_rev}
#epoch 1
-#master_sites ${homepage}releases/${version}/
+#master_sites http://llvm.org/releases/${version}
#extract.suffix .tar.gz
-#distname llvm-${version}.src
+#distfiles llvm-${version}.src${extract.suffix}
+#worksrcdir llvm-${version}.src
-patchfiles tiger.patch \
+patchfiles install_target.patch \
+ tiger.patch \
tiger-shlib.patch
+
patch.pre_args -p1
+if {${subport} == "clang-${llvm_version}"} {
+ if {${distfiles} != ""} {
+ distfiles-append clang-${version}.src${extract.suffix} compiler-rt-${version}.src${extract.suffix}
+ }
+
+ patchfiles-append tiger-shlib-clang.patch tiger-libclang.patch scan-build-PR-35006.patch
+
+ build.target clang-only
+ destroot.target install-clang
+}
+
build.env-append VERBOSE=1 REQUIRE_RTTI=1
destroot.env-append VERBOSE=1 REQUIRE_RTTI=1
configure.cppflags
@@ -55,8 +94,13 @@
--enable-debug-symbols --disable-debug-runtime \
--prefix="${sub_prefix}"
-select.group llvm
-select.file ${filespath}/mp-${name}
+if {${subport} == "llvm-${llvm_version}"} {
+ select.group llvm
+ select.file ${filespath}/mp-${subport}
+} elseif {${subport} == "clang-${llvm_version}"} {
+ select.group clang
+ select.file ${filespath}/mp-${subport}
+}
# g++-4.0 fails to build some of the newer C++ for ppc
# Intel looks ok, but I prefer using gcc-4.2 for consistency
@@ -108,46 +152,53 @@
configure.args-append --with-optimize-option=-Os
}
- post-destroot {
- foreach liba [glob ${destroot}${sub_prefix}/lib/*dylib] {
- set liba_nodr [string map "${destroot} {}" ${liba}]
- system "install_name_tool -id ${liba_nodr} ${liba}"
-
- foreach libb [glob ${destroot}${sub_prefix}/lib/*dylib] {
- set libb_base [string map "${destroot}${sub_prefix}/lib/ {}" ${libb}]
- set libb_nodr [string map "${destroot} {}" ${libb}]
-
- system "install_name_tool -change @executable_path/../lib/${libb_base} ${libb_nodr} ${liba}"
- }
- }
+ if {${subport} == "clang-${llvm_version}" && ${os.major} <= 9} {
+ patchfiles-append leopard-no-asan.patch
}
}
platform darwin 8 {
+ # Tiger's DevTools make has issues with the nested ifs in compiler-rt
+ depends_run-append port:gmake
+ depends_skip_archcheck-append gmake
+ build.cmd ${prefix}/bin/gmake
+ destroot.cmd ${prefix}/bin/gmake
+
post-configure {
reinplace "/^RPATH/s/=.*/=/" ${worksrcpath}/Makefile.config
}
}
-variant ocaml description {Enable generation of OCaml binding} {
- depends_lib-append port:ocaml
+post-extract {
+ if {${subport} == "clang-${llvm_version}"} {
+ 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
- configure.args-delete --enable-bindings=none
- configure.args-append --enable-bindings=ocaml
+ 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
- destroot.args-append OVERRIDE_libdir=${sub_prefix}/lib
+ 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
+ }
}
+post-patch {
+ if {${subport} == "clang-${llvm_version}"} {
+ # http://trac.macports.org/ticket/33272
+ if {![variant_isset arm_runtime]} {
+ reinplace {/^SubDirs/ s/arm//} ${worksrcpath}/projects/compiler-rt/lib/Makefile.mk
+ reinplace {/^UniversalArchs/ s/arm[^ )]* *//g} ${worksrcpath}/projects/compiler-rt/make/platform/clang_darwin.mk
+ }
+ }
+}
+
post-destroot {
file mkdir ${destroot}${prefix}/share/doc
- file rename ${destroot}${sub_prefix}/docs/llvm ${destroot}${prefix}/share/doc/${name}
+ file rename ${destroot}${sub_prefix}/docs/llvm ${destroot}${prefix}/share/doc/${subport}
- # r156389 (a5d2435409858728970202226d0bbbee508fe408) temporarilary removed llvm man pages
- #foreach man [glob ${destroot}${sub_prefix}/share/man/man1/*.1] {
- # set basename [string map "${destroot}${sub_prefix}/share/man/man1/ {}" ${man}]
- # file rename ${man} ${destroot}${prefix}/share/man/man1/[string map ".1 -${suffix}.1" ${basename}]
- #}
-
foreach bin [glob ${destroot}${sub_prefix}/bin/*] {
set bin_filename [string map "${sub_prefix} ${prefix}" ${bin}]-${suffix}
set exec_path [string map "${destroot}${sub_prefix} ${sub_prefix}" ${bin}]
@@ -155,4 +206,106 @@
xinstall -m 755 "${filespath}/llvm-bin" "${bin_filename}"
reinplace "s:EXEC_PATH:${exec_path}:" "${bin_filename}"
}
+
+ if {${subport} == "llvm-${llvm_version}"} {
+ # r156389 (a5d2435409858728970202226d0bbbee508fe408) temporarilary removed llvm man pages
+ #foreach man [glob ${destroot}${sub_prefix}/share/man/man1/*.1] {
+ # set basename [string map "${destroot}${sub_prefix}/share/man/man1/ {}" ${man}]
+ # file rename ${man} ${destroot}${prefix}/share/man/man1/[string map ".1 -${suffix}.1" ${basename}]
+ #}
+
+ foreach liba [glob ${destroot}${sub_prefix}/lib/*dylib] {
+ set liba_nodr [string map "${destroot} {}" ${liba}]
+ system "install_name_tool -id ${liba_nodr} ${liba}"
+
+ foreach libb [glob ${destroot}${sub_prefix}/lib/*dylib] {
+ set libb_base [string map "${destroot}${sub_prefix}/lib/ {}" ${libb}]
+ set libb_nodr [string map "${destroot} {}" ${libb}]
+
+ system "install_name_tool -change @executable_path/../lib/${libb_base} ${libb_nodr} ${liba}"
+ }
+ }
+ } elseif {${subport} == "clang-${llvm_version}"} {
+ 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
+
+ system "install_name_tool -id ${sub_prefix}/lib/libclang.dylib ${destroot}${sub_prefix}/lib/libclang.dylib"
+ system "install_name_tool -change @executable_path/../lib/libLLVM-${llvm_version}svn.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}svn.dylib ${destroot}${sub_prefix}/lib/libclang.dylib"
+ }
}
+
+if {${subport} == "llvm-${llvm_version}"} {
+ variant ocaml description {Enable generation of OCaml binding} {
+ depends_lib-append port:ocaml
+
+ configure.args-delete --enable-bindings=none
+ configure.args-append --enable-bindings=ocaml
+
+ destroot.args-append OVERRIDE_libdir=${sub_prefix}/lib
+ }
+} elseif {${subport} == "clang-${llvm_version}"} {
+ variant arm_runtime description {Build and install the arm runtime for iOS development (requires iOS SDK)} {}
+
+ set pythonver ""
+ set pythonverdot ""
+
+ if {![variant_isset python25] && ![variant_isset python26]} {
+ default_variants +python27
+ }
+
+ variant python25 conflicts python26 python27 description {Use python 2.5} {
+ set pythonver 25
+ set pythonverdot 2.5
+ }
+
+ variant python26 conflicts python25 python27 description {Use python 2.6} {
+ set pythonver 26
+ set pythonverdot 2.6
+ }
+
+ variant python27 conflicts python25 python26 description {Use python 2.7} {
+ set pythonver 27
+ set pythonverdot 2.7
+ }
+
+ variant analyzer description {Install clang static analyzer} {
+ if {[string equal "${pythonver}" ""]} {
+ ui_error "You mush select a python variant to use the clang static analyzer (+analyzer)"
+ error "Invalid variant combination"
+ }
+
+ depends_run-append port:perl5 port:python${pythonver}
+
+ post-patch {
+ reinplace "s|/usr/bin/env perl|${prefix}/bin/perl5|g" \
+ ${worksrcpath}/tools/clang/tools/scan-build/ccc-analyzer \
+ ${worksrcpath}/tools/clang/tools/scan-build/c++-analyzer \
+ ${worksrcpath}/tools/clang/tools/scan-build/scan-build
+ reinplace "s|/usr/bin/env python|${prefix}/bin/python${pythonverdot}|g" \
+ ${worksrcpath}/tools/clang/tools/scan-build/set-xcode-analyzer \
+ ${worksrcpath}/tools/clang/tools/scan-view/scan-view
+ }
+
+ post-destroot {
+ file mkdir ${destroot}${sub_prefix}/libexec
+ file copy ${worksrcpath}/tools/clang/tools/scan-build ${destroot}${sub_prefix}/libexec/scan-build
+ file copy ${worksrcpath}/tools/clang/tools/scan-view ${destroot}${sub_prefix}/libexec/scan-view
+
+ file delete -force ${destroot}${sub_prefix}/libexec/scan-build/.svn
+ file delete -force ${destroot}${sub_prefix}/libexec/scan-view/.svn
+ file delete -force ${destroot}${sub_prefix}/libexec/scan-view/Resources/.svn
+
+ ln -s ${sub_prefix}/libexec/scan-build/scan-build ${destroot}${sub_prefix}/bin/scan-build
+ ln -s ${sub_prefix}/libexec/scan-view/scan-view ${destroot}${sub_prefix}/bin/scan-view
+ ln -s ${sub_prefix}/bin ${destroot}${sub_prefix}/libexec/scan-build/bin
+
+ xinstall -m 755 "${filespath}/llvm-bin" "${destroot}${prefix}/bin/scan-build-${suffix}"
+ reinplace "s:EXEC_PATH:${sub_prefix}/bin/scan-build:" "${destroot}${prefix}/bin/scan-build-${suffix}"
+
+ xinstall -m 755 "${filespath}/llvm-bin" "${destroot}${prefix}/bin/scan-view-${suffix}"
+ reinplace "s:EXEC_PATH:${sub_prefix}/bin/scan-view:" "${destroot}${prefix}/bin/scan-view-${suffix}"
+ }
+ }
+}
Added: trunk/dports/lang/llvm-3.2/files/install_target.patch
===================================================================
--- trunk/dports/lang/llvm-3.2/files/install_target.patch (rev 0)
+++ trunk/dports/lang/llvm-3.2/files/install_target.patch 2012-09-09 23:16:08 UTC (rev 97614)
@@ -0,0 +1,13 @@
+--- a/Makefile.orig 2012-01-22 17:34:02.000000000 -0800
++++ b/Makefile 2012-01-22 17:34:14.000000000 -0800
+@@ -70,8 +70,7 @@ ifeq ($(MAKECMDGOALS),install-clang)
+ DIRS := tools/clang/tools/driver tools/clang/lib/Headers \
+ tools/clang/tools/libclang tools/clang/tools/c-index-test \
+- tools/clang/include/clang-c \
+- tools/clang/runtime tools/clang/docs \
+- tools/lto runtime
++ tools/clang/include tools/clang/lib \
++ tools/clang/runtime tools/clang/docs
+ OPTIONAL_DIRS :=
+ NO_INSTALL = 1
+ endif
Added: trunk/dports/lang/llvm-3.2/files/leopard-no-asan.patch
===================================================================
--- trunk/dports/lang/llvm-3.2/files/leopard-no-asan.patch (rev 0)
+++ trunk/dports/lang/llvm-3.2/files/leopard-no-asan.patch 2012-09-09 23:16:08 UTC (rev 97614)
@@ -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.
+
Added: trunk/dports/lang/llvm-3.2/files/mp-clang-3.2
===================================================================
--- trunk/dports/lang/llvm-3.2/files/mp-clang-3.2 (rev 0)
+++ trunk/dports/lang/llvm-3.2/files/mp-clang-3.2 2012-09-09 23:16:08 UTC (rev 97614)
@@ -0,0 +1,5 @@
+bin/c-index-test-mp-3.2
+bin/clang++-mp-3.2
+bin/clang-mp-3.2
+bin/scan-build-mp-3.2
+bin/scan-view-mp-3.2
Added: trunk/dports/lang/llvm-3.2/files/scan-build-PR-35006.patch
===================================================================
--- trunk/dports/lang/llvm-3.2/files/scan-build-PR-35006.patch (rev 0)
+++ trunk/dports/lang/llvm-3.2/files/scan-build-PR-35006.patch 2012-09-09 23:16:08 UTC (rev 97614)
@@ -0,0 +1,11 @@
+--- a/tools/clang/tools/scan-build/scan-build.orig 2012-07-12 09:47:19.000000000 -0700
++++ b/tools/clang/tools/scan-build/scan-build 2012-07-12 09:49:15.000000000 -0700
+@@ -1399,6 +1399,8 @@ if (defined $OutputFormat) {
+ Diag "Analysis run complete.\n";
+ Diag "Viewing analysis results in '$HtmlDir' using scan-view.\n";
+ my $ScanView = Cwd::realpath("$RealBin/scan-view");
++ if (! -x $ScanView) { $ScanView = Cwd::realpath("$RealBin/bin/scan-view"); }
++ if (! -x $ScanView) { $ScanView = Cwd::realpath("$RealBin/../scan-view/scan-view"); }
+ if (! -x $ScanView) { $ScanView = "scan-view"; }
+ exec $ScanView, "$HtmlDir";
+ }
Added: trunk/dports/lang/llvm-3.2/files/tiger-libclang.patch
===================================================================
--- trunk/dports/lang/llvm-3.2/files/tiger-libclang.patch (rev 0)
+++ trunk/dports/lang/llvm-3.2/files/tiger-libclang.patch 2012-09-09 23:16:08 UTC (rev 97614)
@@ -0,0 +1,11 @@
+--- a/tools/clang/tools/libclang/CIndex.cpp.orig 2012-04-01 22:38:40.000000000 -0700
++++ b/tools/clang/tools/libclang/CIndex.cpp 2012-04-01 22:39:17.000000000 -0700
+@@ -5754,7 +5754,7 @@ void SetSafetyThreadStackSize(unsigned V
+
+ void clang::setThreadBackgroundPriority() {
+ // FIXME: Move to llvm/Support and make it cross-platform.
+-#ifdef __APPLE__
++#if defined(__APPLE__) && defined(PRIO_DARWIN_THREAD) && defined(PRIO_DARWIN_BG)
+ setpriority(PRIO_DARWIN_THREAD, 0, PRIO_DARWIN_BG);
+ #endif
+ }
Added: trunk/dports/lang/llvm-3.2/files/tiger-shlib-clang.patch
===================================================================
--- trunk/dports/lang/llvm-3.2/files/tiger-shlib-clang.patch (rev 0)
+++ trunk/dports/lang/llvm-3.2/files/tiger-shlib-clang.patch 2012-09-09 23:16:08 UTC (rev 97614)
@@ -0,0 +1,16 @@
+--- llvm-3.0.src.orig/tools/clang/tools/libclang/Makefile 2011-07-09 14:35:58.000000000 -0700
++++ llvm-3.0.src/tools/clang/tools/libclang/Makefile 2012-04-20 10:09:40.000000000 -0700
+@@ -38,9 +38,11 @@ ifeq ($(HOST_OS),Darwin)
+ # Extra options to override libtool defaults.
+ LLVMLibsOptions += -Wl,-dead_strip -Wl,-seg1addr,0xE0000000
+
+- # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
+ DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
+- ifneq ($(DARWIN_VERS),8)
++ ifeq ($(DARWIN_VERS),8)
++ LLVMLibsOptions += -Wl,-install_name \
++ -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
++ else
+ LLVMLibsOptions += -Wl,-install_name \
+ -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)"
+ endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120909/ec6d6408/attachment-0001.html>
More information about the macports-changes
mailing list