mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 07:33:48 +02:00
mclinker: update to 2.10.0.
This commit is contained in:
parent
d5f627949b
commit
c833646cb5
2 changed files with 4 additions and 80 deletions
|
@ -1,77 +0,0 @@
|
||||||
From 55c537ebf0d7b70e85126e2e2b1c675193e38696 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pete Chou <petechou@gmail.com>
|
|
||||||
Date: Fri, 19 Dec 2014 18:10:06 +0800
|
|
||||||
Subject: [PATCH] Fix build with llvm trunk@224046 or later.
|
|
||||||
|
|
||||||
commit 0be06cf3609cdf6bdc8f769348f6ffcaba560eec
|
|
||||||
Author: Rafael Espindola <rafael.espindola@gmail.com>
|
|
||||||
Date: Thu Dec 11 20:12:55 2014 +0000
|
|
||||||
|
|
||||||
Remove a convoluted way of calling close by moving the call to the only caller.
|
|
||||||
|
|
||||||
As a bonus we can actually check the return value.
|
|
||||||
|
|
||||||
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224046 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
||||||
---
|
|
||||||
lib/Core/Linker.cpp | 4 ++--
|
|
||||||
lib/Support/FileOutputBuffer.cpp | 13 +++++++------
|
|
||||||
2 files changed, 9 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/Core/Linker.cpp b/lib/Core/Linker.cpp
|
|
||||||
index b499b80..92747d5 100644
|
|
||||||
--- a/lib/Core/Linker.cpp
|
|
||||||
+++ b/lib/Core/Linker.cpp
|
|
||||||
@@ -281,7 +281,7 @@ bool Linker::emit(const Module& pModule, const std::string& pPath) {
|
|
||||||
FileOutputBuffer::create(
|
|
||||||
file, m_pObjLinker->getWriter()->getOutputSize(pModule), output);
|
|
||||||
|
|
||||||
- result = emit(*output.get());
|
|
||||||
+ result = emit(*output);
|
|
||||||
file.close();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
@@ -294,7 +294,7 @@ bool Linker::emit(const Module& pModule, int pFileDescriptor) {
|
|
||||||
FileOutputBuffer::create(
|
|
||||||
file, m_pObjLinker->getWriter()->getOutputSize(pModule), output);
|
|
||||||
|
|
||||||
- return emit(*output.get());
|
|
||||||
+ return emit(*output);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Linker::reset() {
|
|
||||||
diff --git a/lib/Support/FileOutputBuffer.cpp b/lib/Support/FileOutputBuffer.cpp
|
|
||||||
index 11435ea..5418ead 100644
|
|
||||||
--- a/lib/Support/FileOutputBuffer.cpp
|
|
||||||
+++ b/lib/Support/FileOutputBuffer.cpp
|
|
||||||
@@ -19,17 +19,17 @@ FileOutputBuffer::FileOutputBuffer(llvm::sys::fs::mapped_file_region* pRegion,
|
|
||||||
|
|
||||||
FileOutputBuffer::~FileOutputBuffer() {
|
|
||||||
// Unmap buffer, letting OS flush dirty pages to file on disk.
|
|
||||||
- m_pRegion.reset(0);
|
|
||||||
+ m_pRegion.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
-std::error_code FileOutputBuffer::create(
|
|
||||||
- FileHandle& pFileHandle,
|
|
||||||
- size_t pSize,
|
|
||||||
- std::unique_ptr<FileOutputBuffer>& pResult) {
|
|
||||||
+std::error_code
|
|
||||||
+FileOutputBuffer::create(FileHandle& pFileHandle,
|
|
||||||
+ size_t pSize,
|
|
||||||
+ std::unique_ptr<FileOutputBuffer>& pResult) {
|
|
||||||
std::error_code ec;
|
|
||||||
std::unique_ptr<llvm::sys::fs::mapped_file_region> mapped_file(
|
|
||||||
new llvm::sys::fs::mapped_file_region(pFileHandle.handler(),
|
|
||||||
- false, llvm::sys::fs::mapped_file_region::readwrite, pSize, 0, ec));
|
|
||||||
+ llvm::sys::fs::mapped_file_region::readwrite, pSize, 0, ec));
|
|
||||||
|
|
||||||
if (ec)
|
|
||||||
return ec;
|
|
||||||
@@ -37,6 +37,7 @@ std::error_code FileOutputBuffer::create(
|
|
||||||
pResult.reset(new FileOutputBuffer(mapped_file.get(), pFileHandle));
|
|
||||||
if (pResult)
|
|
||||||
mapped_file.release();
|
|
||||||
+
|
|
||||||
return std::error_code();
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,22 +1,23 @@
|
||||||
# Template file for 'mclinker'
|
# Template file for 'mclinker'
|
||||||
pkgname=mclinker
|
pkgname=mclinker
|
||||||
version=2.9.0
|
version=2.10.0
|
||||||
revision=1
|
revision=1
|
||||||
_version="${version%.*}" _version="${_version//.}"
|
_version="${version%.*}" _version="${_version//.}"
|
||||||
wrksrc="$pkgname-release_${_version}"
|
wrksrc="$pkgname-release_${_version}"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
hostmakedepends="automake libtool flex llvm"
|
hostmakedepends="automake libtool flex llvm"
|
||||||
makedepends="zlib-devel libffi-devel libedit-devel ncurses-devel"
|
makedepends="zlib-devel libffi-devel libedit-devel ncurses-devel llvm"
|
||||||
short_desc="LLVM Linker for Mobile Computing"
|
short_desc="LLVM Linker for Mobile Computing"
|
||||||
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
|
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
|
||||||
license="BSD"
|
license="BSD"
|
||||||
homepage="https://github.com/$pkgname/$pkgname"
|
homepage="https://github.com/$pkgname/$pkgname"
|
||||||
distfiles="$homepage/archive/release_${_version}.tar.gz"
|
distfiles="$homepage/archive/release_${_version}.tar.gz"
|
||||||
checksum=af09905283840d3c3f29a202889711eec7fafd6090e09d3d71c9fdba5e83f4a4
|
checksum=b2364bb985630c0b4744d735ba0fc69d41854f947e493c61f7efb0f308143e4d
|
||||||
patch_args="-Np1"
|
patch_args="-Np1"
|
||||||
nocross=yes
|
nocross=yes
|
||||||
|
|
||||||
pre_configure() {
|
pre_configure() {
|
||||||
|
sed -i 's|llvm/Option/OptParser.td|/usr/include/llvm/Option/OptParser.td|g' tools/mcld/Options.td # HACK: hardcode header location
|
||||||
sed -i '/unittests/d' configure.ac
|
sed -i '/unittests/d' configure.ac
|
||||||
sed -i 's/unittests//' Makefile.am
|
sed -i 's/unittests//' Makefile.am
|
||||||
sed -i '/unittests/d' Makefile.am
|
sed -i '/unittests/d' Makefile.am
|
||||||
|
|
Loading…
Add table
Reference in a new issue