Replace the legacy __sync built-in functions with __atomic ones
authorAndroid Tools Maintainers <android-tools-devel@lists.alioth.debian.org>
Tue, 2 Aug 2022 15:23:27 +0000 (16:23 +0100)
committerRoger Shimizu <rosh@debian.org>
Tue, 2 Aug 2022 15:23:27 +0000 (16:23 +0100)
commit80b47169ae5d2e033c0b74028ad0c505c74ad7ca
tree25ba7c58a8a2855d1f7fe63f1ecb963819d79b33
parent0a0688bff900b295a2bd23d9cb4f66fb7b7f2a4e
Replace the legacy __sync built-in functions with __atomic ones

Last-Update: 2016-10-04
Forwarded: not-needed

libunwind uses the built-in __sync_* functions which are deprecated by GCC and
should be replaced by __atomic_* ones. See the official manuals [1].

The legacy __sync functions do not require to specify the memory order but
__atomic ones do, so we choose the strongest one: __ATOMIC_SEQ_CST.

We do this because __sync_fetch_and_add() is not supported on armel.

[1]: https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html

Gbp-Pq: Topic external/libunwind
Gbp-Pq: Name legacy_built-in_sync_functions.patch
external/libunwind/include/libunwind_i.h