Date: Sunday, February 2, 2014 @ 19:29:20 Author: heftig Revision: 105199
2.2.4 Modified: rubinius/trunk/PKGBUILD Deleted: rubinius/trunk/llvm34.patch --------------+ PKGBUILD | 16 ++--- llvm34.patch | 182 --------------------------------------------------------- 2 files changed, 7 insertions(+), 191 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2014-02-02 18:07:23 UTC (rev 105198) +++ PKGBUILD 2014-02-02 18:29:20 UTC (rev 105199) @@ -3,8 +3,8 @@ pkgbase=rubinius pkgname=(rubinius rubinius-ruby) -pkgver=2.2.3 -pkgrel=2 +pkgver=2.2.4 +pkgrel=1 pkgdesc="Ruby runtime written in Ruby, designed for concurrency" arch=(i686 x86_64) url="http://rubini.us" @@ -13,11 +13,10 @@ makedepends=(llvm rubinius-ruby) options=(!emptydirs) source=(http://releases.rubini.us/${pkgbase}-${pkgver}.tar.bz2 - gemrc dirs.patch llvm34.patch) -sha256sums=('b3426aa6996420f1d9d8a7926a94160b84d8bdf725793c64462b27b74f2f2acf' + gemrc dirs.patch) +sha256sums=('7d06d63d12d9eecff196d8f53953bd520c17fbb9baa921c5481c43af8129d85e' '4bb7eb2fe66e396ed16b589cdb656831407b39ad4e138d88536754c0448ac614' - '93f3918dc2a5679e281e724f9b3cb712ffa784c1e52e6fa7ce75f74ce6655a66' - 'a24850f34a8a308ce4a4e1da12d75a669095a38b6b5da5082eb4d3bd41770095') + '93f3918dc2a5679e281e724f9b3cb712ffa784c1e52e6fa7ce75f74ce6655a66') prepare() { export GEM_HOME="$srcdir/gemdir" LANG="en_US.UTF-8" @@ -24,7 +23,6 @@ cd $pkgbase-$pkgver patch -Np1 -i ../dirs.patch - patch -Np1 -i ../llvm34.patch mkdir -p "$GEM_HOME" gem install --no-user-install -N vendor/cache/bundler-*.gem @@ -63,7 +61,7 @@ DESTDIR="$pkgdir" rake install mkdir -p "$pkgdir/usr/share/ri" - ln -s 2.0.0 "$pkgdir/usr/share/ri/2.1" + ln -s 2.1.0 "$pkgdir/usr/share/ri/2.1" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/rubinius/LICENSE" @@ -77,7 +75,7 @@ package_rubinius-ruby() { pkgdesc="Ruby compat for Rubinius" - depends=(rubinius) + depends=("rubinius=$pkgver-$pkgrel") provides=(ruby) conflicts=(ruby) backup=(etc/gemrc) Deleted: llvm34.patch =================================================================== --- llvm34.patch 2014-02-02 18:07:23 UTC (rev 105198) +++ llvm34.patch 2014-02-02 18:29:20 UTC (rev 105199) @@ -1,182 +0,0 @@ -diff --git i/vm/llvm/disassembler.cpp w/vm/llvm/disassembler.cpp -index 79c74ff..b3ea424 100644 ---- i/vm/llvm/disassembler.cpp -+++ w/vm/llvm/disassembler.cpp -@@ -46,20 +46,27 @@ namespace rubinius { - #if RBX_LLVM_API_VER > 300 - llvm::TargetOptions options; - options.NoFramePointerElim = true; -+#if RBX_LLVM_API_VER < 304 - options.NoFramePointerElimNonLeaf = true; -+#endif - target_machine = target->createTargetMachine(host, llvm::sys::getHostCPUName(), "", options); - #else - target_machine = target->createTargetMachine(host, llvm::sys::getHostCPUName(), ""); - #endif - - sub_target = target->createMCSubtargetInfo(host, llvm::sys::getHostCPUName(), ""); -- asm_info = target->createMCAsmInfo(host); - - #if RBX_LLVM_API_VER > 300 - instr_info = target->createMCInstrInfo(); - reg_info = target->createMCRegInfo(host); - #endif - -+#if RBX_LLVM_API_VER > 303 -+ asm_info = target->createMCAsmInfo(*reg_info, host); -+#else -+ asm_info = target->createMCAsmInfo(host); -+#endif -+ - if(asm_info) { - disassembler = target->createMCDisassembler(*sub_target); - memory_object = new JITMemoryObject((const uint8_t*)buffer, (uint64_t) size); -diff --git i/vm/llvm/jit_builder.cpp w/vm/llvm/jit_builder.cpp -index 652350f..c479aab 100644 ---- i/vm/llvm/jit_builder.cpp -+++ w/vm/llvm/jit_builder.cpp -@@ -56,12 +56,21 @@ namespace jit { - "", "rubinius", true, "", 0); - DIFile file = debug_builder().createFile(file_str, ""); - -+#if RBX_LLVM_API_VER > 303 -+ DIType dummy_return_type = debug_builder().createNullPtrType(); -+ Value* dummy_signature[] = { -+ &*dummy_return_type, -+ }; -+ DICompositeType dummy_subroutine_type = debug_builder().createSubroutineType(file, -+ debug_builder().getOrCreateArray(dummy_signature)); -+#else - DIType dummy_return_type = debug_builder().createNullPtrType("dummy type"); - Value* dummy_signature[] = { - &*dummy_return_type, - }; - DIType dummy_subroutine_type = debug_builder().createSubroutineType(file, - debug_builder().getOrCreateArray(dummy_signature)); -+#endif - - #if RBX_LLVM_API_VER > 300 - DISubprogram subprogram = debug_builder().createFunction(file, "", "", -diff --git i/vm/llvm/jit_context.cpp w/vm/llvm/jit_context.cpp -index e555adb..594a63a 100644 ---- i/vm/llvm/jit_context.cpp -+++ w/vm/llvm/jit_context.cpp -@@ -84,7 +84,9 @@ namespace rubinius { - #if RBX_LLVM_API_VER > 300 - llvm::TargetOptions opts; - opts.NoFramePointerElim = true; -+#if RBX_LLVM_API_VER < 304 - opts.NoFramePointerElimNonLeaf = true; -+#endif - opts.JITEmitDebugInfo = true; - - factory.setTargetOptions(opts); -diff --git i/vm/llvm/jit_memory_manager.hpp w/vm/llvm/jit_memory_manager.hpp -index 8a58a09..7205f89 100644 ---- i/vm/llvm/jit_memory_manager.hpp -+++ w/vm/llvm/jit_memory_manager.hpp -@@ -202,7 +202,7 @@ namespace jit { - - public: - RubiniusJITMemoryManager(); -- ~RubiniusJITMemoryManager(); -+ virtual ~RubiniusJITMemoryManager(); - - /// allocateNewSlab - Allocates a new MemoryBlock and remembers it as the - /// last slab it allocated, so that subsequent allocations follow it. -@@ -356,8 +356,13 @@ namespace jit { - } - - /// allocateCodeSection - Allocate memory for a code section. -+#if RBX_LLVM_API_VER > 303 -+ virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, -+ unsigned SectionID, StringRef SectionName) { -+#else - uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID) { -+#endif - utilities::thread::SpinLock::LockGuard guard(lock_); - // Grow the required block size to account for the block header - Size += sizeof(*CurBlock); -@@ -397,11 +402,21 @@ namespace jit { - } - - /// allocateDataSection - Allocate memory for a data section. -- uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, -- unsigned SectionID) { -+ /// TODO: currently IsReadOnly is ignored. -+#if RBX_LLVM_API_VER > 303 -+ virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, -+ unsigned SectionID, StringRef SectionName, -+ bool IsReadOnly) { - utilities::thread::SpinLock::LockGuard guard(lock_); - return (uint8_t*)DataAllocator.Allocate(Size, Alignment); - } -+#else -+ uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, -+ unsigned SectionID, bool IsReadOnly) { -+ utilities::thread::SpinLock::LockGuard guard(lock_); -+ return (uint8_t*)DataAllocator.Allocate(Size, Alignment); -+ } -+#endif - - /// startExceptionTable - Use startFunctionBody to allocate memory for the - /// function's exception table. -@@ -495,7 +510,7 @@ namespace jit { - , GOTBase(NULL) - {} - -- ~RubiniusRequestJITMemoryManager() { -+ virtual ~RubiniusRequestJITMemoryManager() { - if(GOTBase) delete[] GOTBase; - } - -@@ -504,17 +519,32 @@ namespace jit { - return mgr_->getPointerToNamedFunction(Name, AbortOnFailure); - } - -+#if RBX_LLVM_API_VER >= 304 -+ virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, -+ unsigned SectionID, StringRef SectionName) { -+ return mgr_->allocateCodeSection(Size, Alignment, SectionID, -+ SectionName); -+ } -+#else - uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID) { - return mgr_->allocateCodeSection(Size, Alignment, SectionID); - } -+#endif - - /// allocateDataSection - Allocate memory for a data section. --#if RBX_LLVM_API_VER >= 303 -+#if RBX_LLVM_API_VER >= 304 -+ virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, -+ unsigned SectionID, StringRef SectionName, -+ bool IsReadOnly) { -+ return mgr_->allocateDataSection(Size, Alignment, SectionID, -+ SectionName, IsReadOnly); -+ } -+#elif RBX_LLVM_API_VER >= 303 - uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID, bool IsReadOnly) { -- // TODO: currently IsReadOnly is ignored. -- return mgr_->allocateDataSection(Size, Alignment, SectionID); -+ return mgr_->allocateDataSection(Size, Alignment, SectionID, -+ IsReadOnly); - } - #else - uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, -@@ -601,6 +631,12 @@ namespace jit { - void resetGeneratedFunction() { - GeneratedFunction = NULL; - } -+ -+#if RBX_LLVM_API_VER > 303 -+ virtual bool finalizeMemory(std::string* ErrMsg = 0) { -+ return false; -+ } -+#endif - }; - -