summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-12-26 20:01:44 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-30 11:36:58 +0000
commitdf95988e1ea3d582e687c39a361728f88c419bca (patch)
treeee6c6a75f45b4803945fc9b244c3e25bf58ac8a0 /meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch
parent047ad2c81a7ec0d59d5fb1ddf52668c29a1119c9 (diff)
downloadpoky-df95988e1ea3d582e687c39a361728f88c419bca.tar.gz
elfutils: Fix build with uclibc/musl
Remove mempcpy patch its already in uclibc now refresh libargp patch to match latest elfutils Add ALLOW_EMPTY for musl core-image-cmdline-full asks for elfutils package to be added to package it has all eu-* tools but we dont build them on musl. nevertheless lets satisfy the dependency so image can build for musl Build libdw,libasm,libebl along with libelf enhance the musl portability patch to compile every other library except the eu-* tools Fix build on aarch64/musl issues Header inclusion ends up with duplicate definitions of iovec struct since uclibc defines the same in usersapce, we have been depending upong including the kernel header on aarch64, using sys/uio.h is the right approach Fix x86 build warning seen on musl (From OE-Core rev: a28c70455931e0b7e3449a76c3b9132bd572478b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch129
1 files changed, 129 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch b/meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch
new file mode 100644
index 0000000000..966b70fcc4
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch
@@ -0,0 +1,129 @@
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
28Index: elfutils-0.164/configure.ac
29===================================================================
30--- elfutils-0.164.orig/configure.ac
31+++ elfutils-0.164/configure.ac
32@@ -66,6 +66,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
47@@ -291,18 +299,13 @@ AC_LINK_IFELSE(
48 )
49
50 dnl If our libc doesn't provide argp, then test for libargp
51-if test "$libc_has_argp" = "false" ; then
52- AC_MSG_WARN("libc does not have argp")
53- AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
54-
55- if test "$have_argp" = "false"; then
56- AC_MSG_ERROR("no libargp found")
57- else
58- argp_LDADD="-largp"
59- fi
60-else
61- argp_LDADD=""
62-fi
63+AS_IF([test "x$libc_has_argp" = "xfalse"],
64+ [AC_MSG_WARN("libc does not have argp")
65+ AC_CHECK_LIB([argp], [argp_parse], [have_argp="true" argp_LDADD="-largp"], [have_argp="false"])], [argp_LDADD=""])
66+
67+AS_IF([test "x$libc_has_argp" = "xfalse" -a "x$have_argp" = "xfalse"],
68+ AC_CHECK_LIB([uargp], [argp_parse], [have_uargp="true" argp_LDADD="-luargp"], [have_uargp="false"])], [argp_LDADD=""])
69+
70 AC_SUBST([argp_LDADD])
71
72 dnl The directories with content.
73Index: elfutils-0.164/libcpu/Makefile.am
74===================================================================
75--- elfutils-0.164.orig/libcpu/Makefile.am
76+++ elfutils-0.164/libcpu/Makefile.am
77@@ -80,6 +80,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i3
78 i386_lex.o: i386_parse.h
79 i386_gendis_LDADD = $(libeu) -lm
80
81+if USE_UCLIBC
82+i386_gendis_LDADD += -lintl
83+endif
84+
85 i386_parse.h: i386_parse.c ;
86
87 EXTRA_DIST = defs/i386
88Index: elfutils-0.164/libdw/Makefile.am
89===================================================================
90--- elfutils-0.164.orig/libdw/Makefile.am
91+++ elfutils-0.164/libdw/Makefile.am
92@@ -102,6 +102,11 @@ endif
93 libdw_pic_a_SOURCES =
94 am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
95
96+libdw_so_LDLIBS =
97+if USE_UCLIBC
98+libdw_so_LDLIBS += -lintl
99+endif
100+
101 libdw_so_SOURCES =
102 libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
103 ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
104@@ -112,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
105 -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
106 -Wl,--version-script,$<,--no-undefined \
107 -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
108- -ldl $(argp_LDADD) $(zip_LIBS)
109+ -ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS)
110 @$(textrel_check)
111 $(AM_V_at)ln -fs $@ $@.$(VERSION)
112
113Index: elfutils-0.164/libelf/Makefile.am
114===================================================================
115--- elfutils-0.164.orig/libelf/Makefile.am
116+++ elfutils-0.164/libelf/Makefile.am
117@@ -93,7 +93,12 @@ libelf_a_SOURCES = elf_version.c elf_has
118 libelf_pic_a_SOURCES =
119 am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
120
121+
122 libelf_so_LDLIBS =
123+if USE_UCLIBC
124+libelf_so_LDLIBS += -lintl
125+endif
126+
127 if USE_LOCKS
128 libelf_so_LDLIBS += -lpthread
129 endif