public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2016-01-08 19:59 Mike Frysinger
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2016-01-08 19:59 UTC (permalink / raw
  To: gentoo-commits

commit:     db1c340e1cd2c809f8d72dc51a08f524dc086c04
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  8 18:42:05 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Jan  8 19:46:02 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db1c340e

dev-libs/elfutils: drop <0.163 versions

 dev-libs/elfutils/Manifest                         | 11 ----
 dev-libs/elfutils/elfutils-0.158.ebuild            | 73 ----------------------
 dev-libs/elfutils/elfutils-0.159.ebuild            | 72 ---------------------
 dev-libs/elfutils/elfutils-0.160.ebuild            | 72 ---------------------
 dev-libs/elfutils/elfutils-0.161.ebuild            | 73 ----------------------
 dev-libs/elfutils/elfutils-0.162.ebuild            | 72 ---------------------
 .../elfutils/files/elfutils-0.143-configure.patch  | 22 -------
 .../files/elfutils-0.148-bashifications.patch      | 23 -------
 .../files/elfutils-0.150-bashifications.patch      | 23 -------
 ...lfutils-0.158-tests-backtrace-native-core.patch | 46 --------------
 .../elfutils-0.161-libelf-dir-traversal.patch      | 51 ---------------
 11 files changed, 538 deletions(-)

diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest
index 8225c4d..95ab6b1 100644
--- a/dev-libs/elfutils/Manifest
+++ b/dev-libs/elfutils/Manifest
@@ -1,14 +1,3 @@
-DIST elfutils-0.158-portability.patch 61898 SHA256 edc5e367b90dc3b179439c1c56ac28b04e810b09952d76c51b2df7a2a3f44e78 SHA512 3710f5b9e43a7ae230d8f3b7058addc667e34841fcbb85e3e6e289851b5daf1d82d8f6e592cfa62be127588ae1e274f5b04499156dec3e9c5922f1a06a0e845b WHIRLPOOL 7bc95985ed12c8b356fb6a8d7f92fd0d6aa2d5a8aedb157f85b894199ebb0ae63b2d7baebe759489895bb9db2b552a84647add04f0c02168d9ebfd598ab8fd69
-DIST elfutils-0.158-robustify.patch 62790 SHA256 dde94387e6565803d7c8d5b4351e4224e0fdeccfb9ef4a2080f15fabf43fe8bf SHA512 cdafe50d93ca74a38e62728f52965a48b37ef6dc05ca949893381c917549e498a2b007580ceb5de81c7292d86fbb11fd62315001216c12baffc243e2e6fd1015 WHIRLPOOL b3d0440230e23d66fc4862083ca9a9b2f3d58619c8789d086e6c9933af5c27b9b1c55dd8fa714acd708757bdee0707041cf6c8b09b804d7c6a4932f77a2648e4
-DIST elfutils-0.158.tar.bz2 4931570 SHA256 be27af5c21352f53e010342bf1c68e0b9e18232dbf3adec7e2f9b41f6bbe397d SHA512 6f27c07ad2b146d2ff857ad596f0d9150b0a041b4667f9174880a7766250ba2e52103bed9c4295e005255b683346d33d82efcda8f18f66c343df2722ca5d2ca2 WHIRLPOOL ff0c2224f9a514b83995c6f5a628e1331887e3906d3678c237c551d5572371b5a4c8bcf705f8e1389bff02bdab257460b26d8cfd3b3de2cbbc84e3f5a55445ac
-DIST elfutils-0.159-portability.patch 63319 SHA256 aaaa91cc9101962cdef221b2901346921945bf6e8b7806dbf99c5c2d76dc3ae0 SHA512 043ef48ea0f2cec718d952d7137e16f34c47420b7d1788a9e1685b3543576f8d4a9f8565069709ab87a1b65d32204db01da4e0f08be51c5d8a5890c548369568 WHIRLPOOL e690f510ebe97562dbee233b146481b56fb589c7ed7e99eafd121c3990f084d6adb58fc4db0824518a84cd609a0a10a65f125697f51819b18dfcd3e691c1abd9
-DIST elfutils-0.159.tar.bz2 5469000 SHA256 fffaad1ba0c4ac5c8cee56dc195746e1f1e7197ba3eba7052ad5a3635ac1242e SHA512 c58d95c90685fb0b37f728c83e9d462be2fabe1dfb7b271b3adcde5f10c532a90b07bcc1c51dd81bf768f0cd3d22fa231fafb74fb5e79098d94a566e139408ff WHIRLPOOL 71cc156658af3ea8461c4cebcf27331a3844af470e337c18a7532fd795ea91eca035ecdc74fa71e92100bf2354b9e724490eae6305cd3ab418202938a4818684
-DIST elfutils-0.160-portability.patch 63302 SHA256 feb307acf472598ea7af4e4b439251613a8f5d81e804b4abf9aeca195a5d4254 SHA512 a408596fe114392034c7c6f42c4ef2e7a6bdeae346ad07c733eebe29c30d644984d775756b0395ab360c6107eab7d526cdcd0d4955eb8431cccf9ca8a278bca1 WHIRLPOOL cd415d959c8fdf16ea656de84c7e328bb98de1f9b98ba36bdafffca80a008c3673787843b876f6ddd37e1bc0d13283ed85548b5407c90120de164971cee6ae44
-DIST elfutils-0.160.tar.bz2 5391252 SHA256 741b556863c069ceab2d81eb54aeda8c34f46728859704eaf9baef8503e9a9d1 SHA512 2df392739ae05e1a9ad333a02cc13e088f39370e3d14482072384b0b5285d5ba73e35562cc6c99211272f36744e657081d6d18e16e8c8519e49a51ece9151330 WHIRLPOOL afafd0c2fd2672c7b0e9cb4cdd4fc710fa38c819b7f117673e99cace7931594f03a46085a87fb4e819243572abc52f695d37cc03522bb46cdc6498be9f209582
-DIST elfutils-0.161-portability.patch 63317 SHA256 bf0363d03e1e4668778eb4e7ddd10e405a22f753b3ad813a537fc01164d1e3fe SHA512 78a8a46b5eaf0326916b79f2502d8e66dabd2783c5661248482572b1528173c5e47f84868693ba58bbf015dfeb3f9897bfe72a778d22aa1b396e7da81b2512b5 WHIRLPOOL bdaa682d3c4113f0d54409afe4d22a0e56f0b28d8f1e69e2c0c16cd31cf12341df56259d3ab38e70b840dd449b2686e7823d4961b282b76de5dde8c458f4e97a
-DIST elfutils-0.161.tar.bz2 5524766 SHA256 570c91a1783fa5386aaa2dfdd08dda1de777c2b63bf3b9c1437d635ffdd7a070 SHA512 c5061faa01cb6f211c326574f10bd5eb4fe8437afb2581f26cf34e88053d7bd91dc47bae1c8bdd143c35cad055bf48eab1e03acf4069a8e8843643ecf2a198df WHIRLPOOL adf14b937b38fff1de0e0cd18a6866d4080ed6ee80fab73a45c1b94ffe546fe4c1662b090f6802a522c5103fb7826fac46c5e4ccfc8441f09025285722d08ede
-DIST elfutils-0.162-portability.patch 70906 SHA256 71cd52c43af31a9e445ed14e2f51e4aee32a00c1ffb251390c1a247cfc503d23 SHA512 8bd5647a169b9201dfc93f98a6580ebae34433180941b481248cb644f4991cb670f073d7ca63b203821a398ddd96558b069461aef83b8dd1a60aa154f15dccd1 WHIRLPOOL c31586f846e6cff511996c97015b479d0bc4b80577fb69df140f9cbae817a17ddcaca58a1a0e16ded6efc7f9ae3f570e74b87888a32b524ab9d7c5d3a02f7419
-DIST elfutils-0.162.tar.bz2 6021217 SHA256 526106bc6be898b3b3281a66b83d64993aa0ef1b55b0416766868ad53d0a1951 SHA512 5d62a84b509f638cb62175b332fdeaa68e04677893d5647fd944e5b5928fa4f0daf8f161dc64f7762dc736f74471c8d617cbc54464cf2e1f79141e937d3db4a9 WHIRLPOOL 2e8bee400f0209206373d716199835729f4d4da97116a4ec76a2dfe977e8a431601208655d576d66e6f1e4eb630dab004eedebabd58a03e4938b745f71daf35d
 DIST elfutils-0.163-portability.patch 72818 SHA256 e4e82315dad2efaa4e4476503e7537e01b7c1b1f98a96de4ca1c7fa85f4f1045 SHA512 c657da2c4a37e8dac6fe4b399ef72ff60b6780000721f0617fb1dc0a6d962cb1e609b8e72fa0dc5b2d50db8dd68dcd58096bf2e475f7c5461f1765a4ee4c0d2e WHIRLPOOL 0ff248e4767778351f46c91fd5f189d7d2cfee59ac2afdfd5fee659151b72e33d310440273da0ed6f5611f76f9ec651ff51acffcc0557a0ec111c50b819db091
 DIST elfutils-0.163.tar.bz2 6029307 SHA256 7c774f1eef329309f3b05e730bdac50013155d437518a2ec0e24871d312f2e23 SHA512 80cb37b965e85f6c6b51247f0cb07cde9d9071e7cdde4c028479a609e12dfb196e428fa8743586ce8a46d49dac74073b55bcb812ea6118471c0de07b3dd7f772 WHIRLPOOL 5e2b7881ec96438e0ecb583b77202ccdad6ae7b46f2dcc0b2869119642173bc5da5f26d51bf4464fc9c5c1951f14a4a11bf8dfc6906e6dfd551782c4c9f28cd8
 DIST elfutils-0.164.tar.bz2 6065265 SHA256 9683c025928a12d06b7fe812928aa6235249e22d197d086f7084606a48165900 SHA512 83e0bdf17fff2c480cf5f99fe9d733a8b4f7cde0f9a3eeb4e3c4b4bd221a306e0a03bfd99e097f0085a33bb8b9f73fda10e390e17d30c3f5a1344e781065efce WHIRLPOOL d1de8d928b64e170358343c8984762286d63745c8cbe1375b7cdf07566c44091dd078f5876106c6b829831e630fda9d8db5e28c5c871c98a70eb1cda58596705

diff --git a/dev-libs/elfutils/elfutils-0.158.ebuild b/dev-libs/elfutils/elfutils-0.158.ebuild
deleted file mode 100644
index b27769d..0000000
--- a/dev-libs/elfutils/elfutils-0.158.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-inherit eutils flag-o-matic multilib-minimal
-
-DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
-HOMEPAGE="https://fedorahosted.org/elfutils/"
-SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
-	https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-portability.patch -> ${P}-portability.patch
-	https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-robustify.patch -> ${P}-robustify.patch"
-
-LICENSE="GPL-2-with-exceptions"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
-IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
-
-# This pkg does not actually seem to compile currently in a uClibc
-# environment (xrealloc errs), but we need to ensure that glibc never
-# gets pulled in as a dep since this package does not respect virtual/libc
-RDEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
-	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
-	lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
-	!dev-libs/libelf
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20130224-r11
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)"
-DEPEND="${RDEPEND}
-	nls? ( sys-devel/gettext )
-	>=sys-devel/flex-2.5.4a
-	sys-devel/m4"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
-	epatch "${DISTDIR}"/${P}-{portability,robustify}.patch
-	epatch "${FILESDIR}"/${PN}-0.158-tests-backtrace-native-core.patch
-	use static-libs || sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in
-	# some patches touch both configure and configure.ac
-	find -type f -exec touch -r configure {} +
-}
-
-src_configure() {
-	use test && append-flags -g #407135
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	ECONF_SOURCE="${S}" econf \
-		--disable-werror \
-		$(use_enable nls) \
-		$(use_enable threads thread-safety) \
-		--program-prefix="eu-" \
-		$(use_with zlib) \
-		$(use_with bzip2 bzlib) \
-		$(use_with lzma)
-}
-
-multilib_src_test() {
-	env	LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
-		LC_ALL="C" \
-		emake check || die
-}
-
-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.
-	use utils || rm -rf "${ED}"/usr/bin
-}

