[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2024-03-05 Thread Sam James
commit: bcd670c0de8c9f9a1f83c96142e49fda36131a0f
Author: Sam James  gentoo  org>
AuthorDate: Tue Mar  5 10:34:48 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Mar  5 10:35:50 2024 +
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  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 ..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



[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2024-03-01 Thread Sam James
commit: bbaaa35438dd514ad6b4a5bad932c2fef6fd6ca6
Author: Sam James  gentoo  org>
AuthorDate: Fri Mar  1 22:26:23 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Mar  1 22:26:23 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbaaa354

dev-libs/elfutils: drop 0.189-r4

Signed-off-by: Sam James  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 
2a7ad251369eca7ba609ab8644181fd479ad8596ee58dc068398ca22be25a978e96b81a10a92ad7574fd1b9227c8d54fb41dceb4025aedfc6ae32870bbca
 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..
--- 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
-   

[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2023-07-19 Thread Sam James
commit: c7245f6d8e9fd787dd859cbb39930e5a1288ef3a
Author: Sam James  gentoo  org>
AuthorDate: Wed Jul 19 23:35:31 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jul 19 23:55:06 2023 +
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  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 ..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-"

[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/musl/, profiles/features/musl/

2021-11-07 Thread Sam James
commit: d465289bebb01cb8b90344996e9c4e0cd82b93eb
Author: Sam James  gentoo  org>
AuthorDate: Sun Nov  7 06:42:40 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Nov  7 06:44:09 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d465289b

dev-libs/elfutils: add musl support

- Pull in patches and dependencies on libbsd and *-standalone from ::musl
- Borrowed a patch or two from upstream elfutils (new release coming shortly)
  as well as Alpine Linux.

Bug: https://bugs.gentoo.org/602126
Bug: https://bugs.gentoo.org/701478
Signed-off-by: Sam James  gentoo.org>

 dev-libs/elfutils/elfutils-0.185.ebuild| 10 +++
 .../elfutils/files/musl/elfutils-0.185-cdefs.patch | 20 ++
 .../files/musl/elfutils-0.185-error-h.patch| 83 +
 .../files/musl/elfutils-0.185-macros.patch | 84 ++
 .../files/musl/elfutils-0.185-strndupa.patch   | 20 ++
 profiles/features/musl/package.mask|  8 ---
 6 files changed, 217 insertions(+), 8 deletions(-)

diff --git a/dev-libs/elfutils/elfutils-0.185.ebuild 
b/dev-libs/elfutils/elfutils-0.185.ebuild
index a73fbfc0492..84df482f3f8 100644
--- a/dev-libs/elfutils/elfutils-0.185.ebuild
+++ b/dev-libs/elfutils/elfutils-0.185.ebuild
@@ -18,6 +18,12 @@ 
RDEPEND=">=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}]
bzip2? ( >=app-arch/bzip2-1.0.6-r4[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
+   )
!dev-libs/libelf
 "
 DEPEND="${RDEPEND}
@@ -42,6 +48,10 @@ PATCHES=(
 src_prepare() {
default
 
+   if use elibc_musl; then
+   eapply "${FILESDIR}"/musl/
+   fi
+
if ! use static-libs; then
sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' 
lib{asm,dw,elf}/Makefile.in || die
fi

diff --git a/dev-libs/elfutils/files/musl/elfutils-0.185-cdefs.patch 
b/dev-libs/elfutils/files/musl/elfutils-0.185-cdefs.patch
new file mode 100644
index 000..42fc10945eb
--- /dev/null
+++ b/dev-libs/elfutils/files/musl/elfutils-0.185-cdefs.patch
@@ -0,0 +1,20 @@
+From: Jory Pratt 
+Date: Thu, 12 Dec 2019 22:38:30 -0600
+Subject: [PATCH 3/3] Fix cdefs.h include for musl
+
+--- a/lib/fixedsizehash.h
 b/lib/fixedsizehash.h
+@@ -30,8 +30,11 @@
+ #include 
+ #include 
+ #include 
++#if !defined(__GLIBC__)
++#include 
++#else
+ #include 
+-
++#endif
+ #include 
+
+ #ifdef __CONCAT
+

diff --git a/dev-libs/elfutils/files/musl/elfutils-0.185-error-h.patch 
b/dev-libs/elfutils/files/musl/elfutils-0.185-error-h.patch
new file mode 100644
index 000..b9ee9b6e35a
--- /dev/null
+++ b/dev-libs/elfutils/files/musl/elfutils-0.185-error-h.patch
@@ -0,0 +1,83 @@
+https://raw.githubusercontent.com/gentoo/musl/master/dev-libs/elfutils/files/0.178/musl-error_h.patch
+
+From 9cb8fad40329cc6445233af0b6ac3f2adde19c65 Mon Sep 17 00:00:00 2001
+From: 
+Date: Thu, 12 Dec 2019 22:00:47 -0600
+Subject: [PATCH 9/9] Add hacked up error header for non GLIBC machines
+
+---
+ lib/error.h | 27 +++
+ src/error.h | 27 +++
+ 2 files changed, 54 insertions(+)
+ create mode 100644 lib/error.h
+ create mode 100644 src/error.h
+
+diff --git a/lib/error.h b/lib/error.h
+new file mode 100644
+index 000..ef06827
+--- /dev/null
 b/lib/error.h
+@@ -0,0 +1,27 @@
++#ifndef _ERROR_H_
++#define _ERROR_H_
++
++#include 
++#include 
++#include 
++#include 
++#include 
++
++static unsigned int error_message_count = 0;
++
++static inline void error(int status, int errnum, const char* format, ...)
++{
++  va_list ap;
++  fprintf(stderr, "%s: ", program_invocation_name);
++  va_start(ap, format);
++  vfprintf(stderr, format, ap);
++  va_end(ap);
++  if (errnum)
++  fprintf(stderr, ": %s", strerror(errnum));
++  fprintf(stderr, "\n");
++  error_message_count++;
++  if (status)
++  exit(status);
++}
++
++#endif/* _ERROR_H_ */
+diff --git a/src/error.h b/src/error.h
+new file mode 100644
+index 000..ef06827
+--- /dev/null
 b/src/error.h
+@@ -0,0 +1,27 @@
++#ifndef _ERROR_H_
++#define _ERROR_H_
++
++#include 
++#include 
++#include 
++#include 
++#include 
++
++static unsigned int error_message_count = 0;
++
++static inline void error(int status, int errnum, const char* format, ...)
++{
++  va_list ap;
++  fprintf(stderr, "%s: ", program_invocation_name);
++  va_start(ap, format);
++  vfprintf(stderr, format, ap);
++  va_end(ap);
++  if (errnum)
++  fprintf(stderr, ": %s", strerror(errnum));
++  fprintf(stderr, "\n");
++  error_message_count++;
++  

[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2021-10-24 Thread Sam James
commit: 8a4f3bfafba7104d92d94a25913e3068599e1df7
Author: Sam James  gentoo  org>
AuthorDate: Mon Oct 25 04:58:28 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Oct 25 05:01:56 2021 +
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  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 000..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 
+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 
+
+--- 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 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2021-09-07 Thread Sam James
commit: 388d62376b0d53e78d347ab890e2b8742aea2e23
Author: Adrian Ratiu  collabora  com>
AuthorDate: Tue Aug 31 18:32:41 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Sep  8 03:08:40 2021 +
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  collabora.com>
Closes: https://github.com/gentoo/gentoo/pull/22173
Signed-off-by: Sam James  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 000..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 
+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 
+---
+ 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 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2021-06-06 Thread Sergei Trofimovich
commit: 1933ad5420dada4392022b5571f631f0a5bb21a4
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sun Jun  6 20:37:31 2021 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sun Jun  6 20:37:47 2021 +
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  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 000..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;



[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2020-05-30 Thread Sergei Trofimovich
commit: 58357ad14a1f2f507e9e705cb8c2f9afbc706076
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat May 30 21:58:04 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat May 30 21:58:04 2020 +
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  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 000..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 ||



[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2020-03-30 Thread Sergei Trofimovich
commit: e39aefc4054c64d74ff8ca6c30dc8f2d54a46ab3
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Mon Mar 30 23:09:24 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Mon Mar 30 23:09:24 2020 +
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  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 000..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 000..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 
+
+http://bugs.gentoo.org/115100
+
+--- a/libelf/elf.h
 b/libelf/elf.h
+@@ -721,6 +721,7 @@ typedef struct
+ #define PT_GNU_EH_FRAME   

[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2019-08-14 Thread Sergei Trofimovich
commit: 46104220f70097c1d76730600de243ae52e85682
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Wed Aug 14 21:34:36 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Wed Aug 14 21:34:59 2019 +
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  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 000..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 000..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



[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2019-02-02 Thread Sergei Trofimovich
commit: 8b8e22f6afc9bdb16bc13ed3997f0c1281a0792e
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat Feb  2 22:07:12 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat Feb  2 23:40:00 2019 +
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  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 000..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



[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2019-01-29 Thread Sergei Trofimovich
commit: d21856c6b7ba9348121de36979d22d94fb0bfc16
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Tue Jan 29 21:55:33 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Tue Jan 29 21:56:18 2019 +
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  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 000..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 
+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 
+---
+ 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 (_data, _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



[gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/

2016-01-08 Thread Mike Frysinger
commit: db1c340e1cd2c809f8d72dc51a08f524dc086c04
Author: Mike Frysinger  gentoo  org>
AuthorDate: Fri Jan  8 18:42:05 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Fri Jan  8 19:46:02 2016 +
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 
91cc9101962cdef221b2901346921945bf6e8b7806dbf99c5c2d76dc3ae0 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