diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-01-26 14:59:58 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-01-26 21:52:26 -0800 |
commit | 951f1edf19d36ea75a30b4e5918d76a6eb64b3b1 (patch) | |
tree | 24180a1aae167e2de3a2113772b5f890b8a79e44 /meta-oe/recipes-support/poco | |
parent | 2ab113e8be42ae2dd61babb8e9a1742684df1f59 (diff) | |
download | meta-openembedded-951f1edf19d36ea75a30b4e5918d76a6eb64b3b1.tar.gz |
poco: Do not use std::atomic<bool>
They are not implemented for all arches e.g. RISCV on gcc 13 yet
Fixes
riscv64-yoe-linux/gcc/riscv64-yoe-linux/13.0.1/ld: lib/libPocoFoundation.so.94: unde
fined reference to `__atomic_exchange_1'
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/poco')
-rw-r--r-- | meta-oe/recipes-support/poco/poco/0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch | 60 | ||||
-rw-r--r-- | meta-oe/recipes-support/poco/poco_1.12.4.bb | 1 |
2 files changed, 61 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/poco/poco/0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch b/meta-oe/recipes-support/poco/poco/0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch new file mode 100644 index 000000000..b06135222 --- /dev/null +++ b/meta-oe/recipes-support/poco/poco/0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From 4cbb225811205b51b65371d0d8abc2d2af8233b6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 26 Jan 2023 14:56:36 -0800 | ||
4 | Subject: [PATCH] Use std::atomic<int> instead of std::atomic<bool> | ||
5 | |||
6 | GCC on RISCV does not yet support inline subword atomics [1] | ||
7 | Therefore avoid them until fixed | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104338 | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | Foundation/include/Poco/AsyncChannel.h | 2 +- | ||
16 | Foundation/src/AsyncChannel.cpp | 5 ++--- | ||
17 | 2 files changed, 3 insertions(+), 4 deletions(-) | ||
18 | |||
19 | diff --git a/Foundation/include/Poco/AsyncChannel.h b/Foundation/include/Poco/AsyncChannel.h | ||
20 | index 190bae7dd..d73ea6c72 100644 | ||
21 | --- a/Foundation/include/Poco/AsyncChannel.h | ||
22 | +++ b/Foundation/include/Poco/AsyncChannel.h | ||
23 | @@ -111,7 +111,7 @@ private: | ||
24 | NotificationQueue _queue; | ||
25 | std::size_t _queueSize = 0; | ||
26 | std::size_t _dropCount = 0; | ||
27 | - std::atomic<bool> _closed; | ||
28 | + std::atomic<int> _closed; | ||
29 | }; | ||
30 | |||
31 | |||
32 | diff --git a/Foundation/src/AsyncChannel.cpp b/Foundation/src/AsyncChannel.cpp | ||
33 | index 37cdec477..e829b180c 100644 | ||
34 | --- a/Foundation/src/AsyncChannel.cpp | ||
35 | +++ b/Foundation/src/AsyncChannel.cpp | ||
36 | @@ -48,11 +48,10 @@ private: | ||
37 | Message _msg; | ||
38 | }; | ||
39 | |||
40 | - | ||
41 | AsyncChannel::AsyncChannel(Channel::Ptr pChannel, Thread::Priority prio): | ||
42 | _pChannel(pChannel), | ||
43 | _thread("AsyncChannel"), | ||
44 | - _closed(false) | ||
45 | + _closed(0) | ||
46 | { | ||
47 | _thread.setPriority(prio); | ||
48 | } | ||
49 | @@ -95,7 +94,7 @@ void AsyncChannel::open() | ||
50 | |||
51 | void AsyncChannel::close() | ||
52 | { | ||
53 | - if (!_closed.exchange(true)) | ||
54 | + if (!_closed.exchange(1)) | ||
55 | { | ||
56 | if (_thread.isRunning()) | ||
57 | { | ||
58 | -- | ||
59 | 2.39.1 | ||
60 | |||
diff --git a/meta-oe/recipes-support/poco/poco_1.12.4.bb b/meta-oe/recipes-support/poco/poco_1.12.4.bb index f66a27252..51bd5611f 100644 --- a/meta-oe/recipes-support/poco/poco_1.12.4.bb +++ b/meta-oe/recipes-support/poco/poco_1.12.4.bb | |||
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=4267f48fc738f50380cbeeb76f95cebc" | |||
9 | DEPENDS = "libpcre2 zlib" | 9 | DEPENDS = "libpcre2 zlib" |
10 | 10 | ||
11 | SRC_URI = "git://github.com/pocoproject/poco.git;branch=master;protocol=https \ | 11 | SRC_URI = "git://github.com/pocoproject/poco.git;branch=master;protocol=https \ |
12 | file://0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch \ | ||
12 | file://run-ptest \ | 13 | file://run-ptest \ |
13 | " | 14 | " |
14 | SRCREV = "1211613642269b7d53bea58b02de7fcd25ece3b9" | 15 | SRCREV = "1211613642269b7d53bea58b02de7fcd25ece3b9" |