Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
From 571445ec4643865566d2c5a9e27d9b78b8b00107 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Mon, 29 May 2017 23:03:48 +0300
|
||||
Subject: [PATCH] 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.
|
||||
|
||||
[Vincent: tweak patch for 0.166]
|
||||
[Bernd: rebased patch for 0.177]
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
[Rebased on 0.183]
|
||||
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||
[Fabrice: don't error out if obstack is not found]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Rebased on 0.192]
|
||||
Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
|
||||
[Rebased on 0.193]
|
||||
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
|
||||
---
|
||||
Makefile.am | 6 +++++-
|
||||
configure.ac | 8 +++++++-
|
||||
2 files changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 92130b57..00f5176b 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -28,8 +28,12 @@ AM_MAKEFLAGS = --no-print-directory
|
||||
|
||||
pkginclude_HEADERS = version.h
|
||||
|
||||
+if ENABLE_PROGS
|
||||
+PROGS_SUBDIR = src
|
||||
+endif
|
||||
+
|
||||
SUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl \
|
||||
- libdwfl_stacktrace libdw libasm debuginfod src po doc tests
|
||||
+ libdwfl_stacktrace libdw libasm debuginfod $(PROGS_SUBDIR) po doc tests
|
||||
|
||||
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING SECURITY \
|
||||
COPYING COPYING-GPLV2 COPYING-LGPLV3 CONDUCT
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f191488f..87d91f8f 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -427,6 +427,12 @@ AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
|
||||
[tests_use_rpath=$enableval], [tests_use_rpath=no])
|
||||
AM_CONDITIONAL(TESTS_RPATH, test "$tests_use_rpath" = yes)
|
||||
|
||||
+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 zlib is mandatory.
|
||||
save_LIBS="$LIBS"
|
||||
LIBS=
|
||||
@@ -671,7 +677,7 @@ saved_LIBS="$LIBS"
|
||||
AC_SEARCH_LIBS([_obstack_free], [obstack])
|
||||
LIBS="$saved_LIBS"
|
||||
case "$ac_cv_search__obstack_free" in
|
||||
- no) AC_MSG_FAILURE([failed to find _obstack_free]) ;;
|
||||
+ no) obstack_LIBS= ;;
|
||||
-l*) obstack_LIBS="$ac_cv_search__obstack_free" ;;
|
||||
*) obstack_LIBS= ;;
|
||||
esac
|
||||
--
|
||||
2.47.1
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 064b74d5e19847794072781405eafe8dfbfca331 Mon Sep 17 00:00:00 2001
|
||||
From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
Date: Mon, 29 May 2017 23:24:42 +0300
|
||||
Subject: [PATCH] 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
|
||||
|
||||
[Vincent: tweak patch for 0.166]
|
||||
[Dario: make the patch to be applied with fuzz factor 0]
|
||||
|
||||
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
[Bernd: rebased patch for 0.195]
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
|
||||
---
|
||||
config/eu.am | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/config/eu.am b/config/eu.am
|
||||
index e6c241f9d88a..cad1baa27a5f 100644
|
||||
--- a/config/eu.am
|
||||
+++ b/config/eu.am
|
||||
@@ -135,7 +135,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
|
||||
$(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
|
||||
$(USE_AFTER_FREE3_WARNING) $(MISSING_PARAMETER_NAME_WARNING) \
|
||||
$(DEPRECATED_NON_PROTOTYPE_WARNING) $(FREE_LABELS_WARNING) \
|
||||
- $(if $($(*F)_no_Werror),,-Werror) \
|
||||
$(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
|
||||
$(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
|
||||
$(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
|
||||
--
|
||||
2.43.0
|
||||
|
||||
46
package/elfutils/Config.in
Normal file
46
package/elfutils/Config.in
Normal file
@@ -0,0 +1,46 @@
|
||||
comment "elfutils needs a toolchain w/ wchar, dynamic library, threads"
|
||||
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \
|
||||
|| !BR2_TOOLCHAIN_HAS_THREADS
|
||||
|
||||
config BR2_PACKAGE_ELFUTILS
|
||||
bool "elfutils"
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_PACKAGE_ZLIB
|
||||
select BR2_PACKAGE_ARGP_STANDALONE if !BR2_TOOLCHAIN_USES_GLIBC
|
||||
select BR2_PACKAGE_MUSL_FTS if !BR2_TOOLCHAIN_USES_GLIBC
|
||||
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://sourceware.org/elfutils/
|
||||
|
||||
if BR2_PACKAGE_ELFUTILS
|
||||
|
||||
config BR2_PACKAGE_ELFUTILS_PROGS
|
||||
bool "Install programs"
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
help
|
||||
This option tells elfutils to not only install the libelf
|
||||
libraries, but also the elfutils programs.
|
||||
|
||||
comment "elfutils programs needs a glibc toolchain w/ C++"
|
||||
depends on !BR2_TOOLCHAIN_USES_GLIBC \
|
||||
|| !BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
config BR2_PACKAGE_ELFUTILS_LIBDEBUGINFOD
|
||||
bool "Build libdebuginfod"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c
|
||||
select BR2_PACKAGE_JSON_C
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
help
|
||||
This option enables building libdebuginfod. Note that this
|
||||
only builds the library, it does not provide any service or
|
||||
data to download debug info.
|
||||
|
||||
endif
|
||||
6
package/elfutils/elfutils.hash
Normal file
6
package/elfutils/elfutils.hash
Normal file
@@ -0,0 +1,6 @@
|
||||
# From https://sourceware.org/elfutils/ftp/0.195/sha512.sum
|
||||
sha512 e1e1fdf4f7f72bf520deb0103bb8fd208dc247bab14af100c6fb56d38c0ef6c6d54ff5bd15b84e4f70e2b2ea481e5999fea2842360f8932a861122df79b5fc8f elfutils-0.195.tar.bz2
|
||||
# Locally calculated
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING-GPLV2
|
||||
sha256 da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768 COPYING-LGPLV3
|
||||
100
package/elfutils/elfutils.mk
Normal file
100
package/elfutils/elfutils.mk
Normal file
@@ -0,0 +1,100 @@
|
||||
################################################################################
|
||||
#
|
||||
# elfutils
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ELFUTILS_VERSION = 0.195
|
||||
ELFUTILS_SOURCE = elfutils-$(ELFUTILS_VERSION).tar.bz2
|
||||
ELFUTILS_SITE = https://sourceware.org/elfutils/ftp/$(ELFUTILS_VERSION)
|
||||
ELFUTILS_INSTALL_STAGING = YES
|
||||
ELFUTILS_LICENSE = GPL-2.0+ or LGPL-3.0+ (library)
|
||||
ELFUTILS_LICENSE_FILES = COPYING COPYING-GPLV2 COPYING-LGPLV3
|
||||
ELFUTILS_CPE_ID_VALID = YES
|
||||
ELFUTILS_DEPENDENCIES = host-pkgconf zlib $(TARGET_NLS_DEPENDENCIES)
|
||||
HOST_ELFUTILS_DEPENDENCIES = host-pkgconf host-zlib host-bzip2 host-xz host-zstd
|
||||
|
||||
# We patch configure.ac
|
||||
ELFUTILS_AUTORECONF = YES
|
||||
HOST_ELFUTILS_AUTORECONF = YES
|
||||
|
||||
# Pass a custom program prefix to avoid a naming conflict between
|
||||
# elfutils binaries and binutils binaries.
|
||||
ELFUTILS_CONF_OPTS += \
|
||||
--program-prefix="eu-"
|
||||
|
||||
HOST_ELFUTILS_CONF_OPTS = \
|
||||
--with-bzlib \
|
||||
--with-lzma \
|
||||
--with-zstd \
|
||||
--disable-demangler \
|
||||
--disable-progs
|
||||
|
||||
ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS) \
|
||||
$(TARGET_NLS_LIBS)
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
ELFUTILS_LDFLAGS += -latomic
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
|
||||
ELFUTILS_DEPENDENCIES += musl-fts argp-standalone
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
||||
ELFUTILS_CONF_OPTS += --disable-symbol-versioning
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_microblaze),y)
|
||||
ELFUTILS_CONF_OPTS += --disable-symbol-versioning
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ELFUTILS_LIBDEBUGINFOD),y)
|
||||
ELFUTILS_CONF_OPTS += --enable-libdebuginfod
|
||||
ELFUTILS_DEPENDENCIES += json-c libcurl
|
||||
else
|
||||
ELFUTILS_CONF_OPTS += --disable-libdebuginfod
|
||||
endif
|
||||
ELFUTILS_CONF_OPTS += --disable-debuginfod
|
||||
HOST_ELFUTILS_CONF_OPTS += --disable-libdebuginfod --disable-debuginfod
|
||||
|
||||
ELFUTILS_CONF_ENV += \
|
||||
LDFLAGS="$(ELFUTILS_LDFLAGS)"
|
||||
|
||||
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
|
||||
ELFUTILS_CONF_OPTS += --enable-demangler
|
||||
else
|
||||
ELFUTILS_CONF_OPTS += --disable-demangler
|
||||
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_ZSTD),y)
|
||||
ELFUTILS_DEPENDENCIES += zstd
|
||||
ELFUTILS_CONF_OPTS += --with-zstd
|
||||
else
|
||||
ELFUTILS_CONF_OPTS += --without-zstd
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ELFUTILS_PROGS),y)
|
||||
ELFUTILS_CONF_OPTS += --enable-progs
|
||||
ELFUTILS_LICENSE += , GPL-3.0+ (programs)
|
||||
ELFUTILS_LICENSE_FILES += COPYING
|
||||
else
|
||||
ELFUTILS_CONF_OPTS += --disable-progs
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user