Move all to deprecated folder.

This commit is contained in:
2016-11-16 21:57:57 +01:00
parent 01738a7684
commit 05de7d6c04
9777 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
Allow the usage of an external implementation of the argp functions
uClibc lack the argp family of functions that glibc has. Therefore, we
add a check in the configure script to see if argp_parse is available
in the C library. If not, we look if it is available in the additional
'argp' library. If so, we link against that library. If not, we error
out.
This allows to build elfutils against uClibc with an external argp
library.
Based on the former patch by Thomas Petazzoni.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
diff -rup a/configure.ac b/configure.ac
--- a/configure.ac 2015-01-06 11:30:02.170052875 +0000
+++ b/configure.ac 2015-01-06 11:31:10.122219826 +0000
@@ -253,6 +253,13 @@ AC_SUBST([LIBEBL_SUBDIR])
AC_DEFINE_UNQUOTED(LIBEBL_SUBDIR, "$LIBEBL_SUBDIR")
AH_TEMPLATE([LIBEBL_SUBDIR], [$libdir subdirectory containing libebl modules.])
+AC_CHECK_FUNC([argp_parse])
+if test "$ac_cv_func_argp_parse" != yes; then
+ AC_CHECK_LIB([argp],[argp_parse],ARGP_LIBS=-largp,
+ AC_MSG_ERROR([No argp_parse function available.]))
+fi
+AC_SUBST(ARGP_LIBS)
+
dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am
dnl conditional and config.h USE_ZLIB/USE_BZLIB #define.
save_LIBS="$LIBS"
diff -rup a/libdw/Makefile.am b/libdw/Makefile.am
--- a/libdw/Makefile.am 2014-12-19 20:43:11.000000000 +0000
+++ b/libdw/Makefile.am 2015-01-06 11:32:21.075438524 +0000
@@ -112,7 +112,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
-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) $(ARGP_LIBS)
@$(textrel_check)
ln -fs $@ $@.$(VERSION)
diff -rup a/src/Makefile.am b/src/Makefile.am
--- a/src/Makefile.am 2015-01-06 11:30:02.430057339 +0000
+++ b/src/Makefile.am 2015-01-06 11:34:53.061049752 +0000
@@ -94,27 +94,29 @@ readelf_no_Werror = yes
strings_no_Werror = yes
addr2line_no_Wformat = yes
-readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl
+readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl $(ARGP_LIBS)
nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl \
- $(demanglelib)
-size_LDADD = $(libelf) $(libeu)
-strip_LDADD = $(libebl) $(libelf) $(libeu) -ldl
-ld_LDADD = $(libebl) $(libelf) $(libeu) -ldl
+ $(demanglelib) $(ARGP_LIBS)
+size_LDADD = $(libelf) $(libeu) $(ARGP_LIBS)
+strip_LDADD = $(libebl) $(libelf) $(libeu) -ldl $(ARGP_LIBS)
+ld_LDADD = $(libebl) $(libelf) $(libeu) -ldl $(ARGP_LIBS)
if NATIVE_LD
# -ldl is always needed for libebl.
ld_LDADD += libld_elf.a
endif
ld_LDFLAGS = -rdynamic
-elflint_LDADD = $(libebl) $(libelf) $(libeu) -ldl
-findtextrel_LDADD = $(libdw) $(libelf)
-addr2line_LDADD = $(libdw) $(libelf)
-elfcmp_LDADD = $(libebl) $(libelf) -ldl
-objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) -ldl
-ranlib_LDADD = libar.a $(libelf) $(libeu)
-strings_LDADD = $(libelf) $(libeu)
-ar_LDADD = libar.a $(libelf) $(libeu)
-unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl
-stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl $(demanglelib)
+elflint_LDADD = $(libebl) $(libelf) $(libeu) -ldl $(ARGP_LIBS)
+findtextrel_LDADD = $(libdw) $(libelf) $(ARGP_LIBS)
+addr2line_LDADD = $(libdw) $(libelf) $(ARGP_LIBS)
+elfcmp_LDADD = $(libebl) $(libelf) -ldl $(ARGP_LIBS)
+objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) -ldl \
+ $(ARGP_LIBS)
+ranlib_LDADD = libar.a $(libelf) $(libeu) $(ARGP_LIBS)
+strings_LDADD = $(libelf) $(libeu) $(ARGP_LIBS)
+ar_LDADD = libar.a $(libelf) $(libeu) $(ARGP_LIBS)
+unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl $(ARGP_LIBS)
+stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl \
+ $(demanglelib) $(ARGP_LIBS)
ldlex.o: ldscript.c
ldlex_no_Werror = yes

