From 64acb72e7ec63528073d8290137fe74d3382f876 Mon Sep 17 00:00:00 2001 From: Junling Zheng Date: Thu, 9 Apr 2015 12:56:27 +0000 Subject: 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. Signed-off-by: Junling Zheng Signed-off-by: Richard Purdie --- .../uclibc-support-for-elfutils-0.148.patch | 91 ++++++++++++++++++ .../uclibc-support-for-elfutils-0.161.patch | 106 +++++++++++++++++++++ .../elfutils/elfutils/uclibc-support.patch | 91 ------------------ meta/recipes-devtools/elfutils/elfutils_0.148.bb | 2 +- meta/recipes-devtools/elfutils/elfutils_0.161.bb | 2 +- 5 files changed, 199 insertions(+), 93 deletions(-) create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.161/uclibc-support-for-elfutils-0.161.patch delete mode 100644 meta/recipes-devtools/elfutils/elfutils/uclibc-support.patch (limited to 'meta') diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch new file mode 100644 index 0000000000..3cf16ac923 --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support-for-elfutils-0.148.patch @@ -0,0 +1,91 @@ +on uclibc systems libintl and libuargp are separate from libc. +so they need to be specified on commandline when we use proxy-libintl +then libintl is a static archive so it should be listed last since +elfutils does not respect disable-nls we need to link in libintl + +We add a new option --enable-uclibc which will be used to control +the uclibc specific configurations during build. + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [uclibc specific] + +Index: elfutils-0.148/configure.ac +=================================================================== +--- elfutils-0.148.orig/configure.ac ++++ elfutils-0.148/configure.ac +@@ -55,9 +55,16 @@ AS_IF([test "$use_locks" = yes], [AC_DEF + + AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.]) + ++AC_ARG_ENABLE([uclibc], ++AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]), ++use_uclibc=yes, use_uclibc=no) ++AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes) ++AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)]) ++ ++AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.]) ++ + dnl Add all the languages for which translations are available. + ALL_LINGUAS= +- + AC_PROG_CC + AC_PROG_RANLIB + AC_PROG_YACC +Index: elfutils-0.148/libelf/Makefile.am +=================================================================== +--- elfutils-0.148.orig/libelf/Makefile.am ++++ elfutils-0.148/libelf/Makefile.am +@@ -93,7 +93,12 @@ if !MUDFLAP + libelf_pic_a_SOURCES = + am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os) + ++ + libelf_so_LDLIBS = ++if USE_UCLIBC ++libelf_so_LDLIBS += -lintl -luargp ++endif ++ + if USE_LOCKS + libelf_so_LDLIBS += -lpthread + endif +Index: elfutils-0.148/libdw/Makefile.am +=================================================================== +--- elfutils-0.148.orig/libdw/Makefile.am ++++ elfutils-0.148/libdw/Makefile.am +@@ -98,6 +98,11 @@ if !MUDFLAP + libdw_pic_a_SOURCES = + am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) + ++libdw_so_LDLIBS = ++if USE_UCLIBC ++libdw_so_LDLIBS += -lintl -luargp ++endif ++ + libdw_so_SOURCES = + libdw.so: $(srcdir)/libdw.map libdw_pic.a \ + ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \ +@@ -108,7 +113,7 @@ libdw.so: $(srcdir)/libdw.map libdw_pic. + -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ + -Wl,--version-script,$<,--no-undefined \ + -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ +- -ldl $(zip_LIBS) ++ -ldl $(zip_LIBS) $(libdw_so_LDLIBS) + if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + ln -fs $@ $@.$(VERSION) + +Index: elfutils-0.148/libcpu/Makefile.am +=================================================================== +--- elfutils-0.148.orig/libcpu/Makefile.am ++++ elfutils-0.148/libcpu/Makefile.am +@@ -63,6 +63,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i3 + i386_lex.o: i386_parse.h + i386_gendis_LDADD = $(libeu) -lm $(libmudflap) + ++if USE_UCLIBC ++i386_gendis_LDADD += -luargp -lintl ++endif ++ + i386_parse.h: i386_parse.c ; + + noinst_HEADERS = memory-access.h i386_parse.h i386_data.h 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 @@ +From 3daec2dd11a04955f95e8f65a48820103d84dbec Mon Sep 17 00:00:00 2001 +From: Junling Zheng +Date: Thu, 9 Apr 2015 12:12:49 +0000 +Subject: [PATCH] uclibc support for elfutils 0.161 + +on uclibc systems libintl and libuargp are separate from libc. +so they need to be specified on commandline when we use proxy-libintl +then libintl is a static archive so it should be listed last since +elfutils does not respect disable-nls we need to link in libintl + +We add a new option --enable-uclibc which will be used to control +the uclibc specific configurations during build. + +Upstream-Status: Inappropriate [uclibc specific] + +Signed-off-by: Khem Raj +Signed-off-by: Junling Zheng +[Junling Zheng: + - adjust context +] +--- + configure.ac | 8 ++++++++ + libcpu/Makefile.am | 4 ++++ + libdw/Makefile.am | 7 ++++++- + libelf/Makefile.am | 5 +++++ + 4 files changed, 23 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index a1ad6db..81fc33f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -70,6 +70,14 @@ AS_IF([test "$use_locks" = yes], + + AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.]) + ++AC_ARG_ENABLE([uclibc], ++AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]), ++use_uclibc=yes, use_uclibc=no) ++AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes) ++AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)]) ++ ++AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.]) ++ + AC_PROG_CC + AC_PROG_RANLIB + AC_PROG_YACC +diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am +index 3beccf3..9ba6c04 100644 +--- a/libcpu/Makefile.am ++++ b/libcpu/Makefile.am +@@ -80,6 +80,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i386.mnemonics`" + i386_lex.o: i386_parse.h + i386_gendis_LDADD = $(libeu) -lm + ++if USE_UCLIBC ++i386_gendis_LDADD += -luargp -lintl ++endif ++ + i386_parse.h: i386_parse.c ; + + EXTRA_DIST = defs/i386 +diff --git a/libdw/Makefile.am b/libdw/Makefile.am +index 887da6b..d31b428 100644 +--- a/libdw/Makefile.am ++++ b/libdw/Makefile.am +@@ -102,6 +102,11 @@ endif + libdw_pic_a_SOURCES = + am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) + ++libdw_so_LDLIBS = ++if USE_UCLIBC ++libdw_so_LDLIBS += -lintl -luargp ++endif ++ + libdw_so_SOURCES = + libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ + ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \ +@@ -112,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ + -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ + -Wl,--version-script,$<,--no-undefined \ + -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ +- -ldl $(zip_LIBS) ++ -ldl $(zip_LIBS) $(libdw_so_LDLIBS) + @$(textrel_check) + ln -fs $@ $@.$(VERSION) + +diff --git a/libelf/Makefile.am b/libelf/Makefile.am +index afcb2aa..02836a1 100644 +--- a/libelf/Makefile.am ++++ b/libelf/Makefile.am +@@ -93,7 +93,12 @@ libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \ + libelf_pic_a_SOURCES = + am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os) + ++ + libelf_so_LDLIBS = ++if USE_UCLIBC ++libelf_so_LDLIBS += -lintl -luargp ++endif ++ + if USE_LOCKS + libelf_so_LDLIBS += -lpthread + endif +-- +1.8.3.4 + diff --git a/meta/recipes-devtools/elfutils/elfutils/uclibc-support.patch b/meta/recipes-devtools/elfutils/elfutils/uclibc-support.patch deleted file mode 100644 index 3cf16ac923..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils/uclibc-support.patch +++ /dev/null @@ -1,91 +0,0 @@ -on uclibc systems libintl and libuargp are separate from libc. -so they need to be specified on commandline when we use proxy-libintl -then libintl is a static archive so it should be listed last since -elfutils does not respect disable-nls we need to link in libintl - -We add a new option --enable-uclibc which will be used to control -the uclibc specific configurations during build. - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [uclibc specific] - -Index: elfutils-0.148/configure.ac -=================================================================== ---- elfutils-0.148.orig/configure.ac -+++ elfutils-0.148/configure.ac -@@ -55,9 +55,16 @@ AS_IF([test "$use_locks" = yes], [AC_DEF - - AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.]) - -+AC_ARG_ENABLE([uclibc], -+AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]), -+use_uclibc=yes, use_uclibc=no) -+AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes) -+AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)]) -+ -+AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.]) -+ - dnl Add all the languages for which translations are available. - ALL_LINGUAS= -- - AC_PROG_CC - AC_PROG_RANLIB - AC_PROG_YACC -Index: elfutils-0.148/libelf/Makefile.am -=================================================================== ---- elfutils-0.148.orig/libelf/Makefile.am -+++ elfutils-0.148/libelf/Makefile.am -@@ -93,7 +93,12 @@ if !MUDFLAP - libelf_pic_a_SOURCES = - am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os) - -+ - libelf_so_LDLIBS = -+if USE_UCLIBC -+libelf_so_LDLIBS += -lintl -luargp -+endif -+ - if USE_LOCKS - libelf_so_LDLIBS += -lpthread - endif -Index: elfutils-0.148/libdw/Makefile.am -=================================================================== ---- elfutils-0.148.orig/libdw/Makefile.am -+++ elfutils-0.148/libdw/Makefile.am -@@ -98,6 +98,11 @@ if !MUDFLAP - libdw_pic_a_SOURCES = - am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) - -+libdw_so_LDLIBS = -+if USE_UCLIBC -+libdw_so_LDLIBS += -lintl -luargp -+endif -+ - libdw_so_SOURCES = - libdw.so: $(srcdir)/libdw.map libdw_pic.a \ - ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \ -@@ -108,7 +113,7 @@ libdw.so: $(srcdir)/libdw.map libdw_pic. - -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ - -Wl,--version-script,$<,--no-undefined \ - -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ -- -ldl $(zip_LIBS) -+ -ldl $(zip_LIBS) $(libdw_so_LDLIBS) - if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi - ln -fs $@ $@.$(VERSION) - -Index: elfutils-0.148/libcpu/Makefile.am -=================================================================== ---- elfutils-0.148.orig/libcpu/Makefile.am -+++ elfutils-0.148/libcpu/Makefile.am -@@ -63,6 +63,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i3 - i386_lex.o: i386_parse.h - i386_gendis_LDADD = $(libeu) -lm $(libmudflap) - -+if USE_UCLIBC -+i386_gendis_LDADD += -luargp -lintl -+endif -+ - i386_parse.h: i386_parse.c ; - - noinst_HEADERS = memory-access.h i386_parse.h i386_data.h 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 += "\ file://elf_begin.c-CVE-2014-9447-fix.patch \ " # Only apply when building uclibc based target recipe -SRC_URI_append_libc-uclibc = " file://uclibc-support.patch" +SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.148.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 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 += "\ " # Only apply when building uclibc based target recipe -SRC_URI_append_libc-uclibc = " file://uclibc-support.patch" +SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.161.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 -- cgit 1.2.3-korg