summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils
diff options
context:
space:
mode:
authorJunling Zheng <zhengjunling@huawei.com>2015-04-09 12:56:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-15 14:19:45 +0100
commitc012dcbf1348be5d728f8a2b69ac9fdc5563c110 (patch)
tree615e6eed8a45015f91bf122ab15ab0eee7a3145d /meta/recipes-devtools/elfutils
parent1da17afed8ef82261228e216b4a7626067ef37a6 (diff)
downloadpoky-c012dcbf1348be5d728f8a2b69ac9fdc5563c110.tar.gz
elfutils: fix an incorrect patch for 0.161
The original uclibc-support.patch is not compatible with elfutils-0.161. It should be corrected through adjusting context. So regenerate a new patch for elfutils-0.161, rename the patch for elfutils-0.148, and put them into respective directories. (From OE-Core rev: 64acb72e7ec63528073d8290137fe74d3382f876) Signed-off-by: Junling Zheng <zhengjunling@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch (renamed from meta/recipes-devtools/elfutils/elfutils/uclibc-support.patch)0
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.161/uclibc-support-for-elfutils-0.161.patch106
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.148.bb2
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.161.bb2
4 files changed, 108 insertions, 2 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils/uclibc-support.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch
index 3cf16ac923..3cf16ac923 100644
--- a/meta/recipes-devtools/elfutils/elfutils/uclibc-support.patch
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.161/uclibc-support-for-elfutils-0.161.patch b/meta/recipes-devtools/elfutils/elfutils-0.161/uclibc-support-for-elfutils-0.161.patch
new file mode 100644
index 0000000000..f1533bfd38
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.161/uclibc-support-for-elfutils-0.161.patch
@@ -0,0 +1,106 @@
1From 3daec2dd11a04955f95e8f65a48820103d84dbec Mon Sep 17 00:00:00 2001
2From: Junling Zheng <zhengjunling@huawei.com>
3Date: Thu, 9 Apr 2015 12:12:49 +0000
4Subject: [PATCH] uclibc support for elfutils 0.161
5
6on uclibc systems libintl and libuargp are separate from libc.
7so they need to be specified on commandline when we use proxy-libintl
8then libintl is a static archive so it should be listed last since
9elfutils does not respect disable-nls we need to link in libintl
10
11We add a new option --enable-uclibc which will be used to control
12the uclibc specific configurations during build.
13
14Upstream-Status: Inappropriate [uclibc specific]
15
16Signed-off-by: Khem Raj <raj.khem>
17Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
18[Junling Zheng:
19 - adjust context
20]
21---
22 configure.ac | 8 ++++++++
23 libcpu/Makefile.am | 4 ++++
24 libdw/Makefile.am | 7 ++++++-
25 libelf/Makefile.am | 5 +++++
26 4 files changed, 23 insertions(+), 1 deletion(-)
27
28diff --git a/configure.ac b/configure.ac
29index a1ad6db..81fc33f 100644
30--- a/configure.ac
31+++ b/configure.ac
32@@ -70,6 +70,14 @@ AS_IF([test "$use_locks" = yes],
33
34 AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
35
36+AC_ARG_ENABLE([uclibc],
37+AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
38+use_uclibc=yes, use_uclibc=no)
39+AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes)
40+AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)])
41+
42+AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
43+
44 AC_PROG_CC
45 AC_PROG_RANLIB
46 AC_PROG_YACC
47diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
48index 3beccf3..9ba6c04 100644
49--- a/libcpu/Makefile.am
50+++ b/libcpu/Makefile.am
51@@ -80,6 +80,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i386.mnemonics`"
52 i386_lex.o: i386_parse.h
53 i386_gendis_LDADD = $(libeu) -lm
54
55+if USE_UCLIBC
56+i386_gendis_LDADD += -luargp -lintl
57+endif
58+
59 i386_parse.h: i386_parse.c ;
60
61 EXTRA_DIST = defs/i386
62diff --git a/libdw/Makefile.am b/libdw/Makefile.am
63index 887da6b..d31b428 100644
64--- a/libdw/Makefile.am
65+++ b/libdw/Makefile.am
66@@ -102,6 +102,11 @@ endif
67 libdw_pic_a_SOURCES =
68 am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
69
70+libdw_so_LDLIBS =
71+if USE_UCLIBC
72+libdw_so_LDLIBS += -lintl -luargp
73+endif
74+
75 libdw_so_SOURCES =
76 libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
77 ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
78@@ -112,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
79 -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
80 -Wl,--version-script,$<,--no-undefined \
81 -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
82- -ldl $(zip_LIBS)
83+ -ldl $(zip_LIBS) $(libdw_so_LDLIBS)
84 @$(textrel_check)
85 ln -fs $@ $@.$(VERSION)
86
87diff --git a/libelf/Makefile.am b/libelf/Makefile.am
88index afcb2aa..02836a1 100644
89--- a/libelf/Makefile.am
90+++ b/libelf/Makefile.am
91@@ -93,7 +93,12 @@ libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
92 libelf_pic_a_SOURCES =
93 am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
94
95+
96 libelf_so_LDLIBS =
97+if USE_UCLIBC
98+libelf_so_LDLIBS += -lintl -luargp
99+endif
100+
101 if USE_LOCKS
102 libelf_so_LDLIBS += -lpthread
103 endif
104--
1051.8.3.4
106
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.148.bb b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
index 47875d55e1..dc56dfa8b4 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.148.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
@@ -36,7 +36,7 @@ SRC_URI += "\
36 file://elf_begin.c-CVE-2014-9447-fix.patch \ 36 file://elf_begin.c-CVE-2014-9447-fix.patch \
37" 37"
38# Only apply when building uclibc based target recipe 38# Only apply when building uclibc based target recipe
39SRC_URI_append_libc-uclibc = " file://uclibc-support.patch" 39SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.148.patch"
40 40
41# The buildsystem wants to generate 2 .h files from source using a binary it just built, 41# The buildsystem wants to generate 2 .h files from source using a binary it just built,
42# which can not pass the cross compiling, so let's work around it by adding 2 .h files 42# which can not pass the cross compiling, so let's work around it by adding 2 .h files
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.161.bb b/meta/recipes-devtools/elfutils/elfutils_0.161.bb
index 35bf0b6cd9..0dbe9f95f2 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.161.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.161.bb
@@ -35,7 +35,7 @@ SRC_URI += "\
35" 35"
36 36
37# Only apply when building uclibc based target recipe 37# Only apply when building uclibc based target recipe
38SRC_URI_append_libc-uclibc = " file://uclibc-support.patch" 38SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.161.patch"
39 39
40# The buildsystem wants to generate 2 .h files from source using a binary it just built, 40# The buildsystem wants to generate 2 .h files from source using a binary it just built,
41# which can not pass the cross compiling, so let's work around it by adding 2 .h files 41# which can not pass the cross compiling, so let's work around it by adding 2 .h files