From aaa44376d7162304219748a3b6771d9a26fc80fe Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 20 Jul 2023 07:07:08 +0100 Subject: gentoo auto-resync : 20:07:2023 - 07:07:07 --- dev-libs/elfutils/Manifest | 7 +- dev-libs/elfutils/elfutils-0.189-r2.ebuild | 134 --------------------- 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 +++++++ 8 files changed, 379 insertions(+), 135 deletions(-) delete mode 100644 dev-libs/elfutils/elfutils-0.189-r2.ebuild create mode 100644 dev-libs/elfutils/elfutils-0.189-r3.ebuild create mode 100644 dev-libs/elfutils/files/elfutils-0.189-PaX-support.patch create mode 100644 dev-libs/elfutils/files/elfutils-0.189-musl-aarch64-regs.patch create mode 100644 dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch create mode 100644 dev-libs/elfutils/files/elfutils-0.189-skip-DT_RELR-failing-tests.patch create mode 100644 dev-libs/elfutils/files/elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch (limited to 'dev-libs/elfutils') diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest index 6922886a689c..977848b66894 100644 --- a/dev-libs/elfutils/Manifest +++ b/dev-libs/elfutils/Manifest @@ -1,5 +1,10 @@ +AUX elfutils-0.189-PaX-support.patch 1058 BLAKE2B 9d7980eedf6250b848923eddb86d918ac983b348f77b3816ba77e1a663cc637ec02670e062b005aa010fa50f45fb953b1f2ef033bca6381773793231eb3cef06 SHA512 1bfb390ff4fb9ba2cbaf677bb4cd0d3ab3a27e465629be0dcc7b37f14dfe6c876069b598e29e9f3aa0c345b08c62895e68ce557237d18239c7505b8ea51c9ebd AUX elfutils-0.189-clang16-tests.patch 822 BLAKE2B a1a70176f22d59ec3ad608f48087aa149584bc86066efe16aabfe718a693c6e98557efb706628db780b3f63a7156e4a5b5c1901c9c07b34a5a23af7dea3caea4 SHA512 b74b12a4e0b12444afd320839e09b67d991513dcc66e5ff91b47caa2b729457a5545d0bb5c345c0d4d3e8f4676c227c13a16e48f8c0d53cd1fa1c7d32c80c28d AUX elfutils-0.189-configure-bashisms.patch 2086 BLAKE2B 4ecebe40ee2c628bdbd26fce6bfd487517ee8f9590cd2d565f4be34cf9afe67b59fd9cb225039ae911f9cf939783cef0cb623d7264fff07255abe89aed9c509f SHA512 0db8aaafd625cb57b9a7a16c841685b44beaff4b18d9ea15e5adf2e0a7bf14340be7c17ebda9278f1f88ec14e5457b720c4fc4e7e7b81e861fc83059b93b8e3f +AUX elfutils-0.189-musl-aarch64-regs.patch 1865 BLAKE2B c177254f31b214d39dc18a9591fca672537475bc8318b3dac6fecea11659f75e89c9c1eaa61b605bce5802ab910fe542645d214c825a28182b26d8d7620208bd SHA512 1eb5975bed830dc83e9375f526176276a5254dd9351853dc4c2c4be66246ea74bb65ae5352ea9f3d7fdf70f8af2b9d953e921dbce7cf94a906cd22272db6adab +AUX elfutils-0.189-musl-macros.patch 2421 BLAKE2B 23c214481ee441b4f3b66bb5cfd8a5321328136e743ad6b48533b2943d6cc896726d49d0b7493b5b57f0dbdec5bda9dcacf8fef485b0fb58bc24f732920a6e4e SHA512 86b249a14ed5a352acb16115559163d0f762ff718a23ff2989974e28f16f64c7554f3dcf5f6d5557bce524c3142e0e61ba315f1c20ec4106074b4d5901379fb6 +AUX elfutils-0.189-skip-DT_RELR-failing-tests.patch 1184 BLAKE2B c2de6d91ac92e2a5ae956a654a36462f0c2e719f9463d569aceee8f119a7201023f29e5ec68b477fceac31b5b8ece6be24314f856fe49c2b0699df6d4bb1f5c0 SHA512 a6cea47c2010df688b5020ad7b0f9143de0ad4d3202a147271b97b0df816a0c60f494e4ef8907e2fca79f8d59a72d8e049e4a9fa41eb2d2b2d269652a00814bb +AUX elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch 1200 BLAKE2B e4db5599c301c2be1b3ace1b33fb708d8eed892cddf98210709c20b2b8d205bebee0ea95af984bdedd974b4cd4324864570331cd77fc692f4083a77d6146ce41 SHA512 2a7c574fc912655428af6763a45c7f9037fbb7cdaaa7bfd1a215072185a6c42fa044cd51bef474853e9e611ee33ec5a43faae9b123120e0379d240905323454b DIST elfutils-0.187-patches.tar.xz 2804 BLAKE2B 77cbd0666d8da3d5229baaba6605c84e7990200f39bfb72b2008eb2527e4567abd90c93c291cc0c8f3c10bbf97758ccf5877cbdae823780cf8dc97ff4ff2f932 SHA512 d056fdd6ae0e71471087af472a72384d6e73ff2d7fe1b708b5ec9f091a913c8327197660132b7a6619a0db86534715507ef67ee91691a00a591c1d24c55a99f4 DIST elfutils-0.188.tar.bz2 9112977 BLAKE2B 6b0474f1436eaf6af73b735b9b2ddd5448ab9c03fbaa0be745a31c89ae8f15b0e21a651409c38643ca125794ce82c19d7b46db4a079f3e72cb919d643560e7a4 SHA512 585551b2d937d19d1becfc2f28935db1dd1a3d25571a62f322b70ac8da98c1a741a55d070327705df6c3e2ee026652e0b9a3c733b050a0b0ec5f2fc75d5b74b5 DIST elfutils-0.188.tar.bz2.sig 310 BLAKE2B c8d9135cffde3b1dd337b692d5351855cf799915d3ebd553327febaac192bd2f108b3f45a6376d458e179390a1ceaf4809762cdc40ea1e05fed0214ac33ed56e SHA512 4cc8a7417d244e319a1650d71b1831660cfe41afc7c73e9c83d1f076f4013fe15247e8b4f5e12a5396d83c4f1c7663ca4be5ea42bff3dc23263f85331fd9d566 @@ -7,5 +12,5 @@ DIST elfutils-0.189.tar.bz2 9143169 BLAKE2B 30596271e14cf3408326abc38a9775b849b8 DIST elfutils-0.189.tar.bz2.sig 310 BLAKE2B d4155de64b15a9ab5c497cd603e73bf918eb1117de36cf28f8ddb50ccb4874fb24cffdf44bcbbc028b2ef3f64562960bf11a431274d861f9db96e3d865b37ec2 SHA512 2016c5f0ccd16f7feb0c825164bb18b2f1afad17dcd39d9f159429360fe4afd645665f612397d48bde191a1e59bb8352e2d065d61d7f649b929c3a7e7bfe8dd0 EBUILD elfutils-0.188.ebuild 3243 BLAKE2B dc1cb10cb7f1f98d83712f65bcf1805a214f9842073ce577d13eaf93ca40d35835e40b43e141de34582dbcf42ced380e96a9519c87cf3ba7b47dc127e99f7aac SHA512 85a2bf12f568d137c9ab45deb6e08a64f8973b3794008a37deac569d6546d7a567ca80c9d670647b3c7878d21bba06ddfa0a371e32708d0eba6a8a5997fe92a3 EBUILD elfutils-0.189-r1.ebuild 3423 BLAKE2B d42cfe9b05573524f27612a55fe134dd83b4acaf9be51cbcfc9301e25265fdbe6474c92cc4e8fd2e0134df3c7722a4d1dcdd325687832225b39127b3157df39b SHA512 48b595e2eb1bfd4e104b4b5baa6c508552ae4703a059a758223d844e4559d39a9a9b5fe917d20fab12e1fe57d9bb2336de898a184abbdf1a0626ff1c9dc871e3 -EBUILD elfutils-0.189-r2.ebuild 3613 BLAKE2B 20de9e30d5ca9380eaf5b03dfd80b9dbfe605f33e4a5cda06bab3eef4ff1fbf5f3a68be0ff36bc4bd8cdfc257452ff8b6f51ec1f3b67ee9f79f0d3639803f739 SHA512 e1f4828f57bca55f79289def6e2d4e0c3d861ded0e1e3959083eaac65401b6a7404fb33bf1a86ab326de96948aaf2a765aa81c014b64b8b0777b85a15b9c8a3f +EBUILD elfutils-0.189-r3.ebuild 3488 BLAKE2B 1f80612e59b219ec678f3d78bfcc386852a9e99c90b0b70af4009c2296b18d6d6649334a8d98817f33fd9fb3e21e455b570c1af329206dad29db0bdaf49eccef SHA512 cf35e8536c9f8091a384c490a6556d50b851252fa828bae0c59877dbbbea13a3b8e78c8a127bdc9adb3e47c9d58fc93de8d455b89ce1941b92f97abeaa27d4bc MISC metadata.xml 680 BLAKE2B f5f2ad88e2f5f7823ea466403cb44888cea12ded4c1364e4c941be9f0e620ff9214973459bd4f70c43540e8f2a5d915c7d6e65ff3b2758c6660af928deb648b3 SHA512 403b91d41f6ff564c66445492c45d41ed4513709e557ac68d447e583b6bc4e22ccafe67f8e998660dfe47e75120c902107fccba90db06d99bd4c72f024bd881c diff --git a/dev-libs/elfutils/elfutils-0.189-r2.ebuild b/dev-libs/elfutils/elfutils-0.189-r2.ebuild deleted file mode 100644 index 0dad996a8027..000000000000 --- a/dev-libs/elfutils/elfutils-0.189-r2.ebuild +++ /dev/null @@ -1,134 +0,0 @@ -# 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+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-0.187-patches.tar.xz" -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=( - "${WORKDIR}"/${PN}-0.187-patches/ - "${FILESDIR}"/${P}-configure-bashisms.patch - "${FILESDIR}"/${P}-clang16-tests.patch -) - -src_unpack() { - if use verify-sig ; then - # Needed for downloaded patch (which is unsigned, which is fine) - verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.sig} - fi - - default -} - -src_prepare() { - default - - if use elibc_musl; then - eapply "${WORKDIR}"/${PN}-0.187-patches/musl/ - fi - - # 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/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 + +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 +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 + +Rebase to 0.170 +Signed-off-by: Hongxu Jia + +--- a/backends/aarch64_initreg.c ++++ b/backends/aarch64_initreg.c +@@ -33,7 +33,7 @@ + #include "system.h" + #include + #if defined(__aarch64__) && defined(__linux__) +-# include ++# include + # include + # include + /* 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 ++# include + # include + # include + /* 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 + #include ++#include ++#include ++#include ++ ++#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 + #include + ++#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 + #include + ++#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 +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 +--- 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 + -- cgit v1.2.3