[oe] [meta-oe][PATCH] openldap: fix native LDFLAGS build error

Ioan-Adrian Ratiu adrian.ratiu at ni.com
Thu Aug 24 12:40:10 UTC 2017


LDFLAGS += "-pthread" adds the flag both for native and target builds,
however the openldap-native build overwrites the variable inside
native.bbclass causing "undefined reference to `pthread_getspecific'"
and other linker errors.

Change the append to happen after parsing by using the override
syntax and thus make sure it executes after native.bbclass (bitbake -e
reports pre-expansion value "${BUILD_LDFLAGS} -pthread").

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu at ni.com>
---
 meta-oe/recipes-support/openldap/openldap_2.4.45.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/openldap/openldap_2.4.45.bb b/meta-oe/recipes-support/openldap/openldap_2.4.45.bb
index adbf8ce28..06d2467ec 100644
--- a/meta-oe/recipes-support/openldap/openldap_2.4.45.bb
+++ b/meta-oe/recipes-support/openldap/openldap_2.4.45.bb
@@ -150,7 +150,7 @@ PACKAGES += "${PN}-overlay-proxycache"
 # it was disabled for cross-compiling.
 CPPFLAGS_append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\' -fPIC"
 
-LDFLAGS += "-pthread"
+LDFLAGS_append = " -pthread"
 
 do_configure() {
     cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/ltmain.sh ${S}/build
-- 
2.14.1




More information about the Openembedded-devel mailing list