summaryrefslogtreecommitdiff
path: root/dev-libs/elfutils
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/elfutils')
-rw-r--r--dev-libs/elfutils/Manifest8
-rw-r--r--dev-libs/elfutils/elfutils-0.192-r1.ebuild2
-rw-r--r--dev-libs/elfutils/elfutils-0.193.ebuild153
-rw-r--r--dev-libs/elfutils/elfutils-9999.ebuild12
-rw-r--r--dev-libs/elfutils/files/elfutils-0.193-perf.patch53
5 files changed, 224 insertions, 4 deletions
diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest
index c95ab2aa3546..255c5c863374 100644
--- a/dev-libs/elfutils/Manifest
+++ b/dev-libs/elfutils/Manifest
@@ -5,11 +5,15 @@ AUX elfutils-0.191-musl-macros.patch 530 BLAKE2B d403d8e5d92b1bcef960a410cd27e3d
AUX elfutils-0.192-configure-better-error-message.patch 5115 BLAKE2B 5b46b608008f0a32da4dbbc90eacc6e1ab4bac7fd9adb831d77b50aa47fa3e665bb610e7e35ec9e2ef191ab150040c0487e882693fd8bce0e4fd6fa2eda0f63f SHA512 5951d4740758e724493597c938178e339012ed3c42e841ce4db28ec04d4b435c4ce3ffe6fef7232380c025d6efee2564a43a94df9b55793730fd4811e5afcf0a
AUX elfutils-0.192-libelf-static-link-libeu.patch 1157 BLAKE2B c60def4f80f3486ad43643d1caf5063f6e3fb6343aa4ba8ae26071a8b66c9a7e4d1c4235ff67368fe18de052e2edb6979cdca2ac3fb04385f83ef76f6d991c8f SHA512 9dd6ed318f07c0303a7a9f117568753054b7d676d3c171c713c3c8be6dec684b850603692a7c20205c867973689758e31380c570f6442d02413ca4f109d669ea
AUX elfutils-0.192-stacktrace-maybe-uninit.patch 1264 BLAKE2B 14de60367e45d5cdf6311b41209dd3eacf1a887ccd5a8a03dae5c2df095f611d765dba2abab38bf86cfe76837ca6ee3f9dbd379d5a63bf864b3091847481110b SHA512 221ee907a70cfec48650f915d0dec1907dcbbffea92c79439a5040b93f255e9f34b16c07aeb87e9e569941f7ee0840f9011e96f6ced43c16e6e627c2cf151eea
+AUX elfutils-0.193-perf.patch 1941 BLAKE2B 599a782213b7368e4f8e973cc39897d7caf2463e44bdfc5c970742f832fabe9a3da23b1e8fd98a6d092b2b12a76d0325241326d467a60f24736150314791ef43 SHA512 0d583a67f0147cf8c2338eb1cee9c98ba1c160386435d2d1daacf23b895519b4b44e6c53ccebea78f26d1905950be4c58500bfb7aa4237b614402b063e8bc812
DIST elfutils-0.191.tar.bz2 9310088 BLAKE2B 2a7ad251369eca7ba609ab8644181fd479ad8596ee58dc068398ca22be25a978e96b81a10a92a5555d7574fd1b9227c8d54fb41dceb4025aedfc6ae32870bbca SHA512 e22d85f25317a79b36d370347e50284c9120c86f9830f08791b7b6a7b4ad89b9bf4c7c71129133b8d193a0edffb2a2c17987b7e48428b9670aff5ce918777e04
DIST elfutils-0.191.tar.bz2.sig 310 BLAKE2B 5afee19515a115d4ca6d1e0c4a49eca84bb4b911687492934e939a80ac75b7fcea9b6bf5fc0f2248a4c64ef09bd5af9dfc60c72410cba33b78444c38443ad279 SHA512 ab030739d95d13abb84cf4dc6c5407e51d0bd0bca108e27654a1830371694181a1b6f115fdbb4ae0772390f54f1c4811e5ae26b38fdcfd3275177a3716adfd22
DIST elfutils-0.192.tar.bz2 11913897 BLAKE2B cf9036a1fca416e0d47c76471093609230545aee63e31e30991dc3c88417d7c621c930bb74809374da3bf142501cee91a2b861a5a89efcb5e1ac184df5defce1 SHA512 543188f5f2cfe5bc7955a878416c5f252edff9926754e5de0c6c57b132f21d9285c9b29e41281e93baad11d4ae7efbbf93580c114579c182103565fe99bd3909
DIST elfutils-0.192.tar.bz2.sig 310 BLAKE2B b34bd17e161c827ce502338388f0f7604fca8478e8e2f05f1ad744b5288f7767466d005d7591ad74098eda53aa3bcde8a3b485983447a434e2cb2e5e64c38063 SHA512 9de0731dd3986a3dde03cfacdc3daa668f0e2cc482adfc31ab97320f85f7d13d3f056154aa16299db3f09e1c89020635012ffdd0e4cb68c1391b0e218721fb22
+DIST elfutils-0.193.tar.bz2 11974916 BLAKE2B 3ddda695e92c76d0f98432b65d51737bdebf9cad536e0a583d10beb4693d98ce6e47716ff143d82dd3488e59489b03170bd292cb165d44bfb8581ff67dd2b1b9 SHA512 557e328e3de0d2a69d09c15a9333f705f3233584e2c6a7d3ce855d06a12dc129e69168d6be64082803630397bd64e1660a8b5324d4f162d17922e10ddb367d76
+DIST elfutils-0.193.tar.bz2.sig 310 BLAKE2B 2c5626af37031e6dbf1f94ca2d5622f978a50c7cbf412c33924585dc7261e0c7fe3f55d91121a9a3ae9cc092c4e1879a34cf145fdc19607ad6db065bbed8b605 SHA512 75f3935c4a519dc0b23e59e2e6f2bae7926c988aec484f2e1f0759cf7662eca1752f02c16b2f129fee0d7451e961322cf9a315c4ce23e91520f4779ed9fda713
EBUILD elfutils-0.191-r2.ebuild 3703 BLAKE2B 87642212c018038799723d29c4006ed21b8e76cb4b583a3cc2d8f0dedb9309e6f2fde374d13320bf2c98fd41916b57ac16fe3c6757a2657e40b93d34b2a0c84d SHA512 69415efd447f3c251be8ae5edf08f12338f2b692297f0b60b3c955ae4f0b9a2dfcbc425a66ca4487736de3038270bea63e2f2255b98f4f2ee73508911bd8d870
-EBUILD elfutils-0.192-r1.ebuild 3988 BLAKE2B cdf288e12ad2a22a47cb709a681625ce22bd3eb4cef73ede9cd52a94f7bbf2b70dc6583c68532c968698f2a3a96fb4dda04b5d254469f349470271a1530dd9d4 SHA512 ee547270474c2aee67a273ff90adc8e2eb92e4115a66c17f7d54710754741a3f8b9dce96604f500d6a27270cca666ed5c5d35b6419aa9ad21f19960ebcc4255f
-EBUILD elfutils-9999.ebuild 3731 BLAKE2B f1a71a2025fb1618c171c9eba808d469cb23312755a1f569aa05b9b450dc66663bdbf77ac5436ced4c283848c55c0a80ff622a94208d9b724200c701220dd99f SHA512 36bd360c4c554a3dd00318707d87d74d20b7a215b1c72560906e728d392a4d2cbc69b9e4b5040e613c173d3f71708165e4a7686af12df2f78d40a1d4d4e50aed
+EBUILD elfutils-0.192-r1.ebuild 3980 BLAKE2B 7c00b072f993f0d8511eb28b9ae74ff1c81ea97c2935ef4021b83d5762f13d6731c0427d205b520455ae6ecbae92dd222fe4186573540c242876e1c70a58bc00 SHA512 cd6231b1d67900eadcef3b9b2de92e18708ee1d3171a68eaf97be709f9574a08adc77d79dfa4b0363cf4243f6ed4b62b0ae44940c1ba4c3354c169797fa7ee39
+EBUILD elfutils-0.193.ebuild 4338 BLAKE2B 9edf68f988dd38a788343a9332a5dd4700bac7bd5f99da1fd820bf8a2f1a2698ceaab6dd446308d3de700e9208d98b472f57d9ae510268044a522ce5364da311 SHA512 3441b45f1bc8bdf9662bab8dbe27e79a20ff0f8af3ab421fc91d3d2fcd76995c4b8b3eb11faca116dca2eeebd5d91bef7d32905b9e5f462ba0871ff1686d6845
+EBUILD elfutils-9999.ebuild 4307 BLAKE2B 0b4b646dba7ae18291bf293bf32c6b158b5bc41579ee74e23a235ffacf3bc54ed24611aada12cd25c2f1608fad4dbfbe2b0a86670dd1aa1aab452a15a6e7b7b9 SHA512 f24ef5a56ce7127a2d661774c6f1e86cc514d05ee0f25664137394354a593a14de00698fd7b142e464dcc5a98514af05824bdc923170bb3e069d6dc92793f0a0
MISC metadata.xml 920 BLAKE2B 64bce99992961669c535e0232a5c1a9241316e13737fd6cc2e50314e400e0562cc2b692cbe590836e13aced55ff90c4833862e6da39f3c57afc56f6826d4c9f2 SHA512 db7f9105ca6bf72b084cddb0ddba9d02879a88b023d71aa7126c5678b4263475c936e3fecde214bffb543452c94c8a58b7a17c793926952bb1f9956ed549f151
diff --git a/dev-libs/elfutils/elfutils-0.192-r1.ebuild b/dev-libs/elfutils/elfutils-0.192-r1.ebuild
index 531729129380..19e413a5a7eb 100644
--- a/dev-libs/elfutils/elfutils-0.192-r1.ebuild
+++ b/dev-libs/elfutils/elfutils-0.192-r1.ebuild
@@ -21,7 +21,7 @@ else
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 )"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-elfutils-20240301 )"
fi
diff --git a/dev-libs/elfutils/elfutils-0.193.ebuild b/dev-libs/elfutils/elfutils-0.193.ebuild
new file mode 100644
index 000000000000..1ad8bec40d5c
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.193.ebuild
@@ -0,0 +1,153 @@
+# Copyright 2003-2025 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
+
+DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
+HOMEPAGE="https://sourceware.org/elfutils/"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://sourceware.org/git/elfutils.git"
+ inherit git-r3
+
+ BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ "
+else
+ inherit verify-sig
+ 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 )"
+
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+ BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-elfutils-20240301 )"
+fi
+
+LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
+SLOT="0"
+IUSE="bzip2 debuginfod lzma nls static-libs stacktrace test +utils valgrind 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-3.1.2:=
+ dev-db/sqlite:3=
+ >=dev-libs/json-c-0.11:=[${MULTILIB_USEDEP}]
+ >=net-libs/libmicrohttpd-0.9.33:=
+ >=net-misc/curl-7.29.0[static-libs?,${MULTILIB_USEDEP}]
+ )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] )
+ stacktrace? ( dev-util/sysprof )
+ 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}
+ valgrind? ( dev-debug/valgrind )
+"
+BDEPEND+="
+ sys-devel/m4
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.189-musl-aarch64-regs.patch
+ "${FILESDIR}"/${PN}-0.191-musl-macros.patch
+ "${FILESDIR}"/${P}-perf.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+
+ if ! use static-libs; then
+ sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die
+ fi
+
+ # TODO: Fails with some CFLAGS
+ # " __divhc3: /var/tmp/portage/dev-libs/elfutils-0.193/work/elfutils-0.193-abi_x86_32.x86/tests/funcretval:
+ # dwfl_module_return_value_location: cannot handle DWARF type description"
+ printf "#!/bin/sh\nexit 77" > tests/run-native-test.sh || die
+ # TODO: Fails for abi_x86_32 w/ DT_RELR
+ # "section [14] '.rel.plt': relocation 55: relocation type invalid for the file type"
+ printf "#!/bin/sh\nexit 77" > tests/run-elflint-self.sh || die
+ printf "#!/bin/sh\nexit 77" > tests/run-reverse-sections-self.sh || die
+
+ # 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() {
+ unset LEX YACC
+
+ local myeconfargs=(
+ $(use_enable nls)
+ $(multilib_native_use_enable debuginfod)
+ # Could do dummy if needed?
+ $(use_enable debuginfod libdebuginfod)
+ $(multilib_native_use_enable stacktrace)
+ $(use_enable valgrind valgrind-annotations)
+
+ # 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)
+ )
+
+ [[ ${PV} == 9999 ]] && myeconfargs+=( --enable-maintainer-mode )
+
+ # 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 we don't
+ # disable building them when the USE flag is disabled.
+ if ! use utils; then
+ rm -rf "${ED}"/usr/bin || die
+ fi
+}
diff --git a/dev-libs/elfutils/elfutils-9999.ebuild b/dev-libs/elfutils/elfutils-9999.ebuild
index be39e698ca36..cdd63bff7f42 100644
--- a/dev-libs/elfutils/elfutils-9999.ebuild
+++ b/dev-libs/elfutils/elfutils-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2003-2024 Gentoo Authors
+# Copyright 2003-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -76,6 +76,15 @@ src_prepare() {
sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die
fi
+ # TODO: Fails with some CFLAGS
+ # " __divhc3: /var/tmp/portage/dev-libs/elfutils-0.193/work/elfutils-0.193-abi_x86_32.x86/tests/funcretval:
+ # dwfl_module_return_value_location: cannot handle DWARF type description"
+ printf "#!/bin/sh\nexit 77" > tests/run-native-test.sh || die
+ # TODO: Fails for abi_x86_32 w/ DT_RELR
+ # "section [14] '.rel.plt': relocation 55: relocation type invalid for the file type"
+ printf "#!/bin/sh\nexit 77" > tests/run-elflint-self.sh || die
+ printf "#!/bin/sh\nexit 77" > tests/run-reverse-sections-self.sh || die
+
# https://sourceware.org/PR23914
sed -i 's:-Werror::' */Makefile.in || die
}
@@ -96,6 +105,7 @@ multilib_src_configure() {
local myeconfargs=(
$(use_enable nls)
$(multilib_native_use_enable debuginfod)
+ # Could do dummy if needed?
$(use_enable debuginfod libdebuginfod)
$(multilib_native_use_enable stacktrace)
$(use_enable valgrind valgrind-annotations)
diff --git a/dev-libs/elfutils/files/elfutils-0.193-perf.patch b/dev-libs/elfutils/files/elfutils-0.193-perf.patch
new file mode 100644
index 000000000000..d256d2586501
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.193-perf.patch
@@ -0,0 +1,53 @@
+https://sourceware.org/git/?p=elfutils.git;a=commit;h=d05241ce690018548857199bd34d7734c7164679
+https://bugs.gentoo.org/955065
+
+From d05241ce690018548857199bd34d7734c7164679 Mon Sep 17 00:00:00 2001
+From: Serhei Makarov <serhei@serhei.io>
+Date: Mon, 5 May 2025 12:08:55 -0400
+Subject: [PATCH] PR32930 backends/: guard asm/perf_regs.h include
+
+asm/perf_regs.h is an arch-specific linux include, not present on
+architectures like hppa and m68k that lack perf_events support.
+
+Only one place we need to fix; others already guard the include by
+architecture, or use architecture-independent headers (e.g.
+linux/perf_events.h).
+
+* backends/libebl_PERF_FLAGS.h: Only include asm/perf_regs.h on
+ architectures where we use it.
+
+Signed-off-by: Serhei Makarov <serhei@serhei.io>
+---
+ backends/libebl_PERF_FLAGS.h | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/backends/libebl_PERF_FLAGS.h b/backends/libebl_PERF_FLAGS.h
+index 2ed45f0f..51c20ea6 100644
+--- a/backends/libebl_PERF_FLAGS.h
++++ b/backends/libebl_PERF_FLAGS.h
+@@ -32,8 +32,12 @@
+ #define _LIBEBL_PERF_FLAGS_H 1
+
+ #if defined(__linux__)
++/* XXX Need to exclude __linux__ arches without perf_regs.h. */
++#if defined(__x86_64__) || defined(__i386__)
++/* || defined(other_architecture)... */
+ # include <asm/perf_regs.h>
+ #endif
++#endif
+
+ #if defined(_ASM_X86_PERF_REGS_H)
+ /* See the code in x86_initreg_sample.c for list of required regs and
+@@ -49,8 +53,8 @@
+ see the code in tools/perf/util/intel-pt.c intel_pt_add_gp_regs()
+ and note how regs are added in the same order as the perf_regs.h enum. */
+ #else
+-/* Since asm/perf_regs.h gives the register layout for a different arch,
+- we can't unwind x86_64 frames. */
++/* Since asm/perf_regs.h is absent, or gives the register layout for a
++ different arch, we can't unwind i386 and x86_64 frames. */
+ #define PERF_FRAME_REGISTERS_I386 0
+ #define PERF_FRAME_REGISTERS_X86_64 0
+ #endif
+--
+2.43.5