summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-06-12 22:19:24 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-06-12 22:20:19 +0100
commit4ed405c9e080ea02aa522f51c569763ec6de8bb7 (patch)
tree84008998972bdceaabd84ceea63a1bb344bd79cd /dev-libs/elfutils
parentdev-util/github-cli: remove patch (diff)
downloadgentoo-4ed405c9e080ea02aa522f51c569763ec6de8bb7.tar.gz
gentoo-4ed405c9e080ea02aa522f51c569763ec6de8bb7.tar.bz2
gentoo-4ed405c9e080ea02aa522f51c569763ec6de8bb7.zip
dev-libs/elfutils: bump up to 0.180
Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-libs/elfutils')
-rw-r--r--dev-libs/elfutils/Manifest1
-rw-r--r--dev-libs/elfutils/elfutils-0.180.ebuild86
-rw-r--r--dev-libs/elfutils/files/elfutils-0.180-PaX-support.patch26
-rw-r--r--dev-libs/elfutils/files/elfutils-0.180-readelf.patch23
4 files changed, 136 insertions, 0 deletions
diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest
index 581a21cf845e..f5e4359c6241 100644
--- a/dev-libs/elfutils/Manifest
+++ b/dev-libs/elfutils/Manifest
@@ -1,2 +1,3 @@
DIST elfutils-0.177.tar.bz2 8852413 BLAKE2B 03f432342651f7646d73b7847325bd14b722ce34d85df01b1ad072b916af9b9da2d0d119cd24e952073bd584ec76b027ba9b6c7d45fb057372b3e700b1f5741a SHA512 2779987463a22ed220759e25a09c9a1eb84c0f36db37675136e59aa55c7f8f90b7a7d34ffc4e6a4291d7fa73692a1bd1a303a74270b11d1623b4f9868d19498f
DIST elfutils-0.179.tar.bz2 9057637 BLAKE2B b34f5af6d2a6613622f4d5da78b9ae10e60800fc91cb4607115fcaaf90c1c544460fb02e164f87e52951a446d6479909bbf3aa02b7db78b26af7863290de8848 SHA512 ff2d96ad1db08e3a2ddaa60bd5a05e9b61ffa71d646f889cebb6bef51322e874930809c6dd0a257ced8c6e8de4b59ecf13ca6741dc68f9400293208278a0c052
+DIST elfutils-0.180.tar.bz2 9079640 BLAKE2B bd7863b82a71d2932a23c9d125d5eb6485977a3256a8a0b25980183d33f7345c3d9fae78277de5c955eb0ceeb955f8fa71d209f4f39bcf6dd49e46a8bbd7efcf SHA512 62e96035ccfe8928baca2285decbe8b8703a2daa956df81ece18fecf643272fb68955806b3e807a514141a7a9bf44520bf09461672aa580bd6807485fb604d25
diff --git a/dev-libs/elfutils/elfutils-0.180.ebuild b/dev-libs/elfutils/elfutils-0.180.ebuild
new file mode 100644
index 000000000000..086304510f1c
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.180.ebuild
@@ -0,0 +1,86 @@
+# Copyright 2003-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic multilib-minimal
+
+DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
+HOMEPAGE="http://elfutils.org/"
+SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
+
+LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 lzma nls static-libs test +threads +utils valgrind"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}]
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] )
+ !dev-libs/libelf"
+DEPEND="${RDEPEND}
+ valgrind? ( dev-util/valgrind )
+"
+BDEPEND="nls? ( sys-devel/gettext )
+ >=sys-devel/flex-2.5.4a
+ sys-devel/m4"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.175-disable-biarch-test-PR24158.patch
+ "${FILESDIR}"/${PN}-0.177-disable-large.patch
+ "${FILESDIR}"/${PN}-0.180-PaX-support.patch
+ "${FILESDIR}"/${PN}-0.179-CC-in-tests.patch
+ "${FILESDIR}"/${PN}-0.180-readelf.patch
+)
+
+src_prepare() {
+ default
+
+ if ! use static-libs; then
+ sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die
+ fi
+ # https://sourceware.org/PR23914
+ sed -i 's:-Werror::' */Makefile.in || die
+}
+
+src_configure() {
+ use test && append-flags -g #407135
+
+ # Symbol aliases are implemented as asm statements.
+ # Will require porting: https://gcc.gnu.org/PR48200
+ filter-flags '-flto*'
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable nls) \
+ $(use_enable threads thread-safety) \
+ $(use_enable valgrind) \
+ --disable-debuginfod \
+ --program-prefix="eu-" \
+ --with-zlib \
+ $(use_with bzip2 bzlib) \
+ $(use_with lzma)
+}
+
+multilib_src_test() {
+ # CC is a workaround for tests using ${CC-gcc}
+ env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
+ LC_ALL="C" \
+ CC="$(gc-getCC)" \
+ emake check VERBOSE=1
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc NOTES
+ # These build quick, and are needed for most tests, so don't
+ # disable their building when the USE flag is disabled.
+ if ! use utils; then
+ rm -rf "${ED}"/usr/bin || die
+ fi
+}
diff --git a/dev-libs/elfutils/files/elfutils-0.180-PaX-support.patch b/dev-libs/elfutils/files/elfutils-0.180-PaX-support.patch
new file mode 100644
index 000000000000..2d44c757711a
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.180-PaX-support.patch
@@ -0,0 +1,26 @@
+Add support for PaX ELF markings
+
+Patch by Kevin F. Quinn <kevquinn@gentoo.org>
+
+http://bugs.gentoo.org/115100
+
+--- a/libelf/elf.h
++++ b/libelf/elf.h
+@@ -722,6 +722,7 @@ typedef struct
+ #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
+ #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
+ #define PT_GNU_PROPERTY 0x6474e553 /* GNU property */
++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
+ #define PT_LOSUNW 0x6ffffffa
+ #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
+ #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
+--- a/src/elflint.c
++++ b/src/elflint.c
+@@ -4493,6 +4493,7 @@ only executables, shared objects, and core files can have program headers\n"));
+
+ if (phdr->p_type >= PT_NUM && phdr->p_type != PT_GNU_EH_FRAME
+ && phdr->p_type != PT_GNU_STACK && phdr->p_type != PT_GNU_RELRO
++ && phdr->p_type != PT_PAX_FLAGS
+ && phdr->p_type != PT_GNU_PROPERTY
+ /* Check for a known machine-specific type. */
+ && ebl_segment_type_name (ebl, phdr->p_type, NULL, 0) == NULL)
diff --git a/dev-libs/elfutils/files/elfutils-0.180-readelf.patch b/dev-libs/elfutils/files/elfutils-0.180-readelf.patch
new file mode 100644
index 000000000000..a347d03041dc
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.180-readelf.patch
@@ -0,0 +1,23 @@
+Use tool-prefixed readelf.
+--- a/configure.ac
++++ b/configure.ac
+@@ -200,7 +200,7 @@ fi
+ # We really want build-ids. Warn and force generating them if gcc was
+ # configure without --enable-linker-build-id
+ AC_CACHE_CHECK([whether the compiler generates build-ids], ac_cv_buildid, [dnl
+-AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; readelf -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no],AC_MSG_FAILURE([unexpected compile failure]))])
++AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; $READELF -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no],AC_MSG_FAILURE([unexpected compile failure]))])
+ if test "$ac_cv_buildid" = "no"; then
+ AC_MSG_WARN([compiler doesn't generate build-id by default])
+ LDFLAGS="$LDFLAGS -Wl,--build-id"
+--- a/configure
++++ b/configure
+@@ -5343,7 +5343,7 @@ main ()
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_buildid=yes; readelf -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no
++ ac_cv_buildid=yes; $READELF -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}