Control: tag -1 pending

Hello!

On 23.08.2022 04:13:45 MSK you wrote:
> /usr/bin/ld: 
> ../../../lib_crl/CMakeFiles/lib_crl.dir/crl/common/crl_common_queue.cpp.o: in 
> function `std::__atomic_base<bool>::compare_exchange_strong(bool&, bool, 
> std::memory_order, std::memory_order)':
> /usr/include/c++/12/bits/atomic_base.h:560: undefined reference to 
> `__atomic_compare_exchange_1'
> /usr/bin/ld: 
> ../../../lib_crl/CMakeFiles/lib_crl.dir/crl/crl_object_on_thread.cpp.o: in 
> function `std::unique_lock<std::mutex>::unlock()':
> /usr/include/c++/12/bits/unique_lock.h:193: undefined reference to 
> `__atomic_compare_exchange_1'
> collect2: error: ld returned 1 exit status
> make[3]: *** 
> [Telegram/codegen/codegen/style/CMakeFiles/codegen_style.dir/build.make:268: 
> Telegram/codegen/codegen/style/codegen_style] Error 1

I have written a patch replacing std::atomic<bool> with std::atomic_flag that
guaranteed does not require locks and libatomic. This fixes the linking error
in code generators. On final linking, we already have the -latomic flag from
abseil, so it's working for now.

https://salsa.debian.org/debian/telegram-desktop/-/commit/20b50dee4c3f84dcb0385eeac9b538b2fd050546

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to