From 8df4082d6fef5afa64384cf3b5d9e7291a34364a Mon Sep 17 00:00:00 2001 From: R4SAS Date: Sun, 20 Nov 2022 08:40:03 +0300 Subject: [PATCH] [cmake] Use std::atomic on PowerPC inside boost (#1726) Signed-off-by: R4SAS --- build/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index 0c40d5a9..11036f16 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -172,6 +172,13 @@ if(WITH_THREADSANITIZER) endif() +# Enable usage of STD's Atomic instead of Boost's on PowerPC +# For more information refer to https://github.com/PurpleI2P/i2pd/issues/1726#issuecomment-1306335111 +if(ARCHITECTURE MATCHES "ppc") + add_definitions(-DBOOST_SP_USE_STD_ATOMIC) +endif() + + # libraries set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED)