1 |
commit: d8573370e0da40d6a506d564af24a47927923dc2 |
2 |
Author: Craig Andrews <candrews <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 8 17:57:27 2020 +0000 |
4 |
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 8 17:57:46 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8573370 |
7 |
|
8 |
sys-devel/llvm-roc: Fix undefined reference to current_pos() |
9 |
|
10 |
Closes: https://bugs.gentoo.org/741118 |
11 |
Package-Manager: Portage-3.0.6, Repoman-3.0.1 |
12 |
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org> |
13 |
|
14 |
.../files/llvm-roc-3.7.0-current_pos.patch | 32 ++++++++++++++++++++++ |
15 |
sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild | 4 +++ |
16 |
2 files changed, 36 insertions(+) |
17 |
|
18 |
diff --git a/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch b/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..a0d3c1df6d9 |
21 |
--- /dev/null |
22 |
+++ b/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch |
23 |
@@ -0,0 +1,32 @@ |
24 |
+https://bugs.llvm.org/show_bug.cgi?id=43235 |
25 |
+ |
26 |
+diff --git a/llvm/include/llvm/Support/raw_ostream.h b/llvm/include/llvm/Support/raw_ostream.h |
27 |
+index 705f1790b1d..a0314b2c46a 100644 |
28 |
+--- a/include/llvm/Support/raw_ostream.h |
29 |
++++ b/include/llvm/Support/raw_ostream.h |
30 |
+@@ -507,9 +507,7 @@ class raw_string_ostream : public raw_ostream { |
31 |
+ /// See raw_ostream::write_impl. |
32 |
+ void write_impl(const char *Ptr, size_t Size) override; |
33 |
+ |
34 |
+- /// Return the current position within the stream, not counting the bytes |
35 |
+- /// currently in the buffer. |
36 |
+- uint64_t current_pos() const override { return OS.size(); } |
37 |
++ uint64_t current_pos() const override; |
38 |
+ |
39 |
+ public: |
40 |
+ explicit raw_string_ostream(std::string &O) : OS(O) {} |
41 |
+diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp |
42 |
+index 4bb315f824a..742e2aced39 100644 |
43 |
+--- a/lib/Support/raw_ostream.cpp |
44 |
++++ b/lib/Support/raw_ostream.cpp |
45 |
+@@ -895,6 +895,10 @@ raw_ostream &llvm::nulls() { |
46 |
+ // raw_string_ostream |
47 |
+ //===----------------------------------------------------------------------===// |
48 |
+ |
49 |
++/// Return the current position within the stream, not counting the bytes |
50 |
++/// currently in the buffer. |
51 |
++uint64_t raw_string_ostream::current_pos() const { return OS.size(); } |
52 |
++ |
53 |
+ raw_string_ostream::~raw_string_ostream() { |
54 |
+ flush(); |
55 |
+ } |
56 |
|
57 |
diff --git a/sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild b/sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild |
58 |
index ec60b28f085..6586ec782b7 100644 |
59 |
--- a/sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild |
60 |
+++ b/sys-devel/llvm-roc/llvm-roc-3.7.0-r1.ebuild |
61 |
@@ -23,6 +23,10 @@ PDEPEND="dev-libs/rocr-runtime" |
62 |
|
63 |
S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" |
64 |
|
65 |
+PATCHES=( |
66 |
+ "${FILESDIR}/${P}-current_pos.patch" |
67 |
+) |
68 |
+ |
69 |
CMAKE_BUILD_TYPE=RelWithDebInfo |
70 |
|
71 |
src_prepare() { |