Patchwork [27/52] attr: Fix compilation on uclibc

login
register
mail settings
Submitter Saul Wold
Date April 27, 2011, 7:29 a.m.
Message ID <5054fd5af9f2ff06924fa59459a26d965c555a18.1303889119.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/2945/
State New, archived
Headers show

Comments

Saul Wold - April 27, 2011, 7:29 a.m.
From: Khem Raj <raj.khem@gmail.com>

It needs -lintl added to LDFLAGS for uclibc

inherit gettext class instead of adding gettext to DEPENDS directly

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-support/attr/attr.inc   |    4 ++++
 meta/recipes-support/attr/ea-acl.inc |    4 +---
 2 files changed, 5 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
index c110340..b2ed9a1 100644
--- a/meta/recipes-support/attr/attr.inc
+++ b/meta/recipes-support/attr/attr.inc
@@ -20,3 +20,7 @@  do_install_append() {
 	sed -i ${D}${libdir}/libattr.la -e \
 	    s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
 }
+
+# Only append ldflags for target recipe
+LDFLAGS_libc-uclibc += "${@['', '-lintl']['${PN}' == '${BPN}']}"
+
diff --git a/meta/recipes-support/attr/ea-acl.inc b/meta/recipes-support/attr/ea-acl.inc
index bc93107..a09c31c 100644
--- a/meta/recipes-support/attr/ea-acl.inc
+++ b/meta/recipes-support/attr/ea-acl.inc
@@ -1,11 +1,9 @@ 
 # this build system is mostly shared by attr and acl
 
-DEPENDS =+ "gettext"
-
 SRC_URI += "file://relative-libdir.patch;striplevel=0 \
             file://no-fixed-prog-path.patch"
 
-inherit autotools
+inherit autotools gettext
 
 # the package comes with a custom config.h.in, it cannot be
 # overwritten by autoheader