Revision: 105535 https://trac.macports.org/changeset/105535 Author: larryv@macports.org Date: 2013-04-23 17:07:12 -0700 (Tue, 23 Apr 2013) Log Message: ----------- rust: Update to 0.6 (#38663; thanks g5pw!). * Use newest snapshot compiler. * Whitelist working compilers instead of having a huge blacklist. * Remove obsolete patches and workarounds. * Add dependency on libstdcxx if built with macports-gcc-*. * Build both i686 and x86_64 targets. * Adjust CPP to match usage in configure script. Modified Paths: -------------- trunk/dports/lang/rust/Portfile trunk/dports/lang/rust/files/patch-configure.diff Added Paths: ----------- trunk/dports/lang/rust/files/patch-mk-platform.mk.diff Removed Paths: ------------- trunk/dports/lang/rust/files/patch-non_apple_gcc.diff trunk/dports/lang/rust/files/patch-src-etc-local_stage0.sh.diff trunk/dports/lang/rust/files/patch-src-librusti-rusti.rc.diff trunk/dports/lang/rust/files/patch-src-rustllvm-RustWrapper.cpp.diff Modified: trunk/dports/lang/rust/Portfile =================================================================== --- trunk/dports/lang/rust/Portfile 2013-04-23 23:48:50 UTC (rev 105534) +++ trunk/dports/lang/rust/Portfile 2013-04-24 00:07:12 UTC (rev 105535) @@ -5,8 +5,7 @@ PortGroup compiler_blacklist_versions 1.0 name rust -version 0.5 -revision 4 +version 0.6 categories lang devel platforms darwin supported_archs i386 x86_64 @@ -36,26 +35,26 @@ master_sites http://static.rust-lang.org/dist:dist distfiles [suffix ${distname}]:dist checksums [suffix ${distname}] \ - rmd160 b4988da7be984aa1337f4076e96e6d0c72e3170d \ - sha256 d326d22707f0562d669c11efbc33ae812ddbf76ab78f07087fc5beb095a8928a + rmd160 429c9727a228dc734395c0d54bf151e3bcb2d014 \ + sha256 e11cb529a1e20f27d99033181a9e0e131817136b46d2742f0fa1afa1210053e5 # Select the snapshot compiler; see src/snapshots.txt in distribution. set stage0(distdir) rust-stage0 -set stage0(date) 2012-12-19 -set stage0(rev) 8554d5e +set stage0(date) 2013-03-28 +set stage0(rev) f7a2371 platform darwin i386 { set stage0(platform) macos-${configure.build_arch} switch ${configure.build_arch} { x86_64 { - set stage0(hash) e4564933f11b17f7dbd25b61032233693da21dc5 - set stage0(rmd160) 3d966bd2d17e3f2c74ed78f3674439c89d5a16ee - set stage0(sha256) a2e287a683128e2e213e11c5b9f92e5e628eb63163591d61523549deb2e21f7d + set stage0(hash) fbd3feec8dd17a6b6c8df114e6e9b4cd17cc6172 + set stage0(rmd160) a9bd2a854f107dbfe1a7c6a8d142bf45cba8909d + set stage0(sha256) aed0c5f4b14a7ede41b08ad122e36a233fadfefe3c3f3e974d39442deab01897 } i386 { - set stage0(hash) 151ff211c01f0b7a1895b93ff0bc021bf1472346 - set stage0(rmd160) 300b17458073a8704817821bd5406189a264f765 - set stage0(sha256) 5e598d4c45ee2dd8b7f2b69d92f60d16e57991e796d76ca255a612357a5e48e0 + set stage0(hash) 2e05a33716fc4982db53946c3b0dccf0194826fe + set stage0(rmd160) 0865660ba2f864f8bbcb3022871fdbd2d6de1ea6 + set stage0(sha256) ad708818e8e6b684855b58c9a74dce1485dc7e5fad09370fe39324d4c74f8c27 } } set stage0(distfile) [join "rust stage0 ${stage0(date)} @@ -82,52 +81,55 @@ # Upstream only supports gcc 4.4 and newer and clang based on LLVM # 3.0svn and newer. The clang restriction could probably be tighter; # clang-77 is Apple Clang 1.7 (LLVM 2.9svn) from Xcode 3.2.6. -compiler.blacklist gcc-3.3 gcc-4.0 gcc-4.2 \ - apple-gcc-4.0 apple-gcc-4.2 \ - llvm-gcc-4.2 macports-llvm-gcc-4.2 \ - macports-gcc-4.2 macports-gcc-4.3 \ - {clang <= 77} macports-clang-2.9 -# TODO: Remove when base fallback lists are updated (2.2?). -compiler.fallback-append macports-clang-3.2 +# +# These are the supported compilers that produce correct output on +# OS X 10.8.3 (i.e., the final product passes upstream's test suite). +compiler.whitelist clang macports-clang-3.2 \ + macports-gcc-4.7 macports-gcc-4.6 macports-gcc-4.5 +compiler.blacklist {clang <= 77} patch.pre_args -p1 -patchfiles patch-configure.diff \ - patch-src-etc-local_stage0.sh.diff \ - patch-src-librusti-rusti.rc.diff \ - patch-src-rustllvm-RustWrapper.cpp.diff -# Non-Apple GCC - and, by extension, DragonEgg - accepts neither -# -Wnewline-eof (https://github.com/mozilla/rust/issues/4783) -# nor -arch (until 4.7). -if {[string first clang ${configure.compiler}] == -1} { - patchfiles-append patch-non_apple_gcc.diff +patchfiles patch-configure.diff +# FSF GCC older than 4.7 does not accept -arch. +if {[string match {macports-gcc-4.[4-6]} ${configure.compiler}] || + [string match {macports-dragonegg-3.[0-2]} ${configure.compiler}] +} then { + patchfiles-append patch-mk-platform.mk.diff } -# Using MacPorts' LLVM currently results in a stage2 compiler that -# segfaults during the build; until we fix this, we need Python. The -# weird dependency is to accommodate older systems that only have Python -# 2.6; if we have to provide our own, we'd rather install 2.7. The build -# itself will detect either. +# Building the bundled LLVM requires Python 2.4-2.7. All supported +# OS X releases have 2.6. (Using MacPorts' LLVM ports fails either +# during build or during testing.) depends_build bin:perl:perl5 \ - bin:python2.6:python27 + bin:python2:python27 depends_skip_archcheck python27 -# TODO: Remove when automatic compiler dependencies are released (2.2?). +# TODO: Remove when automatic compiler dependencies are released (2.2?), +# but do NOT remove dependency on libstdcxx. if {[info exists portconfigure::compiler_name_map(${configure.compiler})]} { set compiler $portconfigure::compiler_name_map(${configure.compiler}) if {[string first macports-gcc- ${configure.compiler}] == 0} { - depends_lib-append port:${compiler} + depends_lib-append port:${compiler} \ + {path:lib/libstdc\\+\\+.6.dylib:libstdcxx} } else { - depends_build-append port:${compiler} + depends_build-append port:${compiler} } if {[portconfigure::arch_flag_supported ${configure.compiler}]} { depends_skip_archcheck-append ${compiler} } } +# TODO: Test whether i386 machines can cross-compile for x86_64. platform darwin i386 { - set cpu [string map {i386 i686} ${configure.build_arch}] - configure.pre_args-append --host-triple=${cpu}-apple-darwin${os.major} + set tgts {i686-apple-darwin x86_64-apple-darwin} + configure.pre_args-append --target-triples=[join $tgts ,] + if {${configure.build_arch} eq "i386"} { + configure.pre_args-append --build-triple=[lindex $tgts 0] + } else { + configure.pre_args-append --build-triple=[lindex $tgts 1] + } } +# TODO: Build docs also, probably in a subport. configure.args --disable-docs \ --enable-local-rust \ --local-rust-root=${workpath}/${stage0(distdir)} @@ -139,8 +141,11 @@ build.args VERBOSE=1 \ CC=${configure.cc} \ CXX=${configure.cxx} \ - CPP="${configure.cc} -E" + CPP=${configure.cc} +# TODO: Add path-style dependency on python, whenever test dependencies +# are implemented (#38208). Not critical, since all supported versions +# of OS X come with Python 2.6. test.run yes test.target check test.env VERBOSE=1 @@ -155,13 +160,6 @@ xinstall -d ${destroot}${prefix}/share/${name} xinstall -m 644 ${worksrcpath}/src/etc/ctags.rust \ ${destroot}${prefix}/share/${name} - - # Remove zero-byte libraries until - # https://github.com/mozilla/rust/issues/4468 is resolved. - delete ${destroot}${prefix}/lib/libcargo.dylib \ - ${destroot}${prefix}/lib/librustc.dylib \ - ${destroot}${prefix}/lib/librustdoc.dylib \ - ${destroot}${prefix}/lib/librusti.dylib } livecheck.type regex Modified: trunk/dports/lang/rust/files/patch-configure.diff =================================================================== --- trunk/dports/lang/rust/files/patch-configure.diff 2013-04-23 23:48:50 UTC (rev 105534) +++ trunk/dports/lang/rust/files/patch-configure.diff 2013-04-24 00:07:12 UTC (rev 105535) @@ -1,8 +1,8 @@ diff --git a/configure b/configure -index f2afa2d..172984f 100755 +index 71beb82..9353a3f 100755 --- a/configure +++ b/configure -@@ -363,7 +363,7 @@ fi +@@ -401,7 +401,7 @@ fi step_msg "looking for build programs" probe_need CFG_PERL perl @@ -11,7 +11,7 @@ probe_need CFG_PYTHON python2.7 python2.6 python2 python python_version=$($CFG_PYTHON -V 2>&1) -@@ -382,8 +382,10 @@ else +@@ -420,8 +420,10 @@ else probe_need CFG_GIT git fi @@ -22,27 +22,9 @@ +probe CFG_CLANG $CXX +probe CFG_GCC $CC probe CFG_LD ld - probe CFG_LLVM_CONFIG llvm-config probe CFG_VALGRIND valgrind -@@ -494,7 +496,7 @@ then - LLVM_VERSION=$($LLVM_CONFIG --version) - - case $LLVM_VERSION in -- (3.1svn|3.1|3.0svn|3.0) -+ (3.?svn|3.?) - msg "found ok version of LLVM: $LLVM_VERSION" - ;; - (*) -@@ -516,7 +518,7 @@ then - | cut -d ' ' -f 2) - - case $CFG_CLANG_VERSION in -- (3.0svn | 3.0 | 3.1 | 4.0 | 4.1) -+ (3.0svn | 3.? | 4.?) - step_msg "found ok version of CLANG: $CFG_CLANG_VERSION" - CFG_C_COMPILER="clang" - ;; -@@ -727,20 +729,11 @@ do + probe CFG_PERF perf +@@ -814,20 +816,11 @@ do --enable-bindings=none --disable-threads \ --disable-pthreads" Added: trunk/dports/lang/rust/files/patch-mk-platform.mk.diff =================================================================== --- trunk/dports/lang/rust/files/patch-mk-platform.mk.diff (rev 0) +++ trunk/dports/lang/rust/files/patch-mk-platform.mk.diff 2013-04-24 00:07:12 UTC (rev 105535) @@ -0,0 +1,22 @@ +diff --git a/mk/platform.mk b/mk/platform.mk +index 16b5ba4..2e1701a 100644 +--- a/mk/platform.mk ++++ b/mk/platform.mk +@@ -171,7 +171,7 @@ AR_x86_64-apple-darwin=$(AR) + CFG_LIB_NAME_x86_64-apple-darwin=lib$(1).dylib + CFG_LIB_GLOB_x86_64-apple-darwin=lib$(1)-*.dylib + CFG_LIB_DSYM_GLOB_x86_64-apple-darwin=lib$(1)-*.dylib.dSYM +-CFG_GCCISH_CFLAGS_x86_64-apple-darwin := -Wall -Werror -g -fPIC -m64 -arch x86_64 ++CFG_GCCISH_CFLAGS_x86_64-apple-darwin := -Wall -Werror -g -fPIC -m64 + CFG_GCCISH_CXXFLAGS_x86_64-apple-darwin := -fno-rtti + CFG_GCCISH_LINK_FLAGS_x86_64-apple-darwin := -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind -m64 + CFG_GCCISH_DEF_FLAG_x86_64-apple-darwin := -Wl,-exported_symbols_list, +@@ -196,7 +196,7 @@ AR_i686-apple-darwin=$(AR) + CFG_LIB_NAME_i686-apple-darwin=lib$(1).dylib + CFG_LIB_GLOB_i686-apple-darwin=lib$(1)-*.dylib + CFG_LIB_DSYM_GLOB_i686-apple-darwin=lib$(1)-*.dylib.dSYM +-CFG_GCCISH_CFLAGS_i686-apple-darwin := -Wall -Werror -g -fPIC -m32 -arch i386 ++CFG_GCCISH_CFLAGS_i686-apple-darwin := -Wall -Werror -g -fPIC -m32 + CFG_GCCISH_CXXFLAGS_i686-apple-darwin := -fno-rtti + CFG_GCCISH_LINK_FLAGS_i686-apple-darwin := -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind -m32 + CFG_GCCISH_DEF_FLAG_i686-apple-darwin := -Wl,-exported_symbols_list, Deleted: trunk/dports/lang/rust/files/patch-non_apple_gcc.diff =================================================================== --- trunk/dports/lang/rust/files/patch-non_apple_gcc.diff 2013-04-23 23:48:50 UTC (rev 105534) +++ trunk/dports/lang/rust/files/patch-non_apple_gcc.diff 2013-04-24 00:07:12 UTC (rev 105535) @@ -1,159 +0,0 @@ -diff --git a/mk/libuv/ia32/mac/src/libuv/run-benchmarks.target.mk b/mk/libuv/ia32/mac/src/libuv/run-benchmarks.target.mk -index b8cc0a1..b72d2da 100644 ---- a/mk/libuv/ia32/mac/src/libuv/run-benchmarks.target.mk -+++ b/mk/libuv/ia32/mac/src/libuv/run-benchmarks.target.mk -@@ -14,8 +14,7 @@ DEFS_Debug := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Debug := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch i386 \ -+ -m32 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -@@ -49,8 +48,7 @@ DEFS_Release := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Release := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch i386 \ -+ -m32 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -diff --git a/mk/libuv/ia32/mac/src/libuv/run-tests.target.mk b/mk/libuv/ia32/mac/src/libuv/run-tests.target.mk -index be0c2c6..c48674e 100644 ---- a/mk/libuv/ia32/mac/src/libuv/run-tests.target.mk -+++ b/mk/libuv/ia32/mac/src/libuv/run-tests.target.mk -@@ -14,8 +14,7 @@ DEFS_Debug := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Debug := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch i386 \ -+ -m32 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -@@ -49,8 +48,7 @@ DEFS_Release := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Release := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch i386 \ -+ -m32 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -diff --git a/mk/libuv/ia32/mac/src/libuv/uv.target.mk b/mk/libuv/ia32/mac/src/libuv/uv.target.mk -index 9838606..427fca2 100644 ---- a/mk/libuv/ia32/mac/src/libuv/uv.target.mk -+++ b/mk/libuv/ia32/mac/src/libuv/uv.target.mk -@@ -17,8 +17,7 @@ DEFS_Debug := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Debug := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch i386 \ -+ -m32 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -@@ -59,8 +58,7 @@ DEFS_Release := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Release := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch i386 \ -+ -m32 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -diff --git a/mk/libuv/x86_64/mac/src/libuv/run-benchmarks.target.mk b/mk/libuv/x86_64/mac/src/libuv/run-benchmarks.target.mk -index f5930c9..8734156 100644 ---- a/mk/libuv/x86_64/mac/src/libuv/run-benchmarks.target.mk -+++ b/mk/libuv/x86_64/mac/src/libuv/run-benchmarks.target.mk -@@ -14,8 +14,7 @@ DEFS_Debug := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Debug := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch x86_64 \ -+ -m64 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -@@ -49,8 +48,7 @@ DEFS_Release := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Release := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch x86_64 \ -+ -m64 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -diff --git a/mk/libuv/x86_64/mac/src/libuv/run-tests.target.mk b/mk/libuv/x86_64/mac/src/libuv/run-tests.target.mk -index 4694c7c..fc93deb 100644 ---- a/mk/libuv/x86_64/mac/src/libuv/run-tests.target.mk -+++ b/mk/libuv/x86_64/mac/src/libuv/run-tests.target.mk -@@ -14,8 +14,7 @@ DEFS_Debug := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Debug := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch x86_64 \ -+ -m64 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -@@ -49,8 +48,7 @@ DEFS_Release := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Release := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch x86_64 \ -+ -m64 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -diff --git a/mk/libuv/x86_64/mac/src/libuv/uv.target.mk b/mk/libuv/x86_64/mac/src/libuv/uv.target.mk -index 385a64c..6a348a1 100644 ---- a/mk/libuv/x86_64/mac/src/libuv/uv.target.mk -+++ b/mk/libuv/x86_64/mac/src/libuv/uv.target.mk -@@ -17,8 +17,7 @@ DEFS_Debug := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Debug := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch x86_64 \ -+ -m64 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -@@ -59,8 +58,7 @@ DEFS_Release := '-D_LARGEFILE_SOURCE' \ - CFLAGS_Release := -Os \ - -gdwarf-2 \ - -fvisibility=hidden \ -- -Wnewline-eof \ -- -arch x86_64 \ -+ -m64 \ - -fno-strict-aliasing \ - -Wall \ - -Wendif-labels \ -diff --git a/mk/platform.mk b/mk/platform.mk -index d2f8745..12fb7e2 100644 ---- a/mk/platform.mk -+++ b/mk/platform.mk -@@ -101,8 +101,8 @@ ifneq ($(findstring darwin,$(CFG_OSTYPE)),) - # approaches welcome! - # - # NB: Currently GCC's optimizer breaks rustrt (task-comm-1 hangs) on Darwin. -- CFG_GCCISH_CFLAGS_i386 := -m32 -arch i386 -- CFG_GCCISH_CFLAGS_x86_64 := -m64 -arch x86_64 -+ CFG_GCCISH_CFLAGS_i386 := -m32 -+ CFG_GCCISH_CFLAGS_x86_64 := -m64 - CFG_GCCISH_LINK_FLAGS_i386 := -m32 - CFG_GCCISH_LINK_FLAGS_x86_64 := -m64 - CFG_DSYMUTIL := dsymutil Deleted: trunk/dports/lang/rust/files/patch-src-etc-local_stage0.sh.diff =================================================================== --- trunk/dports/lang/rust/files/patch-src-etc-local_stage0.sh.diff 2013-04-23 23:48:50 UTC (rev 105534) +++ trunk/dports/lang/rust/files/patch-src-etc-local_stage0.sh.diff 2013-04-24 00:07:12 UTC (rev 105535) @@ -1,24 +0,0 @@ -From 1d315aac4403f22274fceab3e22ec1cdb95bad78 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lawrence=20Vela=CC=81zquez?= <larryv@alum.mit.edu> -Date: Tue, 12 Mar 2013 03:34:14 -0400 -Subject: [PATCH] Copy libsyntax from local Rust to stage0. - -The local_stage0 script was not updated after commit 7dcbaed renamed -librustsyntax to libsyntax, so builds using local Rust fail due to -missing libsyntax. ---- - src/etc/local_stage0.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/etc/local_stage0.sh b/src/etc/local_stage0.sh -index e4d7b61..5898bc5 100755 ---- a/src/etc/local_stage0.sh -+++ b/src/etc/local_stage0.sh -@@ -46,3 +46,4 @@ cp ${PREFIX}/lib/rustc/${TARG_DIR}/${LIBDIR}/* ${TARG_DIR}/stage0/${LIBDIR}/ - cp ${PREFIX}/lib/librust*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/ - cp ${PREFIX}/lib/libcore*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/ - cp ${PREFIX}/lib/libstd*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/ -+cp ${PREFIX}/lib/libsyntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/ --- -1.7.10 - Deleted: trunk/dports/lang/rust/files/patch-src-librusti-rusti.rc.diff =================================================================== --- trunk/dports/lang/rust/files/patch-src-librusti-rusti.rc.diff 2013-04-23 23:48:50 UTC (rev 105534) +++ trunk/dports/lang/rust/files/patch-src-librusti-rusti.rc.diff 2013-04-24 00:07:12 UTC (rev 105535) @@ -1,26 +0,0 @@ -From 9bf87bbf66227c132283ae59720f919601de9a56 Mon Sep 17 00:00:00 2001 -From: Patrick Walton <pcwalton@mimiga.net> -Date: Fri, 21 Dec 2012 22:38:45 -0500 -Subject: [PATCH] rusti: Perform mode computation. Closes #4230. - ---- - src/librusti/rusti.rc | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/librusti/rusti.rc b/src/librusti/rusti.rc -index 906735d..80eedbb 100644 ---- a/src/librusti/rusti.rc -+++ b/src/librusti/rusti.rc -@@ -246,6 +246,9 @@ fn run(repl: Repl, input: ~str) -> Repl { - debug!("loop checking"); - middle::check_loop::check_crate(ty_cx, crate); - -+ debug!("mode computation"); -+ middle::mode::compute_modes(ty_cx, method_map, crate); -+ - debug!("alt checking"); - middle::check_alt::check_crate(ty_cx, method_map, crate); - --- -1.7.10 - Deleted: trunk/dports/lang/rust/files/patch-src-rustllvm-RustWrapper.cpp.diff =================================================================== --- trunk/dports/lang/rust/files/patch-src-rustllvm-RustWrapper.cpp.diff 2013-04-23 23:48:50 UTC (rev 105534) +++ trunk/dports/lang/rust/files/patch-src-rustllvm-RustWrapper.cpp.diff 2013-04-24 00:07:12 UTC (rev 105535) @@ -1,30 +0,0 @@ -From 3ee1d3ebb81de199fc630a86933ac18c0a869482 Mon Sep 17 00:00:00 2001 -From: Patrick Walton <pcwalton@mimiga.net> -Date: Sat, 22 Dec 2012 16:24:19 -0500 -Subject: [PATCH] rustllvm: Fix symbol resolution on Mac for rusti. rs=bugfix - ---- - src/rustllvm/RustWrapper.cpp | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp -index 86a302e..bb00f04 100644 ---- a/src/rustllvm/RustWrapper.cpp -+++ b/src/rustllvm/RustWrapper.cpp -@@ -290,6 +290,13 @@ void *RustMCJITMemoryManager::getPointerToNamedFunction(const std::string &Name, - void *Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(NameStr); - if (Ptr) return Ptr; - -+ // If it wasn't found and if it starts with an underscore ('_') character, -+ // try again without the underscore. -+ if (NameStr[0] == '_') { -+ Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(NameStr+1); -+ if (Ptr) return Ptr; -+ } -+ - if (AbortOnFailure) - report_fatal_error("Program used external function '" + Name + - "' which could not be resolved!"); --- -1.7.10 -
participants (1)
-
larryv@macports.org