mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-22 20:38:28 +00:00
The configure check for -latomic links a program that loads from a local std::atomic<uint64_t>, which clang folds away at -O2. On riscv32 it therefore reports that libatomic is not needed, and libtorrent.so is left with undefined __atomic_fetch_add_8, __atomic_fetch_sub_8, __atomic_load_8 and __atomic_store_8 references and no dependency on libatomic. Add a patch that makes the test atomic global and modifies it with fetch_add() so the check cannot be optimized away. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>