rocksdb: Link with libatomic on x86 when using clang/libgcc

Fixes
| i686-yoe-linux-ld.lld: error: undefined reference: __atomic_compare_exchange
| >>> referenced by librocksdb.so.9.10.0 (disallowed by --no-allow-shlib-undefined)
| i686-yoe-linux-clang++: error: linker command failed with exit code 1 (use -v to see invocation)
| ninja: build stopped: subcommand failed.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2025-10-24 18:44:25 -07:00
parent 99dd4ed336
commit cf99ab2d8c

View File

@ -29,6 +29,7 @@ SRC_URI:append:mips = " file://0001-replace-old-sync-with-new-atomic-builtin-equ
SRC_URI:append:powerpc = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch"
SRC_URI:remove:toolchain-clang:riscv32 = "file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch"
LDFLAGS:append:toolchain-clang:x86 = "${@bb.utils.contains_any("TC_CXX_RUNTIME", "gnu", " -latomic", "", d)}"
inherit cmake ptest