Merge pull request #4038 from MilhouseVH/le10_elfutils-readelf

elfutils: install readelf in non-release builds
This commit is contained in:
Christian Hewitt 2020-01-08 19:40:43 +04:00 committed by GitHub
commit 269168976c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 71 additions and 16 deletions

View File

@ -14,14 +14,35 @@ PKG_LONGDESC="A collection of utilities to handle ELF objects."
PKG_TOOLCHAIN="autotools" PKG_TOOLCHAIN="autotools"
PKG_BUILD_FLAGS="+pic" PKG_BUILD_FLAGS="+pic"
if [ "${LIBREELEC_VERSION}" = "devel" ]; then
PKG_PROGRAMS="--enable-programs --program-prefix="
PKG_PROGRAMS_LIST="readelf"
else
PKG_PROGRAMS="--disable-programs"
PKG_PROGRAMS_LIST=
fi
PKG_CONFIGURE_OPTS_HOST="utrace_cv_cc_biarch=false \
--disable-programs \
--disable-nls \
--with-zlib \
--without-bzlib \
--without-lzma"
PKG_CONFIGURE_OPTS_TARGET="utrace_cv_cc_biarch=false \ PKG_CONFIGURE_OPTS_TARGET="utrace_cv_cc_biarch=false \
${PKG_PROGRAMS} \
--disable-nls \ --disable-nls \
--with-zlib \ --with-zlib \
--without-bzlib \ --without-bzlib \
--without-lzma" --without-lzma"
PKG_CONFIGURE_OPTS_HOST="utrace_cv_cc_biarch=false \ post_makeinstall_target() {
--disable-nls \ # don't install progs into sysroot
--with-zlib \ rm -fr ${SYSROOT_PREFIX}/usr/bin
--without-bzlib \
--without-lzma" if [ -n "${PKG_PROGRAMS_LIST}" ]; then
for PKG_TEMP in $(find ${INSTALL}/usr/bin -type f); do
listcontains "${PKG_PROGRAMS_LIST}" ${PKG_TEMP#${INSTALL}/usr/bin/} || rm ${PKG_TEMP}
done
fi
}

View File

@ -1,11 +0,0 @@
--- elfutils-0.176/Makefile.am.orig 2019-04-01 12:59:25.141077178 +0200
+++ elfutils-0.176/Makefile.am 2019-04-01 12:59:34.157100775 +0200
@@ -28,7 +28,7 @@
# 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 po tests
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
COPYING COPYING-GPLV2 COPYING-LGPLV3

View File

@ -0,0 +1,45 @@
From ca1a78e042fa55f378f3402559f9cfb41c603406 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Wed, 4 Dec 2019 09:19:19 +0000
Subject: [PATCH] make executables optional
---
Makefile.am | 5 ++++-
configure.ac | 5 +++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 2ff444e..314083f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,10 @@ 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
+ backends po tests
+if BUILD_PROGRAMS
+ SUBDIRS += src
+endif
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
COPYING COPYING-GPLV2 COPYING-LGPLV3
diff --git a/configure.ac b/configure.ac
index b4e012d..0fd46cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,6 +85,11 @@ AS_IF([test "$use_locks" = yes],
AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
+AC_ARG_ENABLE([programs],
+AS_HELP_STRING([--enable-programs], [Build and install programs when enabled (default: disabled)]),
+ [build_programs=$enableval], [build_programs=no])
+AM_CONDITIONAL(BUILD_PROGRAMS, test "$build_programs" = yes)
+
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_YACC
--
2.20.1