View File

@@ -0,0 +1,48 @@
Add a --{enable,disable}-progs configure option
Add a --{enable,disable}-progs configuration option to elfutils. This
allows to selectively disable the compilation of the elfutils programs
(in which case only the libraries are built and installed). This is
useful because the programs are often not needed, and also because
building the programs against uClibc causes several issues (lack of
obstack_printf() in uClibc for example).
Based on the former patch by Thomas Petazzoni.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
diff -rup a/configure.ac b/configure.ac
--- a/configure.ac 2015-01-06 11:31:10.122219826 +0000
+++ b/configure.ac 2015-01-06 11:37:38.397891424 +0000
@@ -260,6 +260,12 @@ if test "$ac_cv_func_argp_parse" != yes;
fi
AC_SUBST(ARGP_LIBS)
+AC_ARG_ENABLE([progs],
+ AS_HELP_STRING([--enable-progs], [enable progs]),
+ enable_progs=$enableval,
+ enable_progs=yes)
+AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes)
+
dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am
dnl conditional and config.h USE_ZLIB/USE_BZLIB #define.
save_LIBS="$LIBS"
diff -rup a/Makefile.am b/Makefile.am
--- a/Makefile.am 2014-06-17 19:51:09.000000000 +0100
+++ b/Makefile.am 2015-01-06 11:38:42.846999410 +0000
@@ -22,9 +22,13 @@ ACLOCAL_AMFLAGS = -I m4
pkginclude_HEADERS = version.h
+if ENABLE_PROGS
+PROGS_SUBDIR = src
+endif
+
# Add doc back when we have some real content.
SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
- backends src po tests
+ backends $(PROGS_SUBDIR) po tests
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
COPYING COPYING-GPLV2 COPYING-LGPLV3

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,24 @@
Disable the build of the po/ directory
Building the po/ directory complains that the scripts in there have
been generated with gettext 0.17, while we use gettext 0.18 in
Buildroot. Since we don't care that much about po files anyway, just
disable the build of this directory.
Based on the former patch by Thomas Petazzoni.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
diff -rup a/Makefile.am b/Makefile.am
--- a/Makefile.am 2014-11-07 15:14:39.018060884 +0000
+++ b/Makefile.am 2014-11-07 15:30:02.864918229 +0000
@@ -28,7 +28,7 @@ endif
# Add doc back when we have some real content.
SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
- backends $(PROGS_SUBDIR) po tests
+ backends $(PROGS_SUBDIR) tests
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
COPYING COPYING-GPLV2 COPYING-LGPLV3

View File

