mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-12 07:26:58 +02:00
dev-libs/elfutils: Sync with Gentoo
It's from Gentoo commit bbaaa35438dd514ad6b4a5bad932c2fef6fd6ca6.
This commit is contained in:
parent
98cfc069b9
commit
2392e17b4e
@ -1,4 +1,4 @@
|
||||
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
|
||||
DIST elfutils-0.191.tar.bz2.sig 310 BLAKE2B 5afee19515a115d4ca6d1e0c4a49eca84bb4b911687492934e939a80ac75b7fcea9b6bf5fc0f2248a4c64ef09bd5af9dfc60c72410cba33b78444c38443ad279 SHA512 ab030739d95d13abb84cf4dc6c5407e51d0bd0bca108e27654a1830371694181a1b6f115fdbb4ae0772390f54f1c4811e5ae26b38fdcfd3275177a3716adfd22
|
||||
|
@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( 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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
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 )"
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
EAPI=8
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/elfutils.gpg
|
||||
inherit autotools flag-o-matic multilib-minimal verify-sig
|
||||
inherit flag-o-matic multilib-minimal verify-sig
|
||||
|
||||
DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
|
||||
HOMEPAGE="https://sourceware.org/elfutils/"
|
||||
@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( 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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
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 )"
|
||||
|
||||
@ -45,26 +45,17 @@ BDEPEND="
|
||||
sys-devel/m4
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
verify-sig? ( sec-keys/openpgp-keys-elfutils )
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-elfutils-20240301 )
|
||||
"
|
||||
|
||||
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
|
@ -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)
|
@ -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
|
@ -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
|
@ -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
|
@ -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"
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user