Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
Date: Mon, 30 Mar 2020 23:42:40
Message-Id: 1585609764.e39aefc4054c64d74ff8ca6c30dc8f2d54a46ab3.slyfox@gentoo
1 commit: e39aefc4054c64d74ff8ca6c30dc8f2d54a46ab3
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 30 23:09:24 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 30 23:09:24 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e39aefc4
7
8 dev-libs/elfutils: bump up to 0.179
9
10 Package-Manager: Portage-2.3.96, Repoman-2.3.22
11 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
12
13 dev-libs/elfutils/Manifest | 1 +
14 dev-libs/elfutils/elfutils-0.179.ebuild | 77 ++++++++++++++++++++++
15 .../files/elfutils-0.179-PaX-support.patch | 26 ++++++++
16 3 files changed, 104 insertions(+)
17
18 diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest
19 index d86f09cabcf..eb04759218f 100644
20 --- a/dev-libs/elfutils/Manifest
21 +++ b/dev-libs/elfutils/Manifest
22 @@ -1,2 +1,3 @@
23 DIST elfutils-0.177.tar.bz2 8852413 BLAKE2B 03f432342651f7646d73b7847325bd14b722ce34d85df01b1ad072b916af9b9da2d0d119cd24e952073bd584ec76b027ba9b6c7d45fb057372b3e700b1f5741a SHA512 2779987463a22ed220759e25a09c9a1eb84c0f36db37675136e59aa55c7f8f90b7a7d34ffc4e6a4291d7fa73692a1bd1a303a74270b11d1623b4f9868d19498f
24 DIST elfutils-0.178.tar.bz2 9007557 BLAKE2B 241b611dbfac37f35a670fbe80096c21b870e4b26fcddc8af26fba0373c9cd72eae42aabae2803b7b16c3bf649aeda036b1ea1b40952b43c4021ed23fcb51e80 SHA512 356656ad0db8f6877b461de1a11280de16a9cc5d8dde4381a938a212e828e32755135e5e3171d311c4c9297b728fbd98123048e2e8fbf7fe7de68976a2daabe5
25 +DIST elfutils-0.179.tar.bz2 9057637 BLAKE2B b34f5af6d2a6613622f4d5da78b9ae10e60800fc91cb4607115fcaaf90c1c544460fb02e164f87e52951a446d6479909bbf3aa02b7db78b26af7863290de8848 SHA512 ff2d96ad1db08e3a2ddaa60bd5a05e9b61ffa71d646f889cebb6bef51322e874930809c6dd0a257ced8c6e8de4b59ecf13ca6741dc68f9400293208278a0c052
26
27 diff --git a/dev-libs/elfutils/elfutils-0.179.ebuild b/dev-libs/elfutils/elfutils-0.179.ebuild
28 new file mode 100644
29 index 00000000000..bf24e85f61a
30 --- /dev/null
31 +++ b/dev-libs/elfutils/elfutils-0.179.ebuild
32 @@ -0,0 +1,77 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit flag-o-matic multilib-minimal
39 +
40 +DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
41 +HOMEPAGE="http://elfutils.org/"
42 +SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
43 +
44 +LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
45 +SLOT="0"
46 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
47 +IUSE="bzip2 lzma nls static-libs test +threads +utils valgrind"
48 +
49 +RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
50 + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
51 + lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
52 + !dev-libs/libelf"
53 +DEPEND="${RDEPEND}
54 + valgrind? ( dev-util/valgrind )
55 +"
56 +BDEPEND="nls? ( sys-devel/gettext )
57 + >=sys-devel/flex-2.5.4a
58 + sys-devel/m4"
59 +
60 +RESTRICT="!test? ( test )"
61 +
62 +PATCHES=(
63 + "${FILESDIR}"/${PN}-0.175-disable-biarch-test-PR24158.patch
64 + "${FILESDIR}"/${PN}-0.177-disable-large.patch
65 + "${FILESDIR}"/${PN}-0.179-PaX-support.patch
66 +)
67 +
68 +src_prepare() {
69 + default
70 +
71 + if ! use static-libs; then
72 + sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die
73 + fi
74 + # https://sourceware.org/PR23914
75 + sed -i 's:-Werror::' */Makefile.in || die
76 +}
77 +
78 +src_configure() {
79 + use test && append-flags -g #407135
80 + multilib-minimal_src_configure
81 +}
82 +
83 +multilib_src_configure() {
84 + ECONF_SOURCE="${S}" econf \
85 + $(use_enable nls) \
86 + $(use_enable threads thread-safety) \
87 + $(use_enable valgrind) \
88 + --disable-debuginfod \
89 + --program-prefix="eu-" \
90 + --with-zlib \
91 + $(use_with bzip2 bzlib) \
92 + $(use_with lzma)
93 +}
94 +
95 +multilib_src_test() {
96 + env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
97 + LC_ALL="C" \
98 + emake check VERBOSE=1
99 +}
100 +
101 +multilib_src_install_all() {
102 + einstalldocs
103 + dodoc NOTES
104 + # These build quick, and are needed for most tests, so don't
105 + # disable their building when the USE flag is disabled.
106 + if ! use utils; then
107 + rm -rf "${ED}"/usr/bin || die
108 + fi
109 +}
110
111 diff --git a/dev-libs/elfutils/files/elfutils-0.179-PaX-support.patch b/dev-libs/elfutils/files/elfutils-0.179-PaX-support.patch
112 new file mode 100644
113 index 00000000000..5246d1ad9fc
114 --- /dev/null
115 +++ b/dev-libs/elfutils/files/elfutils-0.179-PaX-support.patch
116 @@ -0,0 +1,26 @@
117 +Add support for PaX ELF markings
118 +
119 +Patch by Kevin F. Quinn <kevquinn@g.o>
120 +
121 +http://bugs.gentoo.org/115100
122 +
123 +--- a/libelf/elf.h
124 ++++ b/libelf/elf.h
125 +@@ -721,6 +721,7 @@ typedef struct
126 + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
127 + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
128 + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
129 ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
130 + #define PT_LOSUNW 0x6ffffffa
131 + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
132 + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
133 +--- a/src/elflint.c
134 ++++ b/src/elflint.c
135 +@@ -4493,6 +4493,7 @@ only executables, shared objects, and core files can have program headers\n"));
136 +
137 + if (phdr->p_type >= PT_NUM && phdr->p_type != PT_GNU_EH_FRAME
138 + && phdr->p_type != PT_GNU_STACK && phdr->p_type != PT_GNU_RELRO
139 ++ && phdr->p_type != PT_PAX_FLAGS
140 + && phdr->p_type != PT_GNU_PROPERTY
141 + /* Check for a known machine-specific type. */
142 + && ebl_segment_type_name (ebl, phdr->p_type, NULL, 0) == NULL)