@@ -0,0 +1,24 @@
Really make -Werror conditional to BUILD_WERROR
Otherwise it will fail with an error message like this one:
elf_getarsym.c:290:9: error: 'n' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
arsym[n].as_name = NULL;
^
cc1: all warnings being treated as errors
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
diff -rup a/config/eu.am b/config/eu.am
--- a/config/eu.am 2014-11-10 16:19:14.356031479 +0000
+++ b/config/eu.am 2014-11-10 16:21:11.702072011 +0000
@@ -35,7 +35,6 @@ LD_AS_NEEDED = @LD_AS_NEEDED@
DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
- $(if $($(*F)_no_Werror),,-Werror) \
$(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
$(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
$($(*F)_CFLAGS)

View File

@@ -0,0 +1,26 @@
Provide a compatibility alias __memcpy
For some reason, libelf uses the internal glibc alias __memcpy, which
doesn't exist in uClibc. Add a manual alias so that the build can
proceed with uClibc.
Based on the former patch by Thomas Petazzoni.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
diff -rup a/libelf/libelf.h b/libelf/libelf.h
--- a/libelf/libelf.h 2014-08-27 10:25:17.000000000 +0100
+++ b/libelf/libelf.h 2014-11-07 15:13:08.743508221 +0000
@@ -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

View File

@@ -0,0 +1,139 @@
From bafacacaf7659a4933604662daba26a480b29a8d Mon Sep 17 00:00:00 2001
From: Max Filippov <jcmvbkbc@gmail.com>
Date: Thu, 23 Apr 2015 20:46:59 +0200
Subject: [PATCH] Allow disabling symbol versioning at configure time
Due to missing symbol versioning support in uClibc calls to versioned
functions that internally call different version of themselves results
in infinite recursion.
Introduce macro SYMBOL_VERSIONING and use it instead of plain SHARED to
decide whether symbol versioning is needed. Control this macro
definition with new configure option --disable-symbol-versioning.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
Backported from: bafacacaf7659a4933604662daba26a480b29a8d
Changes to ChangeLogs are dropped.
config/eu.am | 10 ++++++++--
configure.ac | 7 +++++++
lib/eu-config.h | 6 +++---
libdwfl/core-file.c | 2 +-
libdwfl/dwfl_module_build_id.c | 2 +-
libdwfl/dwfl_report_elf.c | 2 +-
diff --git a/config/eu.am b/config/eu.am
index faf8add..6103a3e 100644
--- a/config/eu.am
+++ b/config/eu.am
@@ -38,16 +38,22 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
+DEFS.os = -DPIC -DSHARED
+if SYMBOL_VERSIONING
+DEFS.os += -DSYMBOL_VERSIONING
+else
+endif
+
%.os: %.c %.o
if AMDEP
- if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \
+ if $(COMPILE.os) -c -o $@ -fpic $(DEFS.os) -MT $@ -MD -MP \
-MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \
then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \
rm -f "$(DEPDIR)/$*.Tpo"; \
else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
fi
else
- $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $<
+ $(COMPILE.os) -c -o $@ -fpic $(DEFS.os) $<
endif
CLEANFILES = *.gcno *.gcda
diff --git a/configure.ac b/configure.ac
index ed2c964..be01573 100644
--- a/configure.ac
+++ b/configure.ac
@@ -241,6 +241,13 @@ AS_HELP_STRING([--disable-textrelcheck],
[Disable textrelcheck being a fatal error]))
AM_CONDITIONAL(FATAL_TEXTREL, [test "x$enable_textrelcheck" != "xno"])
+AC_ARG_ENABLE([symbol-versioning],
+AS_HELP_STRING([--disable-symbol-versioning],
+ [Disable symbol versioning in shared objects]))
+AM_CONDITIONAL(SYMBOL_VERSIONING, [test "x$enable_symbol_versioning" != "xno"])
+AS_IF([test "x$enable_symbol_versioning" = "xno"],
+ [AC_MSG_WARN([Disabling symbol versioning breaks ABI compatibility.])])
+
dnl The directories with content.
dnl Documentation.
diff --git a/lib/eu-config.h b/lib/eu-config.h
index 3afff26..5bb21c1 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -163,7 +163,7 @@ asm (".section predict_data, \"aw\"; .previous\n"
#define ELFUTILS_HEADER(name) <lib##name.h>
-#ifdef SHARED
+#ifdef SYMBOL_VERSIONING
# define OLD_VERSION(name, version) \
asm (".globl _compat." #version "." #name "\n" \
"_compat." #version "." #name " = " #name "\n" \
@@ -181,8 +181,8 @@ asm (".section predict_data, \"aw\"; .previous\n"
# define OLD_VERSION(name, version) /* Nothing for static linking. */
# define NEW_VERSION(name, version) /* Nothing for static linking. */
# define COMPAT_VERSION_NEWPROTO(name, version, prefix) \
- error "should use #ifdef SHARED"
-# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SHARED"
+ error "should use #ifdef SYMBOL_VERSIONING"
+# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING"
#endif
diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c
index 324e9d2..bbe0899 100644
--- a/libdwfl/core-file.c
+++ b/libdwfl/core-file.c
@@ -588,7 +588,7 @@ dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable)
INTDEF (dwfl_core_file_report)
NEW_VERSION (dwfl_core_file_report, ELFUTILS_0.158)
-#ifdef SHARED
+#ifdef SYMBOL_VERSIONING
int _compat_without_executable_dwfl_core_file_report (Dwfl *dwfl, Elf *elf);
COMPAT_VERSION_NEWPROTO (dwfl_core_file_report, ELFUTILS_0.146,
without_executable)
diff --git a/libdwfl/dwfl_module_build_id.c b/libdwfl/dwfl_module_build_id.c
index 350bbf8..c9a42ca 100644
--- a/libdwfl/dwfl_module_build_id.c
+++ b/libdwfl/dwfl_module_build_id.c
@@ -101,7 +101,7 @@ dwfl_module_build_id (Dwfl_Module *mod,
INTDEF (dwfl_module_build_id)
NEW_VERSION (dwfl_module_build_id, ELFUTILS_0.138)
-#ifdef SHARED
+#ifdef SYMBOL_VERSIONING
COMPAT_VERSION (dwfl_module_build_id, ELFUTILS_0.130, vaddr_at_end)
int
diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c
index 3a4ae2e..624284c 100644
--- a/libdwfl/dwfl_report_elf.c
+++ b/libdwfl/dwfl_report_elf.c
@@ -321,7 +321,7 @@ dwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd,
INTDEF (dwfl_report_elf)
NEW_VERSION (dwfl_report_elf, ELFUTILS_0.156)
-#ifdef SHARED
+#ifdef SYMBOL_VERSIONING
Dwfl_Module *
_compat_without_add_p_vaddr_dwfl_report_elf (Dwfl *dwfl, const char *name,
const char *file_name, int fd,
--
1.8.1.4

View File

@@ -0,0 +1,35 @@
comment "elfutils needs a uClibc or (e)glibc toolchain w/ wchar, dynamic library"
depends on !BR2_bfin
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \
|| !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
config BR2_PACKAGE_ELFUTILS
bool "elfutils"
select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC
select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
depends on BR2_USE_WCHAR
depends on !BR2_STATIC_LIBS
# Only glibc and uClibc implement the myriad of required GNUisms
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC
# build issue caused by the _ prefix used on blackfin for
# assembly symbols
depends on !BR2_bfin
help
Libraries/utilities to handle ELF objects (drop in
replacement for libelf).
Note that this option only installs the libraries, and not
the programs.
https://fedorahosted.org/elfutils
if BR2_PACKAGE_ELFUTILS
config BR2_PACKAGE_ELFUTILS_PROGS
bool "Install programs"
depends on BR2_TOOLCHAIN_USES_GLIBC
help
This option tells elfutils to not only install the libelf
libraries, but also the elfutils programs.
endif

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 570c91a1783fa5386aaa2dfdd08dda1de777c2b63bf3b9c1437d635ffdd7a070 elfutils-0.161.tar.bz2
sha256 bf0363d03e1e4668778eb4e7ddd10e405a22f753b3ad813a537fc01164d1e3fe elfutils-portability-0.161.patch

View File

@@ -0,0 +1,74 @@
################################################################################
#
# elfutils
#
################################################################################
ELFUTILS_VERSION = 0.161
ELFUTILS_SOURCE = elfutils-$(ELFUTILS_VERSION).tar.bz2
ELFUTILS_SITE = https://fedorahosted.org/releases/e/l/elfutils/$(ELFUTILS_VERSION)
ELFUTILS_INSTALL_STAGING = YES
ELFUTILS_LICENSE = GPLv3, GPLv2, LGPLv3
ELFUTILS_LICENSE_FILES = COPYING COPYING-GPLV2 COPYING-LGPLV3
ELFUTILS_PATCH = elfutils-portability-0.161.patch
# The tarball does not have a generated configure script
ELFUTILS_AUTORECONF = YES
ELFUTILS_CONF_OPTS += --disable-werror
ELFUTILS_CFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))
# sparc64 needs -fPIC instead of -fpic
ifeq ($(BR2_sparc64),y)
ELFUTILS_CFLAGS += -fPIC
endif
# elfutils gets confused when lfs mode is forced, so don't
ELFUTILS_CONF_ENV += \
CFLAGS="$(ELFUTILS_CFLAGS)" \
CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))"
ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS)
# Unconditionnally requires gettext.
ifeq ($(BR2_NEEDS_GETTEXT),y)
ELFUTILS_DEPENDENCIES += gettext
ELFUTILS_LDFLAGS += -lintl
endif
ELFUTILS_CONF_ENV += \
LDFLAGS="$(ELFUTILS_LDFLAGS)"
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
ELFUTILS_DEPENDENCIES += argp-standalone
ELFUTILS_CONF_OPTS += --disable-symbol-versioning
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
ELFUTILS_DEPENDENCIES += zlib
ELFUTILS_CONF_OPTS += --with-zlib
else
ELFUTILS_CONF_OPTS += --without-zlib
endif
ifeq ($(BR2_PACKAGE_BZIP2),y)
ELFUTILS_DEPENDENCIES += bzip2
ELFUTILS_CONF_OPTS += --with-bzlib
else
ELFUTILS_CONF_OPTS += --without-bzlib
endif
ifeq ($(BR2_PACKAGE_XZ),y)
ELFUTILS_DEPENDENCIES += xz
ELFUTILS_CONF_OPTS += --with-lzma
else
ELFUTILS_CONF_OPTS += --without-lzma
endif
ifeq ($(BR2_PACKAGE_ELFUTILS_PROGS),y)
ELFUTILS_CONF_OPTS += --enable-progs
else
ELFUTILS_CONF_OPTS += --disable-progs
endif
$(eval $(autotools-package))