| Message ID | 20261017232743.1871823-1-khem.raj@oss.qualcomm.com |
|---|---|
| State | New |
| Headers | show |
| Series | libfyaml: Link with libatomic on targets lacking 64-bit atomics | expand |
diff --git a/meta/recipes-support/libfyaml/libfyaml_0.9.6.bb b/meta/recipes-support/libfyaml/libfyaml_0.9.6.bb index 4c3fe42891..012ff7052d 100644 --- a/meta/recipes-support/libfyaml/libfyaml_0.9.6.bb +++ b/meta/recipes-support/libfyaml/libfyaml_0.9.6.bb @@ -13,5 +13,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libfyaml-${PV}.tar.gz \ SRC_URI[sha256sum] = "a59cc3331e2eb903ec36933ad52a45888041cac31e44f553a00511131242c483" inherit autotools pkgconfig github-releases +# Specify linking with -latomic on architectures missing 64bit atomics. +LDFLAGS += "${@bb.utils.contains_any('TUNE_FEATURES', '32 armv5 o32 m32', '-latomic', '', d)}" BBCLASSEXTEND = "native"
libfyaml uses 64-bit atomic operations, which need libatomic on 32-bit targets such as riscv32, otherwise linking fails with error: undefined reference: __atomic_load_8 error: undefined reference: __atomic_compare_exchange_8 Match on the relevant TUNE_FEATURES (32 for riscv32, armv5, o32 for mips and m32 for ppc/x86) to add -latomic. Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- meta/recipes-support/libfyaml/libfyaml_0.9.6.bb | 2 ++ 1 file changed, 2 insertions(+)