summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-08-30 00:13:38 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-09-01 11:05:20 +0100
commit68853a63af8ac2151461dac6f184815cfe27b34c (patch)
tree6affcb5360ef86ba6f74f1ca01024b3dea95888b
parent8f9eaecb3e6c60d517ba9a163980315aaa3fecbc (diff)
downloadpoky-68853a63af8ac2151461dac6f184815cfe27b34c.tar.gz
aspell: Backport a fix to build with gcc-15/clang-19
(From OE-Core rev: d6cb53c0773d28f57b5699125ef825936d4725d1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch42
-rw-r--r--meta/recipes-support/aspell/aspell_0.60.8.1.bb3
2 files changed, 44 insertions, 1 deletions
diff --git a/meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch b/meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch
new file mode 100644
index 0000000000..4045e8e412
--- /dev/null
+++ b/meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch
@@ -0,0 +1,42 @@
1From d45bf96b0a3556acb2c83069a78eaaac973d31b4 Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyich@gmail.com>
3Date: Sun, 21 Jul 2024 22:01:50 +0100
4Subject: [PATCH] modules/speller/default/vector_hash-t.hpp: fix gcc-15 build
5
6Uncoming `gcc-15` added extra checks for template instantiation that is
7guaranteed to fail in
8 https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=313afcfdabeab3e6705ac0bd1273627075be0023
9
10As a result `aspell` build now fails as:
11
12 In file included from modules/speller/default/readonly_ws.cpp:51:
13 modules/speller/default/vector_hash-t.hpp: In member function 'void aspeller::VectorHashTable<Parms>::recalc_size()':
14 modules/speller/default/vector_hash-t.hpp:186:43: error: 'class aspeller::VectorHashTable<Parms>' has no member named 'e'
15 186 | for (iterator i = begin(); i != this->e; ++i, ++this->_size);
16 | ^
17 modules/speller/default/vector_hash-t.hpp:186:59: error: 'class aspeller::VectorHashTable<Parms>' has no member named '_size'; did you mean 'size'?
18 186 | for (iterator i = begin(); i != this->e; ++i, ++this->_size);
19 | ^~~~~
20 | size
21
22It looks like `_size` is `size_` mis-spelling and `e` was not introduced
23here.
24Upstream-Status: Backport [https://github.com/GNUAspell/aspell/commit/ee6cbb12ff36a1e6618d7388a78dd4e0a2b44041]
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26---
27 modules/speller/default/vector_hash-t.hpp | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30diff --git a/modules/speller/default/vector_hash-t.hpp b/modules/speller/default/vector_hash-t.hpp
31index 969a80c..e4420b4 100644
32--- a/modules/speller/default/vector_hash-t.hpp
33+++ b/modules/speller/default/vector_hash-t.hpp
34@@ -183,7 +183,7 @@ namespace aspeller {
35 template<class Parms>
36 void VectorHashTable<Parms>::recalc_size() {
37 size_ = 0;
38- for (iterator i = begin(); i != this->e; ++i, ++this->_size);
39+ for (iterator i = begin(), e = end(); i != e; ++i, ++size_);
40 }
41
42 }
diff --git a/meta/recipes-support/aspell/aspell_0.60.8.1.bb b/meta/recipes-support/aspell/aspell_0.60.8.1.bb
index 0ea9b063e0..43940b1e1b 100644
--- a/meta/recipes-support/aspell/aspell_0.60.8.1.bb
+++ b/meta/recipes-support/aspell/aspell_0.60.8.1.bb
@@ -13,7 +13,8 @@ HOMEPAGE = "http://aspell.net/"
13LICENSE = "LGPL-2.0-only | LGPL-2.1-only" 13LICENSE = "LGPL-2.0-only | LGPL-2.1-only"
14LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" 14LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
15 15
16SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz" 16SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz \
17 file://0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch"
17SRC_URI[sha256sum] = "d6da12b34d42d457fa604e435ad484a74b2effcd120ff40acd6bb3fb2887d21b" 18SRC_URI[sha256sum] = "d6da12b34d42d457fa604e435ad484a74b2effcd120ff40acd6bb3fb2887d21b"
18 19
19PACKAGECONFIG ??= "" 20PACKAGECONFIG ??= ""