From 8ab6fd7fa52fbaeb0b8ca11a7f7b5b26d82e9270 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Tue, 5 May 2015 16:11:14 +0200 Subject: tegrarcm/cryptopp: build and use as a static library We need libcryptopp only for a 32bit x86 target for tegrarcm. However linking libcryptopp dynamically and using the distro supplied 32bit compatibility libcryptopp raises an assertion: tegrarcm: secblock.h:145: CryptoPP::NullAllocator::pointer CryptoPP::NullAllocator::allocate(CryptoPP::NullAllocator::size_type, const void*) [with T = unsigned int; CryptoPP::NullAllocator::pointer = unsigned int*; CryptoPP::NullAllocator::size_type = unsigned int]: Assertion `false' failed. Building only a static library with OE, (if native build forcing 32bit) fixes the issue. --- recipes-support/libcryptopp/libcryptopp_5.6.2.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'recipes-support') diff --git a/recipes-support/libcryptopp/libcryptopp_5.6.2.bb b/recipes-support/libcryptopp/libcryptopp_5.6.2.bb index 1932761..ad9e10b 100644 --- a/recipes-support/libcryptopp/libcryptopp_5.6.2.bb +++ b/recipes-support/libcryptopp/libcryptopp_5.6.2.bb @@ -21,11 +21,14 @@ inherit autotools-brokensep pkgconfig EXTRA_OECONF = "--libdir=${base_libdir}" +#we want tegrarcm binary to run on a 32-bit architecture, on x86_64 this requires the 32-bit compatibility libs +EXTRA_OEMAKE_class-native = "CC='${CC} -m32' CXX='${CXX} -m32'" + do_compile() { sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile export CXXFLAGS="${CXXFLAGS} -DNDEBUG -fPIC" oe_runmake -f GNUmakefile - oe_runmake libcryptopp.so + oe_runmake libcryptopp.a } do_install_prepend() { -- cgit v1.2.3