* Add -luargp and -lintl to linker flags
* __mempcpy is not there on uclibc so define it to mempcpy

Signed-off-by: Khem Raj <[email protected]>
---
 .../elfutils/elfutils-0.148/mempcpy.patch          |   14 ++++++++++++++
 meta/recipes-devtools/elfutils/elfutils_0.148.bb   |    8 +++++---
 2 files changed, 19 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.148/mempcpy.patch

diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/mempcpy.patch 
b/meta/recipes-devtools/elfutils/elfutils-0.148/mempcpy.patch
new file mode 100644
index 0000000..f4af7c4
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/mempcpy.patch
@@ -0,0 +1,14 @@
+Index: elfutils-0.148/libelf/elf_begin.c
+===================================================================
+--- elfutils-0.148.orig/libelf/elf_begin.c
++++ elfutils-0.148/libelf/elf_begin.c
+@@ -68,6 +68,9 @@
+ #include "libelfP.h"
+ #include "common.h"
+ 
++#ifdef __UCLIBC__
++#define __mempcpy mempcpy
++#endif
+ 
+ /* Create descriptor for archive in memory.  */
+ static inline Elf *
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.148.bb 
b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
index b2f700e..5ae4501 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.148.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3\
                     file://EXCEPTION;md5=570adcb0c1218ab57f2249c67d0ce417"
 DEPENDS = "libtool bzip2 zlib"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = 
"https://fedorahosted.org/releases/e/l/elfutils/elfutils-${PV}.tar.bz2";
 
@@ -27,8 +27,8 @@ SRC_URI += "\
         file://testsuite-ignore-elflint.diff \
         file://elf_additions.diff \
        file://elfutils-fsize.patch \
+       file://mempcpy.patch \
 "
-
 # The buildsystem wants to generate 2 .h files from source using a binary it 
just built,
 # which can not pass the cross compiling, so let's work around it by adding 2 
.h files
 # along with the do_configure_prepend()
@@ -37,7 +37,6 @@ SRC_URI += "\
         file://i386_dis.h \
         file://x86_64_dis.h \
 "
-
 inherit autotools
 
 EXTRA_OECONF = "--program-prefix=eu-"
@@ -48,6 +47,9 @@ do_configure_prepend() {
        cp ${WORKDIR}/*dis.h ${S}/libcpu
 }
 
+# Only append ldflags for target recipe
+TARGET_LDFLAGS_libc-uclibc += "${@['', '-lintl -luargp']['${PN}' == '${BPN}']}"
+
 BBCLASSEXTEND = "native nativesdk"
 
 # Package utilities separately
-- 
1.7.4.1


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to