aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-01-26 14:59:58 -0800
committerKhem Raj <raj.khem@gmail.com>2023-01-26 21:52:26 -0800
commit951f1edf19d36ea75a30b4e5918d76a6eb64b3b1 (patch)
tree24180a1aae167e2de3a2113772b5f890b8a79e44 /meta-oe
parent2ab113e8be42ae2dd61babb8e9a1742684df1f59 (diff)
downloadmeta-openembedded-contrib-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')
-rw-r--r--meta-oe/recipes-support/poco/poco/0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch60
-rw-r--r--meta-oe/recipes-support/poco/poco_1.12.4.bb1
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 0000000000..b06135222a
--- /dev/null
+++ b/meta-oe/recipes-support/poco/poco/0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch
@@ -0,0 +1,60 @@
+From 4cbb225811205b51b65371d0d8abc2d2af8233b6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 26 Jan 2023 14:56:36 -0800
+Subject: [PATCH] Use std::atomic<int> instead of std::atomic<bool>
+
+GCC on RISCV does not yet support inline subword atomics [1]
+Therefore avoid them until fixed
+
+Upstream-Status: Pending
+
+[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104338
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Foundation/include/Poco/AsyncChannel.h | 2 +-
+ Foundation/src/AsyncChannel.cpp | 5 ++---
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/Foundation/include/Poco/AsyncChannel.h b/Foundation/include/Poco/AsyncChannel.h
+index 190bae7dd..d73ea6c72 100644
+--- a/Foundation/include/Poco/AsyncChannel.h
++++ b/Foundation/include/Poco/AsyncChannel.h
+@@ -111,7 +111,7 @@ private:
+ NotificationQueue _queue;
+ std::size_t _queueSize = 0;
+ std::size_t _dropCount = 0;
+- std::atomic<bool> _closed;
++ std::atomic<int> _closed;
+ };
+
+
+diff --git a/Foundation/src/AsyncChannel.cpp b/Foundation/src/AsyncChannel.cpp
+index 37cdec477..e829b180c 100644
+--- a/Foundation/src/AsyncChannel.cpp
++++ b/Foundation/src/AsyncChannel.cpp
+@@ -48,11 +48,10 @@ private:
+ Message _msg;
+ };
+
+-
+ AsyncChannel::AsyncChannel(Channel::Ptr pChannel, Thread::Priority prio):
+ _pChannel(pChannel),
+ _thread("AsyncChannel"),
+- _closed(false)
++ _closed(0)
+ {
+ _thread.setPriority(prio);
+ }
+@@ -95,7 +94,7 @@ void AsyncChannel::open()
+
+ void AsyncChannel::close()
+ {
+- if (!_closed.exchange(true))
++ if (!_closed.exchange(1))
+ {
+ if (_thread.isRunning())
+ {
+--
+2.39.1
+
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 f66a272524..51bd5611fb 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"
DEPENDS = "libpcre2 zlib"
SRC_URI = "git://github.com/pocoproject/poco.git;branch=master;protocol=https \
+ file://0001-Use-std-atomic-int-instead-of-std-atomic-bool.patch \
file://run-ptest \
"
SRCREV = "1211613642269b7d53bea58b02de7fcd25ece3b9"