aboutsummaryrefslogtreecommitdiffstats
path: root/dist
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-01-10 15:13:34 +0100
committerTor Egge <Tor.Egge@online.no>2022-01-10 15:13:34 +0100
commit8f24bc21e0b1796da063443b82d45f6ab7518909 (patch)
tree5b6c63eacf117a4367209e2cf7f4861c05150b20 /dist
parent47619ac5e5ec9cb75e650ea9161350e05f5a10a8 (diff)
Patch llvm (version 10 to 12) when using gcc 11.
Diffstat (limited to 'dist')
-rw-r--r--dist/STLExtras.h.diff20
-rw-r--r--dist/vespa.spec6
2 files changed, 26 insertions, 0 deletions
diff --git a/dist/STLExtras.h.diff b/dist/STLExtras.h.diff
new file mode 100644
index 00000000000..40f6a2a12ba
--- /dev/null
+++ b/dist/STLExtras.h.diff
@@ -0,0 +1,20 @@
+--- STLExtras.h.orig 2021-01-28 01:34:01.000000000 +0100
++++ STLExtras.h 2021-03-03 22:18:46.028992086 +0100
+@@ -1820,7 +1820,7 @@
+ result_pair(std::size_t Index, IterOfRange<R> Iter)
+ : Index(Index), Iter(Iter) {}
+
+- result_pair<R>(const result_pair<R> &Other)
++ result_pair(const result_pair<R> &Other)
+ : Index(Other.Index), Iter(Other.Iter) {}
+ result_pair<R> &operator=(const result_pair<R> &Other) {
+ Index = Other.Index;
+@@ -1870,7 +1870,7 @@
+ return Result.Iter == RHS.Result.Iter;
+ }
+
+- enumerator_iter<R>(const enumerator_iter<R> &Other) : Result(Other.Result) {}
++ enumerator_iter(const enumerator_iter<R> &Other) : Result(Other.Result) {}
+ enumerator_iter<R> &operator=(const enumerator_iter<R> &Other) {
+ Result = Other.Result;
+ return *this;
diff --git a/dist/vespa.spec b/dist/vespa.spec
index 6c3f68f6f74..724cffcc7f1 100644
--- a/dist/vespa.spec
+++ b/dist/vespa.spec
@@ -549,6 +549,12 @@ nearest neighbor search used for low-level benchmarking.
%setup -c -D -T
%else
%setup -q
+%if ( 0%{?el8} || 0%{?fc34} ) && %{_vespa_llvm_version} < 13
+if grep -qs 'result_pair<R>(' /usr/include/llvm/ADT/STLExtras.h
+then
+ patch /usr/include/llvm/ADT/STLExtras.h < dist/STLExtras.h.diff
+fi
+%endif
echo '%{version}' > VERSION
case '%{version}' in
*.0)