diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-07-25 09:28:48 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-07-25 09:28:48 +0000 |
commit | 20d9950f50dafc490092286776d41d14cfbb93ed (patch) | |
tree | a03140d9b9b51d500849de4deabea673db6454ab | |
parent | 41d6612ec730f93046aaf1978adb4be77bc257bd (diff) | |
download | openembedded-core-20d9950f50dafc490092286776d41d14cfbb93ed.tar.gz openembedded-core-20d9950f50dafc490092286776d41d14cfbb93ed.tar.bz2 openembedded-core-20d9950f50dafc490092286776d41d14cfbb93ed.zip |
elfutils: added 0.131 with Debian patches to build with gcc 4.3.1
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4949 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r-- | meta/packages/elfutils/elfutils-0.131/gcc-4.3_support.diff | 100 | ||||
-rw-r--r-- | meta/packages/elfutils/elfutils-0.131/gnu_inline.diff | 105 | ||||
-rw-r--r-- | meta/packages/elfutils/elfutils-0.131/warnings.patch | 154 | ||||
-rw-r--r-- | meta/packages/elfutils/elfutils_0.131.bb | 53 |
4 files changed, 412 insertions, 0 deletions
diff --git a/meta/packages/elfutils/elfutils-0.131/gcc-4.3_support.diff b/meta/packages/elfutils/elfutils-0.131/gcc-4.3_support.diff new file mode 100644 index 0000000000..b337da9b60 --- /dev/null +++ b/meta/packages/elfutils/elfutils-0.131/gcc-4.3_support.diff @@ -0,0 +1,100 @@ +Index: elfutils-0.131/libelf/common.h +=================================================================== +--- elfutils-0.131.orig/libelf/common.h 2008-04-02 13:32:19.000000000 -0300 ++++ elfutils-0.131/libelf/common.h 2008-04-02 13:35:53.000000000 -0300 +@@ -110,45 +110,6 @@ + } + + +-/* Acquire lock for the descriptor and all children. */ +-static void +-libelf_acquire_all (Elf *elf) +-{ +- rwlock_wrlock (elf->lock); +- +- if (elf->kind == ELF_K_AR) +- { +- Elf *child = elf->state.ar.children; +- +- while (child != NULL) +- { +- if (child->ref_count != 0) +- libelf_acquire_all (child); +- child = child->next; +- } +- } +-} +- +-/* Release own lock and those of the children. */ +-static void +-libelf_release_all (Elf *elf) +-{ +- if (elf->kind == ELF_K_AR) +- { +- Elf *child = elf->state.ar.children; +- +- while (child != NULL) +- { +- if (child->ref_count != 0) +- libelf_release_all (child); +- child = child->next; +- } +- } +- +- rwlock_unlock (elf->lock); +-} +- +- + /* Macro to convert endianess in place. It determines the function it + has to use itself. */ + #define CONVERT(Var) \ +Index: elfutils-0.131/libelf/elf_readall.c +=================================================================== +--- elfutils-0.131.orig/libelf/elf_readall.c 2008-04-02 13:36:06.000000000 -0300 ++++ elfutils-0.131/libelf/elf_readall.c 2008-04-02 13:38:25.000000000 -0300 +@@ -60,6 +60,45 @@ + #include "common.h" + + ++/* Acquire lock for the descriptor and all children. */ ++static void ++libelf_acquire_all (Elf *elf) ++{ ++ rwlock_wrlock (elf->lock); ++ ++ if (elf->kind == ELF_K_AR) ++ { ++ Elf *child = elf->state.ar.children; ++ ++ while (child != NULL) ++ { ++ if (child->ref_count != 0) ++ libelf_acquire_all (child); ++ child = child->next; ++ } ++ } ++} ++ ++/* Release own lock and those of the children. */ ++static void ++libelf_release_all (Elf *elf) ++{ ++ if (elf->kind == ELF_K_AR) ++ { ++ Elf *child = elf->state.ar.children; ++ ++ while (child != NULL) ++ { ++ if (child->ref_count != 0) ++ libelf_release_all (child); ++ child = child->next; ++ } ++ } ++ ++ rwlock_unlock (elf->lock); ++} ++ ++ + static void + set_address (Elf *elf, size_t offset) + { diff --git a/meta/packages/elfutils/elfutils-0.131/gnu_inline.diff b/meta/packages/elfutils/elfutils-0.131/gnu_inline.diff new file mode 100644 index 0000000000..8652d0e1cf --- /dev/null +++ b/meta/packages/elfutils/elfutils-0.131/gnu_inline.diff @@ -0,0 +1,105 @@ +--- + backends/ia64_retval.c | 3 +++ + libdw/libdw.h | 2 +- + libdw/libdwP.h | 3 +++ + src/ld.h | 3 +++ + src/strip.c | 3 +++ + src/unstrip.c | 4 ++++ + 6 files changed, 17 insertions(+), 1 deletion(-) + +--- elfutils-0.131.orig/backends/ia64_retval.c ++++ elfutils-0.131/backends/ia64_retval.c +@@ -31,10 +31,13 @@ + #include <dwarf.h> + + #define BACKEND ia64_ + #include "libebl_CPU.h" + ++#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) ++#define inline inline __attribute__ ((gnu_inline)) ++#endif + + /* r8, or pair r8, r9, or aggregate up to r8-r11. */ + static const Dwarf_Op loc_intreg[] = + { + { .atom = DW_OP_reg8 }, { .atom = DW_OP_piece, .number = 8 }, +--- elfutils-0.131.orig/libdw/libdw.h ++++ elfutils-0.131/libdw/libdw.h +@@ -62,11 +62,11 @@ + # define __nonnull_attribute__(args...) + # define __deprecated_attribute__ + #endif + + +-#ifdef __GNUC_STDC_INLINE__ ++#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) + # define __libdw_extern_inline extern __inline __attribute__ ((__gnu_inline__)) + #else + # define __libdw_extern_inline extern __inline + #endif + +--- elfutils-0.131.orig/libdw/libdwP.h ++++ elfutils-0.131/libdw/libdwP.h +@@ -54,10 +54,13 @@ + #include <libintl.h> + #include <stdbool.h> + + #include <libdw.h> + ++#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) ++#define inline inline __attribute__ ((gnu_inline)) ++#endif + + /* gettext helper macros. */ + #define _(Str) dgettext ("elfutils", Str) + + +--- elfutils-0.131.orig/src/ld.h ++++ elfutils-0.131/src/ld.h +@@ -30,10 +30,13 @@ + #include <obstack.h> + #include <stdbool.h> + #include <stdio.h> + #include "xelf.h" + ++#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) ++#define inline inline __attribute__ ((gnu_inline)) ++#endif + + /* Recommended size of the buffer passed to ld_strerror. */ + #define ERRBUFSIZE (512) + + /* Character used to introduce version name after symbol. */ +--- elfutils-0.131.orig/src/strip.c ++++ elfutils-0.131/src/strip.c +@@ -50,10 +50,13 @@ + + #include <elf-knowledge.h> + #include <libebl.h> + #include <system.h> + ++#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) ++#define inline inline __attribute__ ((gnu_inline)) ++#endif + + /* Name and version of program. */ + static void print_version (FILE *stream, struct argp_state *state); + void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; + +--- elfutils-0.131.orig/src/unstrip.c ++++ elfutils-0.131/src/unstrip.c +@@ -60,10 +60,14 @@ + + #ifndef _ + # define _(str) gettext (str) + #endif + ++#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) ++#define inline inline __attribute__ ((gnu_inline)) ++#endif ++ + /* Name and version of program. */ + static void print_version (FILE *stream, struct argp_state *state); + void (*argp_program_version_hook) (FILE *, struct argp_state *) + = print_version; + diff --git a/meta/packages/elfutils/elfutils-0.131/warnings.patch b/meta/packages/elfutils/elfutils-0.131/warnings.patch new file mode 100644 index 0000000000..132e3cf63c --- /dev/null +++ b/meta/packages/elfutils/elfutils-0.131/warnings.patch @@ -0,0 +1,154 @@ +--- + configure.ac | 4 ++++ + lib/Makefile.am | 2 +- + libasm/Makefile.am | 2 +- + libcpu/Makefile.am | 2 +- + libdw/Makefile.am | 2 +- + libebl/Makefile.am | 2 +- + libelf/Makefile.am | 2 +- + src/Makefile.am | 2 +- + tests/Makefile.am | 4 ++-- + 9 files changed, 13 insertions(+), 9 deletions(-) + +--- elfutils-0.131.orig/configure.ac ++++ elfutils-0.131/configure.ac +@@ -54,10 +54,14 @@ AC_DEFINE(USE_TLS)) + AH_TEMPLATE([USE_TLS], [Defined if thread local storage should be used.]) + + dnl Add all the languages for which translations are available. + ALL_LINGUAS= + ++if test X"$CFLAGS" = X; then ++ CFLAGS="-Wall -g -O2" ++fi ++ + AC_PROG_CC + AC_PROG_RANLIB + AC_PROG_YACC + AM_PROG_LEX + +--- elfutils-0.131.orig/lib/Makefile.am ++++ elfutils-0.131/lib/Makefile.am +@@ -28,11 +28,11 @@ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H + if MUDFLAP + AM_CFLAGS = -fmudflap + else + AM_CFLAGS = + endif +-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra $($(*F)_CFLAGS) ++AM_CFLAGS += -fpic -Wshadow -Wunused $($(*F)_CFLAGS) + INCLUDES = -I$(srcdir)/../libelf -I.. + + noinst_LIBRARIES = libeu.a + + libeu_a_SOURCES = xstrndup.c xmalloc.c next_prime.c \ +--- elfutils-0.131.orig/libasm/Makefile.am ++++ elfutils-0.131/libasm/Makefile.am +@@ -28,11 +28,11 @@ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H + if MUDFLAP + AM_CFLAGS = -fmudflap + else + AM_CFLAGS = + endif +-AM_CFLAGS += -std=gnu99 -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 ++AM_CFLAGS += -std=gnu99 -Wall -Wshadow -Wunused -Wextra -Wformat=2 + INCLUDES = -I. -I$(srcdir) -I.. \ + -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl -I$(top_srcdir)/libdw\ + -I$(top_srcdir)/lib + GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) + VERSION = 1 +--- elfutils-0.131.orig/libcpu/Makefile.am ++++ elfutils-0.131/libcpu/Makefile.am +@@ -23,11 +23,11 @@ + ## included package. Should you wish to participate in the Open Invention + ## Network licensing program, please visit www.openinventionnetwork.com + ## <http://www.openinventionnetwork.com>. + ## + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H +-AM_CFLAGS = -Wall -Wshadow -Werror -Wextra -Wformat=2 -Wunused ++AM_CFLAGS = -Wshadow -Wformat=2 -Wunused + INCLUDES = -I$(srcdir) + + noinst_LIBRARIES = libcpu_i386.a + + libcpu_i386_a_SOURCES = i386_dis.c +--- elfutils-0.131.orig/libdw/Makefile.am ++++ elfutils-0.131/libdw/Makefile.am +@@ -31,11 +31,11 @@ else + AM_CFLAGS = + endif + if BUILD_STATIC + AM_CFLAGS += -fpic + endif +-AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99 ++AM_CFLAGS += -Wshadow -Wunused -Wformat=2 -std=gnu99 + INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib + VERSION = 1 + + COMPILE.os = $(filter-out -fprofile-arcs, $(filter-out -ftest-coverage, \ + $(COMPILE))) +--- elfutils-0.131.orig/libebl/Makefile.am ++++ elfutils-0.131/libebl/Makefile.am +@@ -28,11 +28,11 @@ DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DO + if MUDFLAP + AM_CFLAGS = -fmudflap + else + AM_CFLAGS = + endif +-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \ ++AM_CFLAGS += -fpic -Wshadow -Wunused -Wformat=2 \ + -std=gnu99 + + INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw \ + -I$(top_srcdir)/lib -I.. + VERSION = 1 +--- elfutils-0.131.orig/libelf/Makefile.am ++++ elfutils-0.131/libelf/Makefile.am +@@ -31,11 +31,11 @@ else + AM_CFLAGS = + endif + if BUILD_STATIC + AM_CFLAGS += -fpic + endif +-AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \ ++AM_CFLAGS += -Wshadow -Wunused -Wformat=2 -std=gnu99 \ + $($(*F)_CFLAGS) + INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I.. + GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) + VERSION = 1 + PACKAGE_VERSION = @PACKAGE_VERSION@ +--- elfutils-0.131.orig/src/Makefile.am ++++ elfutils-0.131/src/Makefile.am +@@ -30,11 +30,11 @@ if MUDFLAP + AM_CFLAGS = -fmudflap + else + AM_CFLAGS = + endif + AM_CFLAGS += -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \ +- $(if $($(*F)_no_Werror),,-Werror) \ ++ $(if $($(*F)_no_Werror),,) \ + $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ + $(if $($(*F)_no_Wformat),,-Wformat=2) $(CFLAGS_$(*F)) + + INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ + -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \ +--- elfutils-0.131.orig/tests/Makefile.am ++++ elfutils-0.131/tests/Makefile.am +@@ -24,15 +24,15 @@ + ## Network licensing program, please visit www.openinventionnetwork.com + ## <http://www.openinventionnetwork.com>. + ## + DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE + if MUDFLAP +-AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\ ++AM_CFLAGS = -Wall -Wextra -std=gnu99 -fmudflap\ + $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) + BUILD_RPATH = \$$ORIGIN/../backends + else +-AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \ ++AM_CFLAGS = -Wall -Wextra -std=gnu99 \ + $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) + BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf + endif + + AM_LDFLAGS = diff --git a/meta/packages/elfutils/elfutils_0.131.bb b/meta/packages/elfutils/elfutils_0.131.bb new file mode 100644 index 0000000000..3385ae0c27 --- /dev/null +++ b/meta/packages/elfutils/elfutils_0.131.bb @@ -0,0 +1,53 @@ +SECTION = "base" +LICENSE = "OSL" +DESCRIPTION = "A collection of utilities and DSOs to handle compiled objects." +DEPENDS = "libtool" + +SRC_URI = "http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/elfutils-${PV}.tar.gz \ + file://warnings.patch;patch=1 \ + file://gcc-4.3_support.diff;patch=1 \ + file://gnu_inline.diff;patch=1" + +inherit autotools + +# Package binaries that overlap with binutils separately +PACKAGES =+ "${PN}-binutils" +FILES_${PN}-binutils = "\ + ${bindir}/addr2line \ + ${bindir}/ld \ + ${bindir}/nm \ + ${bindir}/readelf \ + ${bindir}/size \ + ${bindir}/strip" +# Fix library issues +FILES_${PN} =+ "${libdir}/*-${PV}.so" + +SOV = "${PV}" +do_stage () { + install -m 0644 libelf/libelf.a ${STAGING_LIBDIR}/libelf.a + install -m 0755 libelf/libelf.so.1 ${STAGING_LIBDIR}/libelf-${SOV}.so + ln -sf libelf-${SOV}.so ${STAGING_LIBDIR}/libelf.so.1 + ln -sf libelf.so.1 ${STAGING_LIBDIR}/libelf.so + install -m 0644 libasm/libasm.a ${STAGING_LIBDIR}/libasm.a + install -m 0755 libasm/libasm.so.1 ${STAGING_LIBDIR}/libasm-${SOV}.so + ln -sf libasm-${SOV}.so ${STAGING_LIBDIR}/libasm.so.1 + ln -sf libasm.so.1 ${STAGING_LIBDIR}/libasm.so + install -m 0644 libdw/libdw.a ${STAGING_LIBDIR}/libdw.a + install -m 0755 libdw/libdw.so.1 ${STAGING_LIBDIR}/libdw-${SOV}.so + ln -sf libdw-${SOV}.so ${STAGING_LIBDIR}/libdw.so.1 + ln -sf libdw.so.1 ${STAGING_LIBDIR}/libdw.so + install -m 0644 libebl/libebl.a ${STAGING_LIBDIR}/libebl.a + install -d ${STAGING_LIBDIR}/elfutils/ + install -m 0755 backends/libebl_*.so ${STAGING_LIBDIR}/elfutils/ + + install -m 0644 ${S}/libelf/libelf.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/libelf/gelf.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/libelf/nlist.h ${STAGING_INCDIR}/ + install -d ${STAGING_INCDIR}/elfutils + install -m 0644 ${S}/libebl/libebl.h ${STAGING_INCDIR}/elfutils/ + install -m 0644 ${S}/libdw/libdw.h ${STAGING_INCDIR}/elfutils/ + install -m 0644 ${S}/libasm/libasm.h ${STAGING_INCDIR}/elfutils/ +} + +# The elfutils package contains symlinks that trip up insane +INSANE_SKIP_elfutils = "1" |