From cd2e0043d8fd009f3230e0c9cdfb63fc84ed9669 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 13 Jun 2013 07:12:38 +0000 Subject: [PATCH] libunwind: Fix build on arm < v6 atomics that are needed for libunuwind are not available on arm < v6 Fixes errors like | ../src/.libs/libunwind.so: error: undefined reference to 'AO_fetch_and_add1' | ../src/.libs/libunwind.so: error: undefined reference to 'AO_fetch_and_add' | collect2: error: ld returned 1 exit status Signed-off-by: Khem Raj Signed-off-by: Martin Jansa --- meta-oe/recipes-support/libunwind/libunwind.inc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-support/libunwind/libunwind.inc b/meta-oe/recipes-support/libunwind/libunwind.inc index f028766b6f..2e1504e220 100644 --- a/meta-oe/recipes-support/libunwind/libunwind.inc +++ b/meta-oe/recipes-support/libunwind/libunwind.inc @@ -6,7 +6,21 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3fced11d6df719b47505837a51c16ae5" SRC_URI = "http://download.savannah.nongnu.org/releases/${BPN}/${BPN}-${PV}.tar.gz" inherit autotools - EXTRA_OECONF_arm = "--enable-debug-frame" +CFLAGS += "${ATOMICOPS}" +ATOMICOPS_armv5 = "-DAO_USE_PTHREAD_DEFS=1" +ATOMICOPS_armv4 = "-DAO_USE_PTHREAD_DEFS=1" +ATOMICOPS ?= "" + +LDFLAGS += "${LIBATOMICS}" +LIBATOMICS_armv5 = "-latomic_ops" +LIBATOMICS_armv4 = "-latomic_ops" +LIBATOMICS ?= "" + +DEPENDS += "${DEPLIBATOMICS}" +DEPLIBATOMICS_armv5 = "libatomics-ops" +DEPLIBATOMICS_armv4 = "libatomics-ops" +DEPLIBATOMICS ?= "" + BBCLASSEXTEND = "native"