mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 04:47:17 +04:00
Packages that use 64-bit atomics carry open-coded architecture lists such as +(arm||armeb||mips||mipsel||powerpc):libatomic. Those lists drift (ruby still names arc), over-include ARMv6K and ARMv7 targets whose compiler inlines 64-bit atomics via ldrexd/strexd, and under-include ARMv5 in other packages. Add HAS_ATOMIC64, selected on the architectures where GCC emits 64-bit atomics inline (all 64-bit ones, x86 via cmpxchg8b, ARMv6K and ARMv7), and ATOMIC64_DEPENDS as the single dependency expression to use instead. The condition is one negated symbol because the Depends: evaluator in package-pack.mk only handles flat conjunctions and disjunctions. 16-byte and size-generic atomics need libatomic on every architecture and keep a plain +libatomic dependency. Signed-off-by: Daniel Golle <daniel@makrotopia.org>