diff --git a/dev-libs/elfutils/elfutils-0.159.ebuild b/dev-libs/elfutils/elfutils-0.159.ebuild
deleted file mode 100644
index 6ac8a28..0000000
--- a/dev-libs/elfutils/elfutils-0.159.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-inherit eutils flag-o-matic multilib-minimal
-
-DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
-HOMEPAGE="https://fedorahosted.org/elfutils/"
-SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
-	https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-portability.patch -> ${P}-portability.patch"
-
-LICENSE="GPL-2-with-exceptions"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
-IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
-
-# This pkg does not actually seem to compile currently in a uClibc
-# environment (xrealloc errs), but we need to ensure that glibc never
-# gets pulled in as a dep since this package does not respect virtual/libc
-RDEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
-	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
-	lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
-	!dev-libs/libelf
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20130224-r11
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)"
-DEPEND="${RDEPEND}
-	nls? ( sys-devel/gettext )
-	>=sys-devel/flex-2.5.4a
-	sys-devel/m4"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
-	epatch "${DISTDIR}"/${P}-portability.patch
-	use static-libs || sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in
-	sed -i 's:-Werror::' */Makefile.in
-	# some patches touch both configure and configure.ac
-	find -type f -exec touch -r configure {} +
-}
-
-src_configure() {
-	use test && append-flags -g #407135
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	ECONF_SOURCE="${S}" econf \
-		--disable-werror \
-		$(use_enable nls) \
-		$(use_enable threads thread-safety) \
-		--program-prefix="eu-" \
-		$(use_with zlib) \
-		$(use_with bzip2 bzlib) \
-		$(use_with lzma)
-}
-
-multilib_src_test() {
-	env	LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
-		LC_ALL="C" \
-		emake check || die
-}
-
-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.
-	use utils || rm -rf "${ED}"/usr/bin
-}

diff --git a/dev-libs/elfutils/elfutils-0.160.ebuild b/dev-libs/elfutils/elfutils-0.160.ebuild
deleted file mode 100644
index 6ac8a28..0000000
--- a/dev-libs/elfutils/elfutils-0.160.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-inherit eutils flag-o-matic multilib-minimal
-
-DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
-HOMEPAGE="https://fedorahosted.org/elfutils/"
-SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
-	https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-portability.patch -> ${P}-portability.patch"
-
-LICENSE="GPL-2-with-exceptions"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
-IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
-
-# This pkg does not actually seem to compile currently in a uClibc
-# environment (xrealloc errs), but we need to ensure that glibc never
-# gets pulled in as a dep since this package does not respect virtual/libc
-RDEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
-	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
-	lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
-	!dev-libs/libelf
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20130224-r11
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)"
-DEPEND="${RDEPEND}
-	nls? ( sys-devel/gettext )
-	>=sys-devel/flex-2.5.4a
-	sys-devel/m4"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
-	epatch "${DISTDIR}"/${P}-portability.patch
-	use static-libs || sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in
-	sed -i 's:-Werror::' */Makefile.in
-	# some patches touch both configure and configure.ac
-	find -type f -exec touch -r configure {} +
-}
-
-src_configure() {
-	use test && append-flags -g #407135
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	ECONF_SOURCE="${S}" econf \
-		--disable-werror \
-		$(use_enable nls) \
-		$(use_enable threads thread-safety) \
-		--program-prefix="eu-" \
-		$(use_with zlib) \
-		$(use_with bzip2 bzlib) \
-		$(use_with lzma)
-}
-
-multilib_src_test() {
-	env	LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
-		LC_ALL="C" \
-		emake check || die
-}
-
-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.
-	use utils || rm -rf "${ED}"/usr/bin
-}

diff --git a/dev-libs/elfutils/elfutils-0.161.ebuild b/dev-libs/elfutils/elfutils-0.161.ebuild
deleted file mode 100644
index 0b70488..0000000
--- a/dev-libs/elfutils/elfutils-0.161.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-inherit eutils flag-o-matic multilib-minimal
-
-DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
-HOMEPAGE="https://fedorahosted.org/elfutils/"
-SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
-	https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-portability-${PV}.patch -> ${P}-portability.patch"
-
-LICENSE="GPL-2-with-exceptions"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
-IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
-
-# This pkg does not actually seem to compile currently in a uClibc
-# environment (xrealloc errs), but we need to ensure that glibc never
-# gets pulled in as a dep since this package does not respect virtual/libc
-RDEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
-	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
-	lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
-	!dev-libs/libelf
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20130224-r11
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)"
-DEPEND="${RDEPEND}
-	nls? ( sys-devel/gettext )
-	>=sys-devel/flex-2.5.4a
-	sys-devel/m4"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
-	epatch "${DISTDIR}"/${P}-portability.patch
-	epatch "${FILESDIR}"/${P}-libelf-dir-traversal.patch #534000
-	use static-libs || sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in
-	sed -i 's:-Werror::' */Makefile.in
-	# some patches touch both configure and configure.ac
-	find -type f -exec touch -r configure {} +
-}
-
-src_configure() {
-	use test && append-flags -g #407135
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	ECONF_SOURCE="${S}" econf \
-		--disable-werror \
-		$(use_enable nls) \
-		$(use_enable threads thread-safety) \
-		--program-prefix="eu-" \
-		$(use_with zlib) \
-		$(use_with bzip2 bzlib) \
-		$(use_with lzma)
-}
-
-multilib_src_test() {
-	env	LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
-		LC_ALL="C" \
-		emake check || die
-}
-
-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.
-	use utils || rm -rf "${ED}"/usr/bin
-}

diff --git a/dev-libs/elfutils/elfutils-0.162.ebuild b/dev-libs/elfutils/elfutils-0.162.ebuild
deleted file mode 100644
index a2ae40f..0000000
--- a/dev-libs/elfutils/elfutils-0.162.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-inherit eutils flag-o-matic multilib-minimal
-
-DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
-HOMEPAGE="https://fedorahosted.org/elfutils/"
-SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
-	https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-portability-${PV}.patch -> ${P}-portability.patch"
-
-LICENSE="GPL-2-with-exceptions"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
-IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
-
-# This pkg does not actually seem to compile currently in a uClibc
-# environment (xrealloc errs), but we need to ensure that glibc never
-# gets pulled in as a dep since this package does not respect virtual/libc
-RDEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
-	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
-	lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
-	!dev-libs/libelf
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20130224-r11
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)"
-DEPEND="${RDEPEND}
-	nls? ( sys-devel/gettext )
-	>=sys-devel/flex-2.5.4a
-	sys-devel/m4"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
-	epatch "${DISTDIR}"/${P}-portability.patch
-	use static-libs || sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in
-	sed -i 's:-Werror::' */Makefile.in
-	# some patches touch both configure and configure.ac
-	find -type f -exec touch -r configure {} +
-}
-
-src_configure() {
-	use test && append-flags -g #407135
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	ECONF_SOURCE="${S}" econf \
-		--disable-werror \
-		$(use_enable nls) \
-		$(use_enable threads thread-safety) \
-		--program-prefix="eu-" \
-		$(use_with zlib) \
-		$(use_with bzip2 bzlib) \
-		$(use_with lzma)
-}
-
-multilib_src_test() {
-	env	LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
-		LC_ALL="C" \
-		emake check || die
-}
-
-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.
-	use utils || rm -rf "${ED}"/usr/bin
-}

diff --git a/dev-libs/elfutils/files/elfutils-0.143-configure.patch b/dev-libs/elfutils/files/elfutils-0.143-configure.patch
deleted file mode 100644
index 4c00cd8..0000000
--- a/dev-libs/elfutils/files/elfutils-0.143-configure.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-https://bugs.gentoo.org/287130
-
---- elfutils-0.143/configure
-+++ elfutils-0.143/configure
-@@ -5460,7 +5460,7 @@
- 
- # 1.234<whatever> -> 1234<whatever>
- case "$PACKAGE_VERSION" in
--[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
-+[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
- *)     	   { { $as_echo "$as_me:$LINENO: error: confused by version number '$PACKAGE_VERSION'" >&5
- $as_echo "$as_me: error: confused by version number '$PACKAGE_VERSION'" >&2;}
-    { (exit 1); exit 1; }; } ;;
-@@ -5495,7 +5495,7 @@
- esac
- 
- # Round up to the next release API (x.y) version.
--eu_version=$[($eu_version + 999) / 1000]
-+eu_version=`expr \( $eu_version + 999 \) / 1000`
- 
- cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure

diff --git a/dev-libs/elfutils/files/elfutils-0.148-bashifications.patch b/dev-libs/elfutils/files/elfutils-0.148-bashifications.patch
deleted file mode 100644
index 5cdf34f..0000000
--- a/dev-libs/elfutils/files/elfutils-0.148-bashifications.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Remove bashifications
-https://bugs.gentoo.org/287130
-
---- a/configure
-+++ b/configure
-@@ -4874,7 +4874,7 @@ ac_config_files="$ac_config_files version.h:config/version.h.in"
- 
- # 1.234<whatever> -> 1234<whatever>
- case "$PACKAGE_VERSION" in
--[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
-+[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
- *)     	   as_fn_error "confused by version number '$PACKAGE_VERSION'" "$LINENO" 5 ;;
- esac
- case "$eu_version" in
-@@ -4903,7 +4903,7 @@ case "$eu_version" in
- esac
- 
- # Round up to the next release API (x.y) version.
--eu_version=$[($eu_version + 999) / 1000]
-+eu_version=`expr \( $eu_version + 999 \) / 1000`
- 
- cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure

diff --git a/dev-libs/elfutils/files/elfutils-0.150-bashifications.patch b/dev-libs/elfutils/files/elfutils-0.150-bashifications.patch
deleted file mode 100644
index a2f2b85..0000000
--- a/dev-libs/elfutils/files/elfutils-0.150-bashifications.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Remove bashifications
-https://bugs.gentoo.org/287130
-
---- a/configure
-+++ b/configure
-@@ -4880,7 +4880,7 @@ ac_config_files="$ac_config_files version.h:config/version.h.in"
- 
- # 1.234<whatever> -> 1234<whatever>
- case "$PACKAGE_VERSION" in
--[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
-+[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
- *)     	   as_fn_error $? "confused by version number '$PACKAGE_VERSION'" "$LINENO" 5 ;;
- esac
- case "$eu_version" in
-@@ -4909,7 +4909,7 @@ case "$eu_version" in
- esac
- 
- # Round up to the next release API (x.y) version.
--eu_version=$[($eu_version + 999) / 1000]
-+eu_version=`expr \( $eu_version + 999 \) / 1000`
- 
- cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure

diff --git a/dev-libs/elfutils/files/elfutils-0.158-tests-backtrace-native-core.patch b/dev-libs/elfutils/files/elfutils-0.158-tests-backtrace-native-core.patch
deleted file mode 100644
index 213b06b..0000000
--- a/dev-libs/elfutils/files/elfutils-0.158-tests-backtrace-native-core.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-https://bugs.gentoo.org/497566
-
-From 435808a681cc375f0907f2066c4cc062173a6c7e Mon Sep 17 00:00:00 2001
-From: Jan Kratochvil <jan.kratochvil@redhat.com>
-Date: Sat, 18 Jan 2014 21:56:13 +0100
-Subject: [PATCH] Fix false FAILs on testsuite with ulimit -c unlimited.
-
-Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
----
- tests/ChangeLog         | 6 ++++++
- tests/backtrace-child.c | 8 +++++---
- 2 files changed, 11 insertions(+), 3 deletions(-)
-
-2014-01-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Fix false FAILs on testsuite with ulimit -c unlimited.
-	* backtrace-child.c (sigusr2): Call pthread_exit.
-	(main): Return, do not call abort.
-
-diff --git a/tests/backtrace-child.c b/tests/backtrace-child.c
-index 0db1258..512aa23 100644
---- a/tests/backtrace-child.c
-+++ b/tests/backtrace-child.c
-@@ -100,7 +100,10 @@ sigusr2 (int signo)
-   if (! gencore)
-     {
-       raise (SIGUSR1);
--      /* It should not be reached.  */
-+      /* Do not return as stack may be invalid due to ptrace-patched PC to the
-+	 jmp function.  */
-+      pthread_exit (NULL);
-+      /* Not reached.  */
-       abort ();
-     }
-   /* Here we dump the core for --gencore.  */
-@@ -218,6 +221,5 @@ main (int argc UNUSED, char **argv)
-     pthread_join (thread, NULL);
-   else
-     raise (SIGUSR2);
--  /* Not reached.  */
--  abort ();
-+  return 0;
- }
--- 
-1.8.5.3
-

diff --git a/dev-libs/elfutils/files/elfutils-0.161-libelf-dir-traversal.patch b/dev-libs/elfutils/files/elfutils-0.161-libelf-dir-traversal.patch
deleted file mode 100644
index 84a28c7..0000000
--- a/dev-libs/elfutils/files/elfutils-0.161-libelf-dir-traversal.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-https://bugs.gentoo.org/534000
-
-From 147018e729e7c22eeabf15b82d26e4bf68a0d18e Mon Sep 17 00:00:00 2001
-From: Alexander Cherepanov <cherepan@mccme.ru>
-Date: Sun, 28 Dec 2014 19:57:19 +0300
-Subject: [PATCH] libelf: Fix dir traversal vuln in ar extraction.
-
-read_long_names terminates names at the first '/' found but then skips
-one character without checking (it's supposed to be '\n'). Hence the
-next name could start with any character including '/'. This leads to
-a directory traversal vulnerability at the time the contents of the
-archive is extracted.
-
-The danger is mitigated by the fact that only one '/' is possible in a
-resulting filename and only in the leading position. Hence only files
-in the root directory can be written via this vuln and only when ar is
-executed as root.
-
-The fix for the vuln is to not skip any characters while looking
-for '/'.
-
-Signed-off-by: Alexander Cherepanov <cherepan@mccme.ru>
----
- libelf/ChangeLog   | 5 +++++
- libelf/elf_begin.c | 5 +----
- 2 files changed, 6 insertions(+), 4 deletions(-)
-
-2014-12-28  Alexander Cherepanov  <cherepan@mccme.ru>
-
-	* elf_begin.c (read_long_names): Don't miss '/' right after
-	another '/'. Fixes a dir traversal vuln in ar extraction.
-
-diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
-index 30abe0b..cd3756c 100644
---- a/libelf/elf_begin.c
-+++ b/libelf/elf_begin.c
-@@ -749,10 +749,7 @@ read_long_names (Elf *elf)
- 	    }
- 
- 	  /* NUL-terminate the string.  */
--	  *runp = '\0';
--
--	  /* Skip the NUL byte and the \012.  */
--	  runp += 2;
-+	  *runp++ = '\0';
- 
- 	  /* A sanity check.  Somebody might have generated invalid
- 	     archive.  */
--- 
-2.2.1
-


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2019-01-29 21:56 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2019-01-29 21:56 UTC (permalink / raw
  To: gentoo-commits

commit:     d21856c6b7ba9348121de36979d22d94fb0bfc16
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 29 21:55:33 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jan 29 21:56:18 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d21856c6

dev-libs/elfutils: fix parsing of partial core, bug #676794

Reported-by: Demetris Nakos
Bug: https://bugs.gentoo.org/676794
Bug: https://sourceware.org/PR24103
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 ...utils-0.175.ebuild => elfutils-0.173-r1.ebuild} | 10 ++++---
 ...utils-0.175.ebuild => elfutils-0.175-r1.ebuild} |  7 +++--
 .../files/elfutils-0.173-partial-core.patch        | 34 ++++++++++++++++++++++
 3 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/dev-libs/elfutils/elfutils-0.175.ebuild b/dev-libs/elfutils/elfutils-0.173-r1.ebuild
similarity index 92%
copy from dev-libs/elfutils/elfutils-0.175.ebuild
copy to dev-libs/elfutils/elfutils-0.173-r1.ebuild
index 39a57eb90c1..0b41180c4eb 100644
--- a/dev-libs/elfutils/elfutils-0.175.ebuild
+++ b/dev-libs/elfutils/elfutils-0.173-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=6
 
 inherit flag-o-matic multilib-minimal
 
@@ -23,7 +23,10 @@ DEPEND="${RDEPEND}
 	>=sys-devel/flex-2.5.4a
 	sys-devel/m4"
 
-PATCHES=("${FILESDIR}"/${PN}-0.118-PaX-support.patch)
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.118-PaX-support.patch
+	"${FILESDIR}"/${PN}-0.173-partial-core.patch
+)
 
 src_prepare() {
 	default
@@ -31,7 +34,6 @@ src_prepare() {
 	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
 }
 

diff --git a/dev-libs/elfutils/elfutils-0.175.ebuild b/dev-libs/elfutils/elfutils-0.175-r1.ebuild
similarity index 92%
rename from dev-libs/elfutils/elfutils-0.175.ebuild
rename to dev-libs/elfutils/elfutils-0.175-r1.ebuild
index 39a57eb90c1..ad1c1988b46 100644
--- a/dev-libs/elfutils/elfutils-0.175.ebuild
+++ b/dev-libs/elfutils/elfutils-0.175-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -23,7 +23,10 @@ DEPEND="${RDEPEND}
 	>=sys-devel/flex-2.5.4a
 	sys-devel/m4"
 
-PATCHES=("${FILESDIR}"/${PN}-0.118-PaX-support.patch)
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.118-PaX-support.patch
+	"${FILESDIR}"/${PN}-0.173-partial-core.patch
+)
 
 src_prepare() {
 	default

diff --git a/dev-libs/elfutils/files/elfutils-0.173-partial-core.patch b/dev-libs/elfutils/files/elfutils-0.173-partial-core.patch
new file mode 100644
index 00000000000..41ef14d6683
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.173-partial-core.patch
@@ -0,0 +1,34 @@
+https://sourceware.org/PR24103
+https://bugs.gentoo.org/676794
+
+From da5c5336a1eaf519de246f7d9f0f5585e1d4ac59 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Sun, 20 Jan 2019 23:05:56 +0100
+Subject: [PATCH] libdwfl: Sanity check partial core file dyn data read.
+
+When reading the dyn data from the core file check if we got everything,
+or just part of the data.
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=24103
+
+Signed-off-by: Mark Wielaard <mark@klomp.org>
+---
+ libdwfl/dwfl_segment_report_module.c | 6 ++++++
+
+--- a/libdwfl/dwfl_segment_report_module.c
++++ b/libdwfl/dwfl_segment_report_module.c
+@@ -783,6 +783,12 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name,
+   if (dyn_filesz != 0 && dyn_filesz % dyn_entsize == 0
+       && ! read_portion (&dyn_data, &dyn_data_size, dyn_vaddr, dyn_filesz))
+     {
++      /* dyn_data_size will be zero if we got everything from the initial
++         buffer, otherwise it will be the size of the new buffer that
++         could be read.  */
++      if (dyn_data_size != 0)
++	dyn_filesz = dyn_data_size;
++
+       void *dyns = malloc (dyn_filesz);
+       Elf32_Dyn (*d32)[dyn_filesz / sizeof (Elf32_Dyn)] = dyns;
+       Elf64_Dyn (*d64)[dyn_filesz / sizeof (Elf64_Dyn)] = dyns;
+-- 
+2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2019-02-02 23:40 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2019-02-02 23:40 UTC (permalink / raw
  To: gentoo-commits

commit:     8b8e22f6afc9bdb16bc13ed3997f0c1281a0792e
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  2 22:07:12 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Feb  2 23:40:00 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b8e22f6

dev-libs/elfutils: disable unstable biarch test

test fails on multilib system when elfutils is built for 32-bit ABI.

Bug: https://sourceware.org/PR24158
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-libs/elfutils/elfutils-0.175-r1.ebuild                       | 1 +
 .../files/elfutils-0.175-disable-biarch-test-PR24158.patch       | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/dev-libs/elfutils/elfutils-0.175-r1.ebuild b/dev-libs/elfutils/elfutils-0.175-r1.ebuild
index ad1c1988b46..458b215bbe7 100644
--- a/dev-libs/elfutils/elfutils-0.175-r1.ebuild
+++ b/dev-libs/elfutils/elfutils-0.175-r1.ebuild
@@ -26,6 +26,7 @@ DEPEND="${RDEPEND}
 PATCHES=(
 	"${FILESDIR}"/${PN}-0.118-PaX-support.patch
 	"${FILESDIR}"/${PN}-0.173-partial-core.patch
+	"${FILESDIR}"/${PN}-0.175-disable-biarch-test-PR24158.patch
 )
 
 src_prepare() {

diff --git a/dev-libs/elfutils/files/elfutils-0.175-disable-biarch-test-PR24158.patch b/dev-libs/elfutils/files/elfutils-0.175-disable-biarch-test-PR24158.patch
new file mode 100644
index 00000000000..809c3df1efa
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.175-disable-biarch-test-PR24158.patch
@@ -0,0 +1,9 @@
+https://sourceware.org/PR24158
+
+Tets fails when 32-bit elfutils tries to dump 64-bit process.
+--- a/tests/run-backtrace-native-biarch.sh
++++ b/tests/run-backtrace-native-biarch.sh
+@@ -17,2 +17,3 @@
+ 
++ELFUTILS_DISABLE_BIARCH=yes # https://sourceware.org/PR24158
+ if test -n "$ELFUTILS_DISABLE_BIARCH"; then


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2019-08-14 21:35 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2019-08-14 21:35 UTC (permalink / raw
  To: gentoo-commits

commit:     46104220f70097c1d76730600de243ae52e85682
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 14 21:34:36 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Aug 14 21:34:59 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46104220

dev-libs/elfutils: bump up to 0.177

Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-libs/elfutils/Manifest                         |  1 +
 dev-libs/elfutils/elfutils-0.177.ebuild            | 71 ++++++++++++++++++++++
 .../files/elfutils-0.177-disable-large.patch       | 14 +++++
 3 files changed, 86 insertions(+)

diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest
index b8b07d4c898..1e9d789772e 100644
--- a/dev-libs/elfutils/Manifest
+++ b/dev-libs/elfutils/Manifest
@@ -1 +1,2 @@
 DIST elfutils-0.176.tar.bz2 8646075 BLAKE2B 7f23d59b7f5d74946fea928a7fada7764c1f96a5eefefc4a3a382090eb7cad07c80419218300d853ccbef8f4e2288eb443ff06b3e64bf4511d9fa7aa84f5b794 SHA512 7f032913be363a43229ded85d495dcf7542b3c85974aaaba0d984228dc9ac1721da3dc388d3fa02325a80940161db7e9ad2c9e4521a424ad8a7d050c0902915b
+DIST elfutils-0.177.tar.bz2 8852413 BLAKE2B 03f432342651f7646d73b7847325bd14b722ce34d85df01b1ad072b916af9b9da2d0d119cd24e952073bd584ec76b027ba9b6c7d45fb057372b3e700b1f5741a SHA512 2779987463a22ed220759e25a09c9a1eb84c0f36db37675136e59aa55c7f8f90b7a7d34ffc4e6a4291d7fa73692a1bd1a303a74270b11d1623b4f9868d19498f

diff --git a/dev-libs/elfutils/elfutils-0.177.ebuild b/dev-libs/elfutils/elfutils-0.177.ebuild
new file mode 100644
index 00000000000..373a5ff08cd
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.177.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2019 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 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 lzma nls static-libs test +threads +utils"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+	lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+	!dev-libs/libelf"
+DEPEND="${RDEPEND}
+	nls? ( sys-devel/gettext )
+	>=sys-devel/flex-2.5.4a
+	sys-devel/m4"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.118-PaX-support.patch
+	"${FILESDIR}"/${PN}-0.175-disable-biarch-test-PR24158.patch
+	"${FILESDIR}"/${PN}-0.177-disable-large.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
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	ECONF_SOURCE="${S}" econf \
+		$(use_enable nls) \
+		$(use_enable threads thread-safety) \
+		--program-prefix="eu-" \
+		--with-zlib \
+		$(use_with bzip2 bzlib) \
+		$(use_with lzma)
+}
+
+multilib_src_test() {
+	env	LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
+		LC_ALL="C" \
+		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.177-disable-large.patch b/dev-libs/elfutils/files/elfutils-0.177-disable-large.patch
new file mode 100644
index 00000000000..78295851761
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.177-disable-large.patch
@@ -0,0 +1,14 @@
+getconf does not disable test on 64-kernel with CFLAGS=-m32
+--- a/tests/run-large-elf-file.sh
++++ b/tests/run-large-elf-file.sh
+@@ -19,6 +19,10 @@
+ 
+ # Only run on 64bit systems, 32bit systems don't support > 4GB
+ # ELF files.
++
++# this detection fails for 64-bit systems with -m32
++exit 77
++
+ long_bit=$(getconf LONG_BIT)
+ echo "long_bit: $long_bit"
+ if test $long_bit -ne 64; then


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2020-03-30 23:42 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-03-30 23:42 UTC (permalink / raw
  To: gentoo-commits

commit:     e39aefc4054c64d74ff8ca6c30dc8f2d54a46ab3
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 30 23:09:24 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Mar 30 23:09:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e39aefc4

dev-libs/elfutils: bump up to 0.179

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-libs/elfutils/Manifest                         |  1 +
 dev-libs/elfutils/elfutils-0.179.ebuild            | 77 ++++++++++++++++++++++
 .../files/elfutils-0.179-PaX-support.patch         | 26 ++++++++
 3 files changed, 104 insertions(+)

diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest
index d86f09cabcf..eb04759218f 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.178.tar.bz2 9007557 BLAKE2B 241b611dbfac37f35a670fbe80096c21b870e4b26fcddc8af26fba0373c9cd72eae42aabae2803b7b16c3bf649aeda036b1ea1b40952b43c4021ed23fcb51e80 SHA512 356656ad0db8f6877b461de1a11280de16a9cc5d8dde4381a938a212e828e32755135e5e3171d311c4c9297b728fbd98123048e2e8fbf7fe7de68976a2daabe5
+DIST elfutils-0.179.tar.bz2 9057637 BLAKE2B b34f5af6d2a6613622f4d5da78b9ae10e60800fc91cb4607115fcaaf90c1c544460fb02e164f87e52951a446d6479909bbf3aa02b7db78b26af7863290de8848 SHA512 ff2d96ad1db08e3a2ddaa60bd5a05e9b61ffa71d646f889cebb6bef51322e874930809c6dd0a257ced8c6e8de4b59ecf13ca6741dc68f9400293208278a0c052

diff --git a/dev-libs/elfutils/elfutils-0.179.ebuild b/dev-libs/elfutils/elfutils-0.179.ebuild
new file mode 100644
index 00000000000..bf24e85f61a
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.179.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-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[${MULTILIB_USEDEP}]
+	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+	lzma? ( >=app-arch/xz-utils-5.0.5-r1[${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.179-PaX-support.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
+	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() {
+	env	LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
+		LC_ALL="C" \
+		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.179-PaX-support.patch b/dev-libs/elfutils/files/elfutils-0.179-PaX-support.patch
new file mode 100644
index 00000000000..5246d1ad9fc
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.179-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
+@@ -721,6 +721,7 @@ typedef struct
+ #define PT_GNU_EH_FRAME	0x6474e550	/* GCC .eh_frame_hdr segment */
+ #define PT_GNU_STACK	0x6474e551	/* Indicates stack executability */
+ #define PT_GNU_RELRO	0x6474e552	/* Read-only after relocation */
++#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)


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2020-05-30 21:58 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2020-05-30 21:58 UTC (permalink / raw
  To: gentoo-commits

commit:     58357ad14a1f2f507e9e705cb8c2f9afbc706076
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat May 30 21:58:04 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat May 30 21:58:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58357ad1

dev-libs/elfutils: use $CC in tests consistently, bug #718872

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/718872
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-libs/elfutils/elfutils-0.179.ebuild            |  3 ++
 .../files/elfutils-0.179-CC-in-tests.patch         | 45 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/dev-libs/elfutils/elfutils-0.179.ebuild b/dev-libs/elfutils/elfutils-0.179.ebuild
index 5313453d1a0..70c6f757d6a 100644
--- a/dev-libs/elfutils/elfutils-0.179.ebuild
+++ b/dev-libs/elfutils/elfutils-0.179.ebuild
@@ -31,6 +31,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-0.175-disable-biarch-test-PR24158.patch
 	"${FILESDIR}"/${PN}-0.177-disable-large.patch
 	"${FILESDIR}"/${PN}-0.179-PaX-support.patch
+	"${FILESDIR}"/${PN}-0.179-CC-in-tests.patch
 )
 
 src_prepare() {
@@ -66,8 +67,10 @@ multilib_src_configure() {
 }
 
 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
 }
 

diff --git a/dev-libs/elfutils/files/elfutils-0.179-CC-in-tests.patch b/dev-libs/elfutils/files/elfutils-0.179-CC-in-tests.patch
new file mode 100644
index 00000000000..aa58862ec89
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.179-CC-in-tests.patch
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/718872
+--- a/tests/run-disasm-x86-64.sh
++++ b/tests/run-disasm-x86-64.sh
+@@ -22,7 +22,7 @@ case "`uname -m`" in
+   x86_64)
+     tempfiles testfile45.o
+     testfiles testfile45.S testfile45.expect
+-    gcc -m64 -c -o testfile45.o testfile45.S
++    ${CC-gcc} -m64 -c -o testfile45.o testfile45.S
+     testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect
+     ;;
+ esac
+--- a/tests/run-disasm-x86.sh
++++ b/tests/run-disasm-x86.sh
+@@ -22,7 +22,7 @@ case "`uname -m`" in
+   x86_64 | i?86 )
+     tempfiles testfile44.o
+     testfiles testfile44.S testfile44.expect
+-    gcc -m32 -c -o testfile44.o testfile44.S
++    ${CC-gcc} -m32 -c -o testfile44.o testfile44.S
+     testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect
+     ;;
+ esac
+--- a/tests/run-strip-g.sh
++++ b/tests/run-strip-g.sh
+@@ -25,7 +25,7 @@
+ tempfiles a.out strip.out debug.out readelf.out
+ 
+ echo Create debug a.out.
+-echo "int main() { return 1; }" | gcc -g -xc -
++echo "int main() { return 1; }" | ${CC-gcc} -g -xc -
+ 
+ echo strip -g to file with debug file
+ testrun ${abs_top_builddir}/src/strip -g -o strip.out -f debug.out ||
+--- a/tests/run-strip-nothing.sh
++++ b/tests/run-strip-nothing.sh
+@@ -23,7 +23,7 @@
+ tempfiles a.out strip.out debug.out
+ 
+ # Create no-debug a.out.
+-echo "int main() { return 1; }" | gcc -s -xc -
++echo "int main() { return 1; }" | ${CC-gcc} -s -xc -
+ 
+ # strip to file
+ testrun ${abs_top_builddir}/src/strip -g -o strip.out ||


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2021-06-06 20:37 Sergei Trofimovich
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Trofimovich @ 2021-06-06 20:37 UTC (permalink / raw
  To: gentoo-commits

commit:     1933ad5420dada4392022b5571f631f0a5bb21a4
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  6 20:37:31 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jun  6 20:37:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1933ad54

dev-libs/elfutils: tweak inline annotation

Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/794601
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-libs/elfutils/elfutils-0.185.ebuild                    |  1 +
 dev-libs/elfutils/files/elfutils-0.185-static-inline.patch | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/dev-libs/elfutils/elfutils-0.185.ebuild b/dev-libs/elfutils/elfutils-0.185.ebuild
index 5860b8abf50..38edee45ed9 100644
--- a/dev-libs/elfutils/elfutils-0.185.ebuild
+++ b/dev-libs/elfutils/elfutils-0.185.ebuild
@@ -33,6 +33,7 @@ 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.185-static-inline.patch
 )
 
 src_prepare() {

diff --git a/dev-libs/elfutils/files/elfutils-0.185-static-inline.patch b/dev-libs/elfutils/files/elfutils-0.185-static-inline.patch
new file mode 100644
index 00000000000..ec1aaf47a33
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.185-static-inline.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/794601
+--- a/src/elflint.c
++++ b/src/elflint.c
+@@ -3434,7 +3434,7 @@ buffer_pos (Elf_Data *data, const unsigned char *p)
+   return p - (const unsigned char *) data->d_buf;
+ }
+ 
+-inline size_t
++static inline size_t
+ buffer_left (Elf_Data *data, const unsigned char *p)
+ {
+   return (const unsigned char *) data->d_buf + data->d_size - p;


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2021-09-08  3:08 Sam James
  0 siblings, 0 replies; 12+ messages in thread
From: Sam James @ 2021-09-08  3:08 UTC (permalink / raw
  To: gentoo-commits

commit:     388d62376b0d53e78d347ab890e2b8742aea2e23
Author:     Adrian Ratiu <adrian.ratiu <AT> collabora <DOT> com>
AuthorDate: Tue Aug 31 18:32:41 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep  8 03:08:40 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=388d6237

dev-libs/elfutils: backport patches fixing clang build

Latest elfutils mainline development branch contains the
last two patches required for building elfutils with clang.

This backports the two patches onto v0.185 so we can get
it built with clang and should be dropped when Gentoo
eventually upgrades to v0.186 or later.

Signed-off-by: Adrian Ratiu <adrian.ratiu <AT> collabora.com>
Closes: https://github.com/gentoo/gentoo/pull/22173
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/elfutils/elfutils-0.185.ebuild            |   2 +
 ....ac-rework-gnu99-ext-check-to-allow-clang.patch | 146 +++++++++++++++++++++
 ...utils-0.185-pull-advance_pc-in-file-scope.patch |  70 ++++++++++
 3 files changed, 218 insertions(+)

diff --git a/dev-libs/elfutils/elfutils-0.185.ebuild b/dev-libs/elfutils/elfutils-0.185.ebuild
index a4f1cc56536..fd5ccd26159 100644
--- a/dev-libs/elfutils/elfutils-0.185.ebuild
+++ b/dev-libs/elfutils/elfutils-0.185.ebuild
@@ -34,6 +34,8 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-0.177-disable-large.patch
 	"${FILESDIR}"/${PN}-0.180-PaX-support.patch
 	"${FILESDIR}"/${PN}-0.185-static-inline.patch
+	"${FILESDIR}"/${PN}-0.185-pull-advance_pc-in-file-scope.patch
+	"${FILESDIR}"/${PN}-0.185-configure.ac-rework-gnu99-ext-check-to-allow-clang.patch
 )
 
 src_prepare() {

diff --git a/dev-libs/elfutils/files/elfutils-0.185-configure.ac-rework-gnu99-ext-check-to-allow-clang.patch b/dev-libs/elfutils/files/elfutils-0.185-configure.ac-rework-gnu99-ext-check-to-allow-clang.patch
new file mode 100644
index 00000000000..fe0b111ca85
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.185-configure.ac-rework-gnu99-ext-check-to-allow-clang.patch
@@ -0,0 +1,146 @@
+From c9ff5c53c319f963cac34a41c86cd43edf902459 Mon Sep 17 00:00:00 2001
+From: Adrian Ratiu <adrian.ratiu@collabora.com>
+Date: Mon, 30 Aug 2021 18:43:13 +0300
+Subject: [PATCH] configure.ac: rework gnu99 ext check to allow clang
+
+It is true that Clang does not support all gnu99 extensions [1],
+but not all of them are used in the codebase and over time there
+have been code cleanup efforts to improve Clang support.
+
+For example after commit 779c57ea ("readelf: Pull advance_pc()
+in file scope") there are no more nested function declarations
+and elfutils now builds fine with Clang.
+
+So in the interest of enabling Clang builds we remove the only
+remaining blocker: the configure checks for nested functions and
+variable length arrays which are also unused.
+
+Considering mixed decls and code is also part of c99 standard,
+the entire check becomes redundant and we can just replace
+AC_PROG_CC -> AC_PROG_CC_C99.
+
+Upstream-Status: Backport [master commit 6eb991a9]
+
+[1] https://sourceware.org/bugzilla/show_bug.cgi?id=24964
+[Adrian: backported to v0.185]
+Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
+---
+ configure    | 48 ------------------------------------------------
+ configure.ac | 35 +----------------------------------
+ 2 files changed, 1 insertion(+), 82 deletions(-)
+
+diff --git a/configure b/configure
+index 4ea75ee..22bda6c 100755
+--- a/configure
++++ b/configure
+@@ -5162,54 +5162,6 @@ else
+ fi
+ 
+ 
+-# We use -std=gnu99 but have explicit checks for some language constructs
+-# and GNU extensions since some compilers claim GNU99 support, but don't
+-# really support all language extensions. In particular we need
+-# Mixed Declarations and Code
+-# https://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html
+-# Nested Functions
+-# https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html
+-# Arrays of Variable Length
+-# https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc with GNU99 support" >&5
+-$as_echo_n "checking for gcc with GNU99 support... " >&6; }
+-if ${ac_cv_c99+:} false; then :
+-  $as_echo_n "(cached) " >&6
+-else
+-  old_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS -std=gnu99"
+-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h.  */
+-int foo (int a)
+-{
+-  for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s;
+-}
+-
+-double bar (double a, double b)
+-{
+-  double square (double z) { return z * z; }
+-  return square (a) + square (b);
+-}
+-
+-void baz (int n)
+-{
+-  struct S { int x[n]; };
+-}
+-_ACEOF
+-if ac_fn_c_try_compile "$LINENO"; then :
+-  ac_cv_c99=yes
+-else
+-  ac_cv_c99=no
+-fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-CFLAGS="$old_CFLAGS"
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c99" >&5
+-$as_echo "$ac_cv_c99" >&6; }
+-if test "x$ac_cv_c99" != xyes; then :
+-  as_fn_error $? "gcc with GNU99 support required" "$LINENO" 5
+-fi
+-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports __attribute__((visibility()))" >&5
+ $as_echo_n "checking whether gcc supports __attribute__((visibility()))... " >&6; }
+ if ${ac_cv_visibility+:} false; then :
+diff --git a/configure.ac b/configure.ac
+index b348a71..6298547 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -87,7 +87,7 @@ AS_IF([test "$use_locks" = yes],
+ 
+ AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
+ 
+-AC_PROG_CC
++AC_PROG_CC_C99
+ AC_PROG_RANLIB
+ AC_PROG_YACC
+ AM_PROG_LEX
+@@ -96,39 +96,6 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+ AC_CHECK_TOOL([READELF], [readelf])
+ AC_CHECK_TOOL([NM], [nm])
+ 
+-# We use -std=gnu99 but have explicit checks for some language constructs
+-# and GNU extensions since some compilers claim GNU99 support, but don't
+-# really support all language extensions. In particular we need
+-# Mixed Declarations and Code
+-# https://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html
+-# Nested Functions
+-# https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html
+-# Arrays of Variable Length
+-# https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html
+-AC_CACHE_CHECK([for gcc with GNU99 support], ac_cv_c99, [dnl
+-old_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS -std=gnu99"
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl
+-int foo (int a)
+-{
+-  for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s;
+-}
+-
+-double bar (double a, double b)
+-{
+-  double square (double z) { return z * z; }
+-  return square (a) + square (b);
+-}
+-
+-void baz (int n)
+-{
+-  struct S { int x[[n]]; };
+-}])],
+-		  ac_cv_c99=yes, ac_cv_c99=no)
+-CFLAGS="$old_CFLAGS"])
+-AS_IF([test "x$ac_cv_c99" != xyes],
+-      AC_MSG_ERROR([gcc with GNU99 support required]))
+-
+ AC_CACHE_CHECK([whether gcc supports __attribute__((visibility()))],
+ 	ac_cv_visibility, [dnl
+ save_CFLAGS="$CFLAGS"
+-- 
+2.33.0
+

diff --git a/dev-libs/elfutils/files/elfutils-0.185-pull-advance_pc-in-file-scope.patch b/dev-libs/elfutils/files/elfutils-0.185-pull-advance_pc-in-file-scope.patch
new file mode 100644
index 00000000000..e0678c9ba73
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.185-pull-advance_pc-in-file-scope.patch
@@ -0,0 +1,70 @@
+From 779c57ea864d104bad88455535df9b26336349fd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder@redhat.com>
+Date: Thu, 18 Mar 2021 10:25:24 +0100
+Subject: [PATCH] readelf: Pull advance_pc() in file scope
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Make advance_pc() a static function so we can get rid of another nested
+function. Rename it to run_advance_pc() and use a local advance_pc()
+macro to pass all the local variables. This is similar to what the
+equivalent code in libdw/dwarf_getsrclines.c is doing.
+
+Upstream-Status: Backport [master commit 779c57ea]
+
+Signed-off-by: Timm Bäder <tbaeder@redhat.com>
+[Adrian: backported to v0.185]
+Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
+---
+ src/ChangeLog |  7 +++++++
+ src/readelf.c | 26 +++++++++++++++++++-------
+ 2 files changed, 26 insertions(+), 7 deletions(-)
+
+diff --git a/src/readelf.c b/src/readelf.c
+index 161d7e65..8191bde2 100644
+--- a/src/readelf.c
++++ b/src/readelf.c
+@@ -8373,6 +8373,23 @@ print_form_data (Dwarf *dbg, int form, const unsigned char *readp,
+   return readp;
+ }
+ 
++/* Only used via run_advance_pc() macro */
++static inline void
++run_advance_pc (unsigned int op_advance,
++                unsigned int minimum_instr_len,
++                unsigned int max_ops_per_instr,
++                unsigned int *op_addr_advance,
++                Dwarf_Word *address,
++                unsigned int *op_index)
++{
++  const unsigned int advanced_op_index = (*op_index) + op_advance;
++
++  *op_addr_advance = minimum_instr_len * (advanced_op_index
++                                         / max_ops_per_instr);
++  *address = *address + *op_addr_advance;
++  *op_index = advanced_op_index % max_ops_per_instr;
++}
++
+ static void
+ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
+ 			  Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg)
+@@ -8763,13 +8780,8 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
+       /* Apply the "operation advance" from a special opcode
+ 	 or DW_LNS_advance_pc (as per DWARF4 6.2.5.1).  */
+       unsigned int op_addr_advance;
+-      inline void advance_pc (unsigned int op_advance)
+-      {
+-	op_addr_advance = minimum_instr_len * ((op_index + op_advance)
+-					       / max_ops_per_instr);
+-	address += op_addr_advance;
+-	op_index = (op_index + op_advance) % max_ops_per_instr;
+-      }
++#define advance_pc(op_advance) run_advance_pc(op_advance, minimum_instr_len, \
++                      max_ops_per_instr, &op_addr_advance, &address, &op_index)
+ 
+       if (max_ops_per_instr == 0)
+ 	{
+-- 
+2.32.0
+


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2021-10-25  5:02 Sam James
  0 siblings, 0 replies; 12+ messages in thread
From: Sam James @ 2021-10-25  5:02 UTC (permalink / raw
  To: gentoo-commits

commit:     8a4f3bfafba7104d92d94a25913e3068599e1df7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 25 04:58:28 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 25 05:01:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a4f3bfa

dev-libs/elfutils: backport glibc-2.34 test failure patch

Closes: https://bugs.gentoo.org/808765
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/elfutils/elfutils-0.185.ebuild            |   1 +
 .../elfutils-0.185-glibc-2.34-test-failure.patch   | 124 +++++++++++++++++++++
 2 files changed, 125 insertions(+)

diff --git a/dev-libs/elfutils/elfutils-0.185.ebuild b/dev-libs/elfutils/elfutils-0.185.ebuild
index fd5ccd26159..a73fbfc0492 100644
--- a/dev-libs/elfutils/elfutils-0.185.ebuild
+++ b/dev-libs/elfutils/elfutils-0.185.ebuild
@@ -36,6 +36,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-0.185-static-inline.patch
 	"${FILESDIR}"/${PN}-0.185-pull-advance_pc-in-file-scope.patch
 	"${FILESDIR}"/${PN}-0.185-configure.ac-rework-gnu99-ext-check-to-allow-clang.patch
+	"${FILESDIR}"/${PN}-0.185-glibc-2.34-test-failure.patch
 )
 
 src_prepare() {

diff --git a/dev-libs/elfutils/files/elfutils-0.185-glibc-2.34-test-failure.patch b/dev-libs/elfutils/files/elfutils-0.185-glibc-2.34-test-failure.patch
new file mode 100644
index 00000000000..134e642ab0e
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.185-glibc-2.34-test-failure.patch
@@ -0,0 +1,124 @@
+https://sourceware.org/git/?p=elfutils.git;a=commit;h=9aee0992d6e6ec4cce2c015d8da4b61022c6f6dd
+
+Author: Mark Wielaard <mark@klomp.org>
+Date:   Wed Aug 4 21:01:27 2021 +0200
+
+    tests: Allow an extra pthread_kill frame in backtrace tests
+    
+    glibc 2.34 calls pthread_kill from the raise function. Before raise
+    directly called the (tg)kill syscall. So allow pthread_kill to be the
+    first frame in a backtrace where raise is expected. Also change some
+    asserts to fprintf plus abort to make it more clear why the testcase
+    fails.
+    
+    https://sourceware.org/bugzilla/show_bug.cgi?id=28190
+    
+    Signed-off-by: Mark Wielaard <mark@klomp.org>
+
+--- a/tests/backtrace.c
++++ b/tests/backtrace.c
+@@ -97,6 +97,9 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
+   static bool reduce_frameno = false;
+   if (reduce_frameno)
+     frameno--;
++  static bool pthread_kill_seen = false;
++  if (pthread_kill_seen)
++    frameno--;
+   if (! use_raise_jmp_patching && frameno >= 2)
+     frameno += 2;
+   const char *symname2 = NULL;
+@@ -107,11 +110,26 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
+ 	       && (strcmp (symname, "__kernel_vsyscall") == 0
+ 		   || strcmp (symname, "__libc_do_syscall") == 0))
+ 	reduce_frameno = true;
++      else if (! pthread_kill_seen && symname
++	       && strstr (symname, "pthread_kill") != NULL)
++	pthread_kill_seen = true;
+       else
+-	assert (symname && strcmp (symname, "raise") == 0);
++	{
++	  if (!symname || strcmp (symname, "raise") != 0)
++	    {
++	      fprintf (stderr,
++		       "case 0: expected symname 'raise' got '%s'\n", symname);
++	      abort ();
++	    }
++	}
+       break;
+     case 1:
+-      assert (symname != NULL && strcmp (symname, "sigusr2") == 0);
++      if (symname == NULL || strcmp (symname, "sigusr2") != 0)
++	{
++	  fprintf (stderr,
++		   "case 1: expected symname 'sigusr2' got '%s'\n", symname);
++	  abort ();
++	}
+       break;
+     case 2: // x86_64 only
+       /* __restore_rt - glibc maybe does not have to have this symbol.  */
+@@ -120,11 +138,21 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
+       if (use_raise_jmp_patching)
+ 	{
+ 	  /* Verify we trapped on the very first instruction of jmp.  */
+-	  assert (symname != NULL && strcmp (symname, "jmp") == 0);
++	  if (symname == NULL || strcmp (symname, "jmp") != 0)
++	    {
++	      fprintf (stderr,
++		       "case 3: expected symname 'raise' got '%s'\n", symname);
++	      abort ();
++	    }
+ 	  mod = dwfl_addrmodule (dwfl, pc - 1);
+ 	  if (mod)
+ 	    symname2 = dwfl_module_addrname (mod, pc - 1);
+-	  assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
++	  if (symname2 == NULL || strcmp (symname2, "jmp") != 0)
++	    {
++	      fprintf (stderr,
++		       "case 3: expected symname2 'jmp' got '%s'\n", symname2);
++	      abort ();
++	    }
+ 	  break;
+ 	}
+       FALLTHROUGH;
+@@ -137,11 +165,22 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
+ 	  duplicate_sigusr2 = true;
+ 	  break;
+ 	}
+-      assert (symname != NULL && strcmp (symname, "stdarg") == 0);
++      if (symname == NULL || strcmp (symname, "stdarg") != 0)
++	{
++	  fprintf (stderr,
++		   "case 4: expected symname 'stdarg' got '%s'\n", symname);
++	  abort ();
++	}
+       break;
+     case 5:
+       /* Verify we trapped on the very last instruction of child.  */
+-      assert (symname != NULL && strcmp (symname, "backtracegen") == 0);
++      if (symname == NULL || strcmp (symname, "backtracegen") != 0)
++	{
++	  fprintf (stderr,
++		   "case 5: expected symname 'backtracegen' got '%s'\n",
++		   symname);
++	  abort ();
++	}
+       mod = dwfl_addrmodule (dwfl, pc);
+       if (mod)
+ 	symname2 = dwfl_module_addrname (mod, pc);
+@@ -151,7 +190,15 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
+       // instructions or even inserts some padding instructions at the end
+       // (which apparently happens on ppc64).
+       if (use_raise_jmp_patching)
+-        assert (symname2 == NULL || strcmp (symname2, "backtracegen") != 0);
++	{
++          if (symname2 != NULL && strcmp (symname2, "backtracegen") == 0)
++	    {
++	      fprintf (stderr,
++		       "use_raise_jmp_patching didn't expect symname2 "
++		       "'backtracegen'\n");
++	      abort ();
++	    }
++	}
+       break;
+   }
+ }


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2023-07-20  0:08 Sam James
  0 siblings, 0 replies; 12+ messages in thread
From: Sam James @ 2023-07-20  0:08 UTC (permalink / raw
  To: gentoo-commits

commit:     c7245f6d8e9fd787dd859cbb39930e5a1288ef3a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 19 23:35:31 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jul 19 23:55:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7245f6d

dev-libs/elfutils: drop stale patches, fix tests w/ mawk

Thank you again to mjw for pointing this out!

Drop two stale patches:
- elfutils-0.177-disable-large.patch: see https://sourceware.org/bugzilla/show_bug.cgi?id=24158#c3.
- elfutils-0.175-disable-biarch-test-PR24158.patch: see https://sourceware.org/bugzilla/show_bug.cgi?id=28975.

Add two test patches:
- elfutils-0.189-skip-DT_RELR-failing-tests.patch
- elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch

Import musl patches to files/ so all of them are in the same place (there's
no longer a huge musl patch for error.h so this is fine):
- elfutils-0.189-musl-aarch64-regs.patch
- elfutils-0.189-musl-macros.patch

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/elfutils/elfutils-0.189-r3.ebuild         | 124 +++++++++++++++++++++
 .../files/elfutils-0.189-PaX-support.patch         |  26 +++++
 .../files/elfutils-0.189-musl-aarch64-regs.patch   |  57 ++++++++++
 .../files/elfutils-0.189-musl-macros.patch         |  86 ++++++++++++++
 ...elfutils-0.189-skip-DT_RELR-failing-tests.patch |  39 +++++++
 ...0.189-tests-run-lfs-symbols.sh-needs-gawk.patch |  41 +++++++
 6 files changed, 373 insertions(+)

diff --git a/dev-libs/elfutils/elfutils-0.189-r3.ebuild b/dev-libs/elfutils/elfutils-0.189-r3.ebuild
new file mode 100644
index 000000000000..51765e378976
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.189-r3.ebuild
@@ -0,0 +1,124 @@
+# Copyright 2003-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/elfutils.gpg
+inherit autotools flag-o-matic multilib-minimal verify-sig
+
+DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
+HOMEPAGE="https://sourceware.org/elfutils/"
+SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
+SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.sig )"
+
+LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 debuginfod lzma nls static-libs test +utils zstd"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	!dev-libs/libelf
+	>=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}]
+	bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] )
+	debuginfod? (
+		app-arch/libarchive:=
+		dev-db/sqlite:3=
+		net-libs/libmicrohttpd:=
+
+		net-misc/curl[static-libs?,${MULTILIB_USEDEP}]
+	)
+	lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] )
+	zstd? ( app-arch/zstd:=[static-libs?,${MULTILIB_USEDEP}] )
+	elibc_musl? (
+		dev-libs/libbsd
+		sys-libs/argp-standalone
+		sys-libs/fts-standalone
+		sys-libs/obstack-standalone
+	)
+"
+DEPEND="
+	${RDEPEND}
+"
+BDEPEND="
+	>=sys-devel/flex-2.5.4a
+	sys-devel/m4
+	nls? ( sys-devel/gettext )
+	verify-sig? ( sec-keys/openpgp-keys-elfutils )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.189-PaX-support.patch
+	"${FILESDIR}"/${PN}-0.189-skip-DT_RELR-failing-tests.patch
+	"${FILESDIR}"/${PN}-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch
+	"${FILESDIR}"/${PN}-0.189-musl-aarch64-regs.patch
+	"${FILESDIR}"/${PN}-0.189-musl-macros.patch
+	"${FILESDIR}"/${P}-configure-bashisms.patch
+	"${FILESDIR}"/${P}-clang16-tests.patch
+)
+
+src_prepare() {
+	default
+
+	# Only here for ${P}-configure-bashisms.patch, delete on next bump!
+	eautoreconf
+
+	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() {
+	# bug #407135
+	use test && append-flags -g
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local myeconfargs=(
+		$(use_enable nls)
+		$(multilib_native_use_enable debuginfod)
+		$(use_enable debuginfod libdebuginfod)
+
+		# explicitly disable thread safety, it's not recommended by upstream
+		# doesn't build either on musl.
+		--disable-thread-safety
+
+		# Valgrind option is just for running tests under it; dodgy under sandbox
+		# and indeed even w/ glibc with newer instructions.
+		--disable-valgrind
+		--program-prefix="eu-"
+		--with-zlib
+		$(use_with bzip2 bzlib)
+		$(use_with lzma)
+		$(use_with zstd)
+	)
+
+	# Needed because sets alignment macro
+	is-flagq -fsanitize=address && myeconfargs+=( --enable-sanitize-address )
+	is-flagq -fsanitize=undefined && myeconfargs+=( --enable-sanitize-undefined )
+
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+	env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
+		LC_ALL="C" \
+		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.189-PaX-support.patch b/dev-libs/elfutils/files/elfutils-0.189-PaX-support.patch
new file mode 100644
index 000000000000..2d44c757711a
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.189-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.189-musl-aarch64-regs.patch b/dev-libs/elfutils/files/elfutils-0.189-musl-aarch64-regs.patch
new file mode 100644
index 000000000000..222c0527b689
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.189-musl-aarch64-regs.patch
@@ -0,0 +1,57 @@
+https://www.sourceware.org/bugzilla/show_bug.cgi?id=25832
+https://cgit.openembedded.org/openembedded-core/plain/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch
+https://bugs.gentoo.org/693772
+
+Other variants/links:
+https://git.alpinelinux.org/aports/tree/main/elfutils/fix-aarch64_fregs.patch
+https://github.com/gentoo/musl/blob/6450482b9b4463b57ac249c63b7ed796e9874c40/dev-libs/elfutils/files/0.178/fix-aarch64_fregs.patch
+
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 15 Aug 2017 17:27:30 +0800
+Subject: [PATCH] Fix build on aarch64/musl
+
+Errors
+
+invalid operands to binary & (have 'long double' and 'unsigned int')
+
+error: redefinition
+ of 'struct iovec'
+ struct iovec { void *iov_base; size_t iov_len; };
+        ^
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Rebase to 0.170
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+--- a/backends/aarch64_initreg.c
++++ b/backends/aarch64_initreg.c
+@@ -33,7 +33,7 @@
+ #include "system.h"
+ #include <assert.h>
+ #if defined(__aarch64__) && defined(__linux__)
+-# include <linux/uio.h>
++# include <sys/uio.h>
+ # include <sys/user.h>
+ # include <sys/ptrace.h>
+ /* Deal with old glibc defining user_pt_regs instead of user_regs_struct.  */
+@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
+ 
+   Dwarf_Word dwarf_fregs[32];
+   for (int r = 0; r < 32; r++)
+-    dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF;
++    dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF;
+ 
+   if (! setfunc (64, 32, dwarf_fregs, arg))
+     return false;
+--- a/backends/arm_initreg.c
++++ b/backends/arm_initreg.c
+@@ -38,7 +38,7 @@
+ #endif
+ 
+ #ifdef __aarch64__
+-# include <linux/uio.h>
++# include <sys/uio.h>
+ # include <sys/user.h>
+ # include <sys/ptrace.h>
+ /* Deal with old glibc defining user_pt_regs instead of user_regs_struct.  */

diff --git a/dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch b/dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch
new file mode 100644
index 000000000000..97c6c1dcd62e
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch
@@ -0,0 +1,86 @@
+May not be required (or at least some hunks) with next release (0.186?)
+
+https://git.alpinelinux.org/aports/plain/main/elfutils/musl-macros.patch
+--- a/lib/libeu.h
++++ b/lib/libeu.h
+@@ -31,6 +31,27 @@
+ 
+ #include <stddef.h>
+ #include <stdint.h>
++#include <unistd.h>
++#include <alloca.h>
++#include <string.h>
++
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) \
++  (__extension__                                                              \
++   ({ long int __result;                                                     \
++       do __result = (long int) (expression);                                 \
++       while (__result == -1L && errno == EINTR);                             \
++       __result; }))
++#endif
++
++#ifndef strndupa
++#define strndupa(s, n) \
++       (__extension__ ({const char *__in = (s); \
++                        size_t __len = strnlen (__in, (n)) + 1; \
++                        char *__out = (char *) alloca (__len); \
++                        __out[__len-1] = '\0'; \
++                        (char *) memcpy (__out, __in, __len-1);}))
++#endif
+ 
+ extern void *xmalloc (size_t) __attribute__ ((__malloc__));
+ extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
+--- a/src/arlib.h
++++ b/src/arlib.h
+@@ -29,6 +29,16 @@
+ #include <stdint.h>
+ #include <sys/types.h>
+ 
++#if !defined(ACCESSPERMS)
++# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
++#endif
++#if !defined(ALLPERMS)
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
++#endif
++#if !defined(DEFFILEMODE)
++# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
++#endif
++
+ 
+ /* State of -D/-U flags.  */
+ extern bool arlib_deterministic_output;
+--- a/src/elfcompress.c
++++ b/src/elfcompress.c
+@@ -37,6 +37,14 @@
+ #include "libeu.h"
+ #include "printversion.h"
+ 
++#if !defined(FNM_EXTMATCH)
++# define FNM_EXTMATCH 0
++#endif
++
++#if !defined(ALLPERMS)
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
++#endif
++
+ /* Name and version of program.  */
+ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
+ 
+--- a/src/strip.c
++++ b/src/strip.c
+@@ -45,6 +45,14 @@
+ #include <system.h>
+ #include <printversion.h>
+ 
++#if !defined(FNM_EXTMATCH)
++# define FNM_EXTMATCH 0
++#endif
++
++#if !defined(ACCESSPERMS)
++#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
++#endif
++
+ typedef uint8_t GElf_Byte;
+ 
+ /* Name and version of program.  */

diff --git a/dev-libs/elfutils/files/elfutils-0.189-skip-DT_RELR-failing-tests.patch b/dev-libs/elfutils/files/elfutils-0.189-skip-DT_RELR-failing-tests.patch
new file mode 100644
index 000000000000..0ffe75d93d31
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.189-skip-DT_RELR-failing-tests.patch
@@ -0,0 +1,39 @@
+We know these tests fail with DT_RELR (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
+so skip for now.
+--- a/tests/run-elflint-self.sh
++++ b/tests/run-elflint-self.sh
+@@ -18,5 +18,8 @@
+ 
+ . $srcdir/test-subr.sh
+ 
++# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
++exit 77
++
+ testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
+ testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld
+--- a/tests/run-strip-strmerge.sh
++++ b/tests/run-strip-strmerge.sh
+@@ -17,6 +17,9 @@
+ 
+ . $srcdir/test-subr.sh
+ 
++# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
++exit 77
++
+ # Generate a file with merged .shstrtab/.strtab table.
+ # strip and unstrip it. Check all files with elflint.
+ 
+diff --git a/tests/run-reverse-sections-self.sh b/tests/run-reverse-sections-self.sh
+index 71afd6a..87de933 100755
+--- a/tests/run-reverse-sections-self.sh
++++ b/tests/run-reverse-sections-self.sh
+@@ -17,6 +17,9 @@
+ 
+ . $srcdir/test-subr.sh
+ 
++# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
++exit 77
++
+ test_reverse_self ()
+ {
+   in_file="$1"

diff --git a/dev-libs/elfutils/files/elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch b/dev-libs/elfutils/files/elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch
new file mode 100644
index 000000000000..c64a30ec03b6
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch
@@ -0,0 +1,41 @@
+https://inbox.sourceware.org/elfutils-devel/20230719231639.1786109-1-sam@gentoo.org/T/#u
+
+From 7f607f9aba5c6fccb3d94776452b1cfa421df1f7 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 20 Jul 2023 00:15:10 +0100
+Subject: [PATCH] tests: run-lfs-symbols.sh needs gawk
+
+With awk=mawk, I get:
+```
+FAIL: run-lfs-symbols.sh
+
+First sanity-check that LFS detection works.
+checking ./testfile-nolfs
+awk: line 3: syntax error at or near /
+FAIL run-lfs-symbols.sh (exit status: 2)
+```
+
+	* tests/run-lfs-symbols.sh: Call 'gawk' instead of 'awk'.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/tests/run-lfs-symbols.sh
++++ b/tests/run-lfs-symbols.sh
+@@ -42,13 +42,13 @@ LFS_FORMAT='BEGIN {
+ LFS=$(printf "$LFS_FORMAT" "${abs_srcdir}/lfs-symbols")
+ 
+ makeprint() {
+-  make print-$1 -C $2 |& awk -F= "/^$1=/{ print \$2 }"
++  make print-$1 -C $2 |& gawk -F= "/^$1=/{ print \$2 }"
+ }
+ 
+ testrun_lfs() {
+   echo "checking $1"
+   if [ -e "$1" ]; then
+-    bad=$(testrun ${abs_top_builddir}/src/nm -u "$1" | awk "$LFS")
++    bad=$(testrun ${abs_top_builddir}/src/nm -u "$1" | gawk "$LFS")
+     if [ -n "$bad" ]; then
+       echo "$1 contains non-lfs symbols:" $bad
+       exit_status=1
+-- 
+2.41.0
+


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2024-03-01 22:26 Sam James
  0 siblings, 0 replies; 12+ messages in thread
From: Sam James @ 2024-03-01 22:26 UTC (permalink / raw
  To: gentoo-commits

commit:     bbaaa35438dd514ad6b4a5bad932c2fef6fd6ca6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  1 22:26:23 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar  1 22:26:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbaaa354

dev-libs/elfutils: drop 0.189-r4

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/elfutils/Manifest                         |   2 -
 dev-libs/elfutils/elfutils-0.189-r4.ebuild         | 129 ---------------------
 .../files/elfutils-0.189-PaX-support.patch         |  26 -----
 .../files/elfutils-0.189-clang16-tests.patch       |  26 -----
 .../files/elfutils-0.189-configure-bashisms.patch  |  49 --------
 .../elfutils/files/elfutils-0.189-lld-17.patch     |  31 -----
 ...elfutils-0.189-skip-DT_RELR-failing-tests.patch |  39 -------
 ...0.189-tests-run-lfs-symbols.sh-needs-gawk.patch |  41 -------
 8 files changed, 343 deletions(-)

diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest
index a0cd993d9745..c9977594e891 100644
--- a/dev-libs/elfutils/Manifest
+++ b/dev-libs/elfutils/Manifest
@@ -1,5 +1,3 @@
-DIST elfutils-0.189.tar.bz2 9143169 BLAKE2B 30596271e14cf3408326abc38a9775b849b8cb0ee119a5455df9434a7d3b9a57afb15e0236a179a26c7bd400d303749964c9d6350c419f747784fd99d12517e0 SHA512 93a877e34db93e5498581d0ab2d702b08c0d87e4cafd9cec9d6636dfa85a168095c305c11583a5b0fb79374dd93bc8d0e9ce6016e6c172764bcea12861605b71
-DIST elfutils-0.189.tar.bz2.sig 310 BLAKE2B d4155de64b15a9ab5c497cd603e73bf918eb1117de36cf28f8ddb50ccb4874fb24cffdf44bcbbc028b2ef3f64562960bf11a431274d861f9db96e3d865b37ec2 SHA512 2016c5f0ccd16f7feb0c825164bb18b2f1afad17dcd39d9f159429360fe4afd645665f612397d48bde191a1e59bb8352e2d065d61d7f649b929c3a7e7bfe8dd0
 DIST elfutils-0.190.tar.bz2 9162766 BLAKE2B 9934aff08f1898377708b28595fb52130ef9f80408132ac7d306845b10672ba45cf1ac69783da07b3eea9fd647741d44da45b8b2626c45a768cb2844c6186513 SHA512 9c4f5328097e028286c42f29e39dc3d80914b656cdfbbe05b639e91bc787ae8ae64dd4d69a6e317ce30c01648ded10281b86a51e718295f4c589df1225a48102
 DIST elfutils-0.190.tar.bz2.sig 310 BLAKE2B d6a2d490aa6815ed9a7c3624050716ebf7c50465af9907d471d47aa3b57590faf9b9ee03de127c6b3bdffa6948414aab6aa8c784ce29570f76bb03ee2021c062 SHA512 7cd88c19402a959679204a5b01ddd48720e224b84268d0d7452f0f1433150b97dd02288fac204fbd5e2fd6f227473bfe62205b350d5fe2e17addf45fb452eed6
 DIST elfutils-0.191.tar.bz2 9310088 BLAKE2B 2a7ad251369eca7ba609ab8644181fd479ad8596ee58dc068398ca22be25a978e96b81a10a92a5555d7574fd1b9227c8d54fb41dceb4025aedfc6ae32870bbca SHA512 e22d85f25317a79b36d370347e50284c9120c86f9830f08791b7b6a7b4ad89b9bf4c7c71129133b8d193a0edffb2a2c17987b7e48428b9670aff5ce918777e04

diff --git a/dev-libs/elfutils/elfutils-0.189-r4.ebuild b/dev-libs/elfutils/elfutils-0.189-r4.ebuild
deleted file mode 100644
index c4cfa3f34086..000000000000
--- a/dev-libs/elfutils/elfutils-0.189-r4.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 2003-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/elfutils.gpg
-inherit autotools flag-o-matic multilib-minimal verify-sig
-
-DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
-HOMEPAGE="https://sourceware.org/elfutils/"
-SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
-SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.sig )"
-
-LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="bzip2 debuginfod lzma nls static-libs test +utils zstd"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	!dev-libs/libelf
-	>=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}]
-	bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] )
-	debuginfod? (
-		app-arch/libarchive:=
-		dev-db/sqlite:3=
-		net-libs/libmicrohttpd:=
-
-		net-misc/curl[static-libs?,${MULTILIB_USEDEP}]
-	)
-	lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[static-libs?,${MULTILIB_USEDEP}] )
-	elibc_musl? (
-		dev-libs/libbsd
-		sys-libs/argp-standalone
-		sys-libs/fts-standalone
-		sys-libs/obstack-standalone
-	)
-"
-DEPEND="
-	${RDEPEND}
-"
-BDEPEND="
-	app-alternatives/lex
-	sys-devel/m4
-	virtual/pkgconfig
-	nls? ( sys-devel/gettext )
-	verify-sig? ( sec-keys/openpgp-keys-elfutils )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-0.189-PaX-support.patch
-	"${FILESDIR}"/${PN}-0.189-skip-DT_RELR-failing-tests.patch
-	"${FILESDIR}"/${PN}-0.189-musl-aarch64-regs.patch
-	"${FILESDIR}"/${PN}-0.189-musl-macros.patch
-	"${FILESDIR}"/${P}-configure-bashisms.patch
-	"${FILESDIR}"/${P}-clang16-tests.patch
-	"${FILESDIR}"/${P}-tests-run-lfs-symbols.sh-needs-gawk.patch
-	"${FILESDIR}"/${P}-lld-17.patch
-)
-
-src_prepare() {
-	default
-
-	# Only here for ${P}-configure-bashisms.patch, delete on next bump!
-	eautoreconf
-
-	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() {
-	# bug #407135
-	use test && append-flags -g
-
-	# bug 660738
-	filter-flags -fno-asynchronous-unwind-tables
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		$(use_enable nls)
-		$(multilib_native_use_enable debuginfod)
-		$(use_enable debuginfod libdebuginfod)
-
-		# explicitly disable thread safety, it's not recommended by upstream
-		# doesn't build either on musl.
-		--disable-thread-safety
-
-		# Valgrind option is just for running tests under it; dodgy under sandbox
-		# and indeed even w/ glibc with newer instructions.
-		--disable-valgrind
-		--program-prefix="eu-"
-		--with-zlib
-		$(use_with bzip2 bzlib)
-		$(use_with lzma)
-		$(use_with zstd)
-	)
-
-	# Needed because sets alignment macro
-	is-flagq -fsanitize=address && myeconfargs+=( --enable-sanitize-address )
-	is-flagq -fsanitize=undefined && myeconfargs+=( --enable-sanitize-undefined )
-
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_test() {
-	env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
-		LC_ALL="C" \
-		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.189-PaX-support.patch b/dev-libs/elfutils/files/elfutils-0.189-PaX-support.patch
deleted file mode 100644
index 2d44c757711a..000000000000
--- a/dev-libs/elfutils/files/elfutils-0.189-PaX-support.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-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.189-clang16-tests.patch b/dev-libs/elfutils/files/elfutils-0.189-clang16-tests.patch
deleted file mode 100644
index 8dede51cbb23..000000000000
--- a/dev-libs/elfutils/files/elfutils-0.189-clang16-tests.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-https://sourceware.org/git/?p=elfutils.git;a=commit;h=51373aa9a77ef53d237edc1af664efcbb49f1bf5
-
-From 51373aa9a77ef53d237edc1af664efcbb49f1bf5 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Sat, 22 Apr 2023 21:37:09 +0200
-Subject: [PATCH] testsuite: Avoid C99 compatibility issues in
- run-native-test.sh
-
-Include <unistd.h> for the pause function, and add the return type
-of main.  Avoids an implicit function declaration and implicit int.
-
-Signed-off-by: Florian Weimer <fweimer@redhat.com>
---- a/tests/run-native-test.sh
-+++ b/tests/run-native-test.sh
-@@ -27,7 +27,8 @@
- # in all builds.
- 
- tempfiles native.c native
--echo 'main () { while (1) pause (); }' > native.c
-+printf '#include <unistd.h>\nint main (void) { while (1) pause (); }\n' \
-+  > native.c
- 
- native=0
- kill_native()
--- 
-2.31.1

diff --git a/dev-libs/elfutils/files/elfutils-0.189-configure-bashisms.patch b/dev-libs/elfutils/files/elfutils-0.189-configure-bashisms.patch
deleted file mode 100644
index 04c01b0ecf88..000000000000
--- a/dev-libs/elfutils/files/elfutils-0.189-configure-bashisms.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-https://sourceware.org/git/?p=elfutils.git;a=commit;h=a9834d7df68afde4ee44ee8fef888cf7e799171a
-
-From a9834d7df68afde4ee44ee8fef888cf7e799171a Mon Sep 17 00:00:00 2001
-From: Mark Wielaard <mark@klomp.org>
-Date: Sun, 5 Mar 2023 13:09:34 +0100
-Subject: [PATCH] configure.ac contains Bashisms
-
-Autoconf scripts are supposed to be written in POSIX-compatible shell
-language. elfutils commits 0ffe2874e75d48cb88936e119e5284ff2bf664d9
-and 3fa98a6f29b0f370e32549ead7eb897c839af980 introduced Bashisms to
-configure.ac that cause errors when /bin/sh is not Bash.
-
-Example error when /bin/sh is Dash:
-
-./configure: 8748: test: xyes: unexpected operator
-
-The cause of the error is the use of a non-existent == operator in
-expressions passed to the 'test' built-in command. POSIX shell
-specifies only an = operator for testing string equality.
-
-  * configure.ac: Replace == by = in use_msan and enable_demangler
-  comparisons.
-
-https://sourceware.org/bugzilla/show_bug.cgi?id=30196
-
-Reported-by: Matt Whitlock <sourceware@mattwhitlock.name>
-Signed-off-by: Mark Wielaard <mark@klomp.org>
---- a/configure.ac
-+++ b/configure.ac
-@@ -169,7 +169,7 @@ if test "$use_msan" = yes; then
-   CXXFLAGS="$CXXFLAGS -fsanitize=memory -fsanitize-memory-track-origins -D_FORTIFY_SOURCE=0"
-   LDFLAGS="-shared"
-   AC_LINK_IFELSE([AC_LANG_SOURCE([int main (int argc, char **argv) { return 0; }])], use_msan=yes, use_msan=no)
--  AS_IF([test "x$use_msan" == xyes],
-+  AS_IF([test "x$use_msan" = xyes],
-         ac_cv_zdefs=no NO_UNDEFINED=,
-         AC_MSG_WARN([clang memory sanitizer not available])
-         CFLAGS="$old_CFLAGS" CXXFLAGS="$old_CXXFLAGS")
-@@ -493,7 +493,7 @@ AC_ARG_ENABLE([demangler],
- AS_HELP_STRING([--disable-demangler],
- 	       [Disable libstdc++ demangle support]),
- 	       [], [enable_demangler=yes])
--AS_IF([test "x$enable_demangler" == xyes],
-+AS_IF([test "x$enable_demangler" = xyes],
- AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl
- AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])])
- AM_CONDITIONAL(DEMANGLE, test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes")
--- 
-2.31.1

diff --git a/dev-libs/elfutils/files/elfutils-0.189-lld-17.patch b/dev-libs/elfutils/files/elfutils-0.189-lld-17.patch
deleted file mode 100644
index 3143bc078d77..000000000000
--- a/dev-libs/elfutils/files/elfutils-0.189-lld-17.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/913112
-https://sourceware.org/PR30729
-https://sourceware.org/git/?p=elfutils.git;a=commit;h=09e61a65953ed814d9e970f7f9ffb9c2d8cda477
-
-From 09e61a65953ed814d9e970f7f9ffb9c2d8cda477 Mon Sep 17 00:00:00 2001
-From: Mark Wielaard <mark@klomp.org>
-Date: Mon, 28 Aug 2023 20:23:41 +0200
-Subject: [PATCH] libelf: Remove elf_scncnt from libelf.map
-
-elf_scncnt was never implemented. It was probably an old name for
-elf_getshnum (which was the deprecated name of the elf_getshdrnum
-alias). Just remove it from the map file
-
-	* libelf/libelf.map (ELFUTILS_1.0): Remove elf_scncnt.
-
-https://sourceware.org/PR30729
-
-Reported-by: Kostadin Shishmanov <kocelfc@tutanota.com>
-Signed-off-by: Mark Wielaard <mark@klomp.org>
---- a/libelf/libelf.map
-+++ b/libelf/libelf.map
-@@ -50,7 +50,6 @@ ELFUTILS_1.0 {
-     elf_rand;
-     elf_rawdata;
-     elf_rawfile;
--    elf_scncnt;
-     elf_strptr;
-     elf_update;
-     elf_version;
--- 
-2.39.3

diff --git a/dev-libs/elfutils/files/elfutils-0.189-skip-DT_RELR-failing-tests.patch b/dev-libs/elfutils/files/elfutils-0.189-skip-DT_RELR-failing-tests.patch
deleted file mode 100644
index 0ffe75d93d31..000000000000
--- a/dev-libs/elfutils/files/elfutils-0.189-skip-DT_RELR-failing-tests.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-We know these tests fail with DT_RELR (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
-so skip for now.
---- a/tests/run-elflint-self.sh
-+++ b/tests/run-elflint-self.sh
-@@ -18,5 +18,8 @@
- 
- . $srcdir/test-subr.sh
- 
-+# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
-+exit 77
-+
- testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
- testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld
---- a/tests/run-strip-strmerge.sh
-+++ b/tests/run-strip-strmerge.sh
-@@ -17,6 +17,9 @@
- 
- . $srcdir/test-subr.sh
- 
-+# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
-+exit 77
-+
- # Generate a file with merged .shstrtab/.strtab table.
- # strip and unstrip it. Check all files with elflint.
- 
-diff --git a/tests/run-reverse-sections-self.sh b/tests/run-reverse-sections-self.sh
-index 71afd6a..87de933 100755
---- a/tests/run-reverse-sections-self.sh
-+++ b/tests/run-reverse-sections-self.sh
-@@ -17,6 +17,9 @@
- 
- . $srcdir/test-subr.sh
- 
-+# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495)
-+exit 77
-+
- test_reverse_self ()
- {
-   in_file="$1"

diff --git a/dev-libs/elfutils/files/elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch b/dev-libs/elfutils/files/elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch
deleted file mode 100644
index c64a30ec03b6..000000000000
--- a/dev-libs/elfutils/files/elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://inbox.sourceware.org/elfutils-devel/20230719231639.1786109-1-sam@gentoo.org/T/#u
-
-From 7f607f9aba5c6fccb3d94776452b1cfa421df1f7 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Thu, 20 Jul 2023 00:15:10 +0100
-Subject: [PATCH] tests: run-lfs-symbols.sh needs gawk
-
-With awk=mawk, I get:
-```
-FAIL: run-lfs-symbols.sh
-
-First sanity-check that LFS detection works.
-checking ./testfile-nolfs
-awk: line 3: syntax error at or near /
-FAIL run-lfs-symbols.sh (exit status: 2)
-```
-
-	* tests/run-lfs-symbols.sh: Call 'gawk' instead of 'awk'.
-
-Signed-off-by: Sam James <sam@gentoo.org>
---- a/tests/run-lfs-symbols.sh
-+++ b/tests/run-lfs-symbols.sh
-@@ -42,13 +42,13 @@ LFS_FORMAT='BEGIN {
- LFS=$(printf "$LFS_FORMAT" "${abs_srcdir}/lfs-symbols")
- 
- makeprint() {
--  make print-$1 -C $2 |& awk -F= "/^$1=/{ print \$2 }"
-+  make print-$1 -C $2 |& gawk -F= "/^$1=/{ print \$2 }"
- }
- 
- testrun_lfs() {
-   echo "checking $1"
-   if [ -e "$1" ]; then
--    bad=$(testrun ${abs_top_builddir}/src/nm -u "$1" | awk "$LFS")
-+    bad=$(testrun ${abs_top_builddir}/src/nm -u "$1" | gawk "$LFS")
-     if [ -n "$bad" ]; then
-       echo "$1 contains non-lfs symbols:" $bad
-       exit_status=1
--- 
-2.41.0
-


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
@ 2024-03-05 10:39 Sam James
  0 siblings, 0 replies; 12+ messages in thread
From: Sam James @ 2024-03-05 10:39 UTC (permalink / raw
  To: gentoo-commits

commit:     bcd670c0de8c9f9a1f83c96142e49fda36131a0f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  5 10:34:48 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar  5 10:35:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcd670c0

dev-libs/elfutils: cleanup musl patch for 0.191

Thanks to Mark Wieelard for the review of the patches and suggestions for
cleaning up obsolete bits. He notes we still need a proper fix for FNM_EXTMATCH
though.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/elfutils/elfutils-0.191.ebuild                  |  2 +-
 dev-libs/elfutils/files/elfutils-0.191-musl-macros.patch | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/dev-libs/elfutils/elfutils-0.191.ebuild b/dev-libs/elfutils/elfutils-0.191.ebuild
index 797cf5e83eb1..2825aaf9a27c 100644
--- a/dev-libs/elfutils/elfutils-0.191.ebuild
+++ b/dev-libs/elfutils/elfutils-0.191.ebuild
@@ -50,7 +50,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-0.189-musl-aarch64-regs.patch
-	"${FILESDIR}"/${PN}-0.189-musl-macros.patch
+	"${FILESDIR}"/${PN}-0.191-musl-macros.patch
 )
 
 src_prepare() {

diff --git a/dev-libs/elfutils/files/elfutils-0.191-musl-macros.patch b/dev-libs/elfutils/files/elfutils-0.191-musl-macros.patch
new file mode 100644
index 000000000000..6e0912c5ce9a
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.191-musl-macros.patch
@@ -0,0 +1,14 @@
+https://git.alpinelinux.org/aports/plain/main/elfutils/musl-macros.patch
+--- a/lib/system.h
++++ b/lib/system.h
+@@ -56,6 +56,10 @@ void error(int status, int errnum, const char *format, ...);
+ #error "err.h or error.h must be available"
+ #endif
+ 
++#if !defined(FNM_EXTMATCH)
++# define FNM_EXTMATCH 0
++#endif
++
+ /* error (EXIT_FAILURE, ...) should be noreturn but on some systems it
+    isn't.  This may cause warnings about code that should not be reachable.
+    So have an explicit error_exit wrapper that is noreturn (because it


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-03-05 10:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05 10:39 [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-03-01 22:26 Sam James
2023-07-20  0:08 Sam James
2021-10-25  5:02 Sam James
2021-09-08  3:08 Sam James
2021-06-06 20:37 Sergei Trofimovich
2020-05-30 21:58 Sergei Trofimovich
2020-03-30 23:42 Sergei Trofimovich
2019-08-14 21:35 Sergei Trofimovich
2019-02-02 23:40 Sergei Trofimovich
2019-01-29 21:56 Sergei Trofimovich
2016-01-08 19:59 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox