Merge pull request #664 from luizluca/elfutils
elfutils: imported from oldpackages, updated to 0.160
This commit is contained in:
commit
2280c80e97
8 changed files with 2095 additions and 0 deletions
92
libs/elfutils/Makefile
Normal file
92
libs/elfutils/Makefile
Normal file
|
@ -0,0 +1,92 @@
|
|||
#
|
||||
# Copyright (C) 2010-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=elfutils
|
||||
PKG_VERSION:=0.160
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
|
||||
PKG_MD5SUM:=7527f22dff8b1ac8c122cfc4d3d3bb1e
|
||||
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
||||
PKG_LICENSE:=GPL-3.0+
|
||||
PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/elfutils/Default
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=$(INTL_DEPENDS)
|
||||
TITLE:=ELF manipulation libraries
|
||||
URL:=https://fedorahosted.org/elfutils/
|
||||
endef
|
||||
|
||||
define Package/libasm
|
||||
$(call Package/elfutils/Default)
|
||||
TITLE+= (libasm)
|
||||
DEPENDS:=libelf1
|
||||
endef
|
||||
|
||||
define Package/libdw
|
||||
$(call Package/elfutils/Default)
|
||||
DEPENDS:=libelf1 +zlib +libbz2
|
||||
TITLE+= (libdw)
|
||||
endef
|
||||
|
||||
define Package/libelf1
|
||||
$(call Package/elfutils/Default)
|
||||
TITLE+= (libelf)
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_BUILD_NLS),y)
|
||||
TARGET_LDFLAGS += "-lintl"
|
||||
endif
|
||||
|
||||
ifdef CONFIG_USE_UCLIBC
|
||||
CONFIGURE_VARS += \
|
||||
LIBS="-largp"
|
||||
endif
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-werror \
|
||||
--without-lzma
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libasm/libasm.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/libdw/libdw.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/libelf/libelf.{a,so*} $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libasm/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libasm/libasm.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libdw/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libdw/libdw.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libelf1/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libelf/libelf.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libasm))
|
||||
$(eval $(call BuildPackage,libdw))
|
||||
$(eval $(call BuildPackage,libelf1))
|
1869
libs/elfutils/patches/001-elfutils-portability.patch
Normal file
1869
libs/elfutils/patches/001-elfutils-portability.patch
Normal file
File diff suppressed because it is too large
Load diff
14
libs/elfutils/patches/002-argp_standalone.patch
Normal file
14
libs/elfutils/patches/002-argp_standalone.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- elfutils-0.160/lib/color.c.old 2014-11-06 03:46:43.584116134 -0200
|
||||
+++ elfutils-0.160/lib/color.c 2014-11-06 03:47:25.840116128 -0200
|
||||
@@ -131,8 +131,10 @@
|
||||
- 'never', 'no', 'none'\n\
|
||||
- 'auto', 'tty', 'if-tty'\n"),
|
||||
program_invocation_short_name, arg);
|
||||
+ char program_invocation_short_name_nonconst[sizeof(program_invocation_short_name)];
|
||||
+ strcpy(program_invocation_short_name_nonconst, program_invocation_short_name);
|
||||
argp_help (&color_argp, stderr, ARGP_HELP_SEE,
|
||||
- program_invocation_short_name);
|
||||
+ program_invocation_short_name_nonconst);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
49
libs/elfutils/patches/003-libint-stub.patch
Normal file
49
libs/elfutils/patches/003-libint-stub.patch
Normal file
|
@ -0,0 +1,49 @@
|
|||
--- elfutils-0.160/libelf/libelfP.h.old 2014-11-06 01:47:55.420116984 -0200
|
||||
+++ elfutils-0.160/libelf/libelfP.h 2014-11-06 01:48:33.368116980 -0200
|
||||
@@ -43,6 +43,9 @@
|
||||
#include <string.h>
|
||||
|
||||
+#ifdef _ /* fix libintl-stub */
|
||||
+#undef _
|
||||
+#endif
|
||||
/* gettext helper macros. */
|
||||
#define _(Str) dgettext ("elfutils", Str)
|
||||
|
||||
|
||||
--- elfutils-0.160/libdw/libdwP.h.old 2014-11-06 02:27:12.628116703 -0200
|
||||
+++ elfutils-0.160/libdw/libdwP.h 2014-11-06 02:27:39.816116700 -0200
|
||||
@@ -36,7 +36,9 @@
|
||||
#include <libdw.h>
|
||||
#include <dwarf.h>
|
||||
|
||||
-
|
||||
+#ifdef _ /* fix libintl-stub */
|
||||
+#undef _
|
||||
+#endif
|
||||
/* gettext helper macros. */
|
||||
#define _(Str) dgettext ("elfutils", Str)
|
||||
|
||||
--- elfutils-0.160/libdwfl/libdwflP.h.old 2014-11-06 02:31:20.112116673 -0200
|
||||
+++ elfutils-0.160/libdwfl/libdwflP.h 2014-11-06 02:33:00.548116661 -0200
|
||||
@@ -46,6 +46,9 @@
|
||||
|
||||
typedef struct Dwfl_Process Dwfl_Process;
|
||||
|
||||
+#ifdef _ /* fix libintl-stub */
|
||||
+#undef _
|
||||
+#endif
|
||||
/* gettext helper macros. */
|
||||
#define _(Str) dgettext ("elfutils", Str)
|
||||
|
||||
--- elfutils-0.160/libasm/libasmP.h.old 2014-11-06 02:31:32.064116672 -0200
|
||||
+++ elfutils-0.160/libasm/libasmP.h 2014-11-06 02:33:08.656116660 -0200
|
||||
@@ -33,6 +33,9 @@
|
||||
|
||||
#include <libasm.h>
|
||||
|
||||
+#ifdef _ /* fix libintl-stub */
|
||||
+#undef _
|
||||
+#endif
|
||||
/* gettext helper macros. */
|
||||
#define _(Str) dgettext ("elfutils", Str)
|
||||
|
11
libs/elfutils/patches/004-maybe-uninitialized.patch
Normal file
11
libs/elfutils/patches/004-maybe-uninitialized.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- elfutils-0.160/libelf/elf_getarsym.c.org 2014-11-06 01:56:58.664116919 -0200
|
||||
+++ elfutils-0.160/libelf/elf_getarsym.c 2014-11-06 01:57:09.396116918 -0200
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
/* We have an archive. The first word in there is the number of
|
||||
entries in the table. */
|
||||
- uint64_t n;
|
||||
+ uint64_t n = 0;
|
||||
size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr);
|
||||
if (read_number_entries (&n, elf, &off, index64_p) < 0)
|
||||
{
|
14
libs/elfutils/patches/004-memcpy_def.patch
Normal file
14
libs/elfutils/patches/004-memcpy_def.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- a/libelf/libelf.h
|
||||
+++ b/libelf/libelf.h
|
||||
@@ -34,6 +34,11 @@
|
||||
/* Get the ELF types. */
|
||||
#include <elf.h>
|
||||
|
||||
+#ifndef _LIBC
|
||||
+#ifndef __mempcpy
|
||||
+#define __mempcpy mempcpy
|
||||
+#endif
|
||||
+#endif
|
||||
|
||||
/* Known translation types. */
|
||||
typedef enum
|
24
libs/elfutils/patches/005-build_only_libs.patch
Normal file
24
libs/elfutils/patches/005-build_only_libs.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
--- elfutils-0.160/Makefile.in.old 2014-11-06 03:56:04.828116067 -0200
|
||||
+++ elfutils-0.160/Makefile.in 2014-11-06 03:57:03.380116060 -0200
|
||||
@@ -359,8 +359,7 @@
|
||||
pkginclude_HEADERS = version.h
|
||||
|
||||
# Add doc back when we have some real content.
|
||||
-SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
|
||||
- backends src po tests
|
||||
+SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libasm
|
||||
|
||||
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
|
||||
COPYING COPYING-GPLV2 COPYING-LGPLV3
|
||||
--- elfutils-0.160/Makefile.am.old 2014-11-06 03:58:13.012116051 -0200
|
||||
+++ elfutils-0.160/Makefile.am 2014-11-06 03:58:25.948116050 -0200
|
||||
@@ -23,8 +23,7 @@
|
||||
pkginclude_HEADERS = version.h
|
||||
|
||||
# Add doc back when we have some real content.
|
||||
-SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
|
||||
- backends src po tests
|
||||
+SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libasm
|
||||
|
||||
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
|
||||
COPYING COPYING-GPLV2 COPYING-LGPLV3
|
22
libs/elfutils/patches/006-libdw_LIBS.patch
Normal file
22
libs/elfutils/patches/006-libdw_LIBS.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- elfutils-0.160/libdw/Makefile.am.old 2014-11-06 03:02:12.700116452 -0200
|
||||
+++ elfutils-0.160/libdw/Makefile.am 2014-11-06 03:02:55.732116447 -0200
|
||||
@@ -110,7 +110,7 @@
|
||||
-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) x $(LIBS)
|
||||
if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
|
||||
ln -fs $@ $@.$(VERSION)
|
||||
|
||||
--- elfutils-0.160/libdw/Makefile.in.old 2014-11-06 03:28:53.092116261 -0200
|
||||
+++ elfutils-0.160/libdw/Makefile.in 2014-11-06 03:29:02.528116260 -0200
|
||||
@@ -958,7 +958,7 @@
|
||||
-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) $(LIBS)
|
||||
if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
|
||||
ln -fs $@ $@.$(VERSION)
|
||||
|
Loading…
Reference in a new issue