diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-09-19 19:22:36 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-09-19 19:22:36 +0000 |
commit | 7319e90f320cfdb75f414109ccabcf2ddd11b41a (patch) | |
tree | c2eae6573c0bf2efc2131e6cc5f8021288f6d585 /dev-libs/elfutils | |
parent | arm stable, bug #478742 (diff) | |
download | gentoo-2-7319e90f320cfdb75f414109ccabcf2ddd11b41a.tar.gz gentoo-2-7319e90f320cfdb75f414109ccabcf2ddd11b41a.tar.bz2 gentoo-2-7319e90f320cfdb75f414109ccabcf2ddd11b41a.zip |
Fix building with clang due to small nested function #451986 by Hendrik v. Raven.
(Portage version: 2.2.0/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Diffstat (limited to 'dev-libs/elfutils')
-rw-r--r-- | dev-libs/elfutils/ChangeLog | 7 | ||||
-rw-r--r-- | dev-libs/elfutils/elfutils-0.156.ebuild | 3 | ||||
-rw-r--r-- | dev-libs/elfutils/files/elfutils-0.156-nested-funcs.patch | 36 |
3 files changed, 44 insertions, 2 deletions
diff --git a/dev-libs/elfutils/ChangeLog b/dev-libs/elfutils/ChangeLog index 1c7cd56dc30c..0f422db2df38 100644 --- a/dev-libs/elfutils/ChangeLog +++ b/dev-libs/elfutils/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-libs/elfutils # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/elfutils/ChangeLog,v 1.168 2013/08/25 22:48:11 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/elfutils/ChangeLog,v 1.169 2013/09/19 19:22:36 vapier Exp $ + + 19 Sep 2013; Mike Frysinger <vapier@gentoo.org> + +files/elfutils-0.156-nested-funcs.patch, elfutils-0.156.ebuild: + Fix building with clang due to small nested function #451986 by Hendrik v. + Raven. *elfutils-0.156 (25 Aug 2013) diff --git a/dev-libs/elfutils/elfutils-0.156.ebuild b/dev-libs/elfutils/elfutils-0.156.ebuild index ff8a31ce6a3f..0b4087fd6007 100644 --- a/dev-libs/elfutils/elfutils-0.156.ebuild +++ b/dev-libs/elfutils/elfutils-0.156.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/elfutils/elfutils-0.156.ebuild,v 1.1 2013/08/25 22:48:11 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/elfutils/elfutils-0.156.ebuild,v 1.2 2013/09/19 19:22:36 vapier Exp $ EAPI="4" @@ -36,6 +36,7 @@ DEPEND="${RDEPEND} src_prepare() { epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch epatch "${DISTDIR}"/${P}-{portability,robustify}.patch + epatch "${FILESDIR}"/${P}-nested-funcs.patch #451986 sed -i -e 's:-Werror::g' $(find -name Makefile.in) || die use test || sed -i -e 's: tests::' Makefile.in #226349 use static-libs || sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in diff --git a/dev-libs/elfutils/files/elfutils-0.156-nested-funcs.patch b/dev-libs/elfutils/files/elfutils-0.156-nested-funcs.patch new file mode 100644 index 000000000000..f658a8f3e21e --- /dev/null +++ b/dev-libs/elfutils/files/elfutils-0.156-nested-funcs.patch @@ -0,0 +1,36 @@ +clang does not like nested funcs. use a define instead. + +https://bugs.gentoo.org/451986 + +--- a/libelf/elf_begin.c ++++ b/libelf/elf_begin.c +@@ -1011,18 +1011,17 @@ elf_begin (fildes, cmd, ref) + return NULL; + } + +- Elf *lock_dup_elf () +- { +- /* We need wrlock to dup an archive. */ +- if (ref->kind == ELF_K_AR) +- { +- rwlock_unlock (ref->lock); +- rwlock_wrlock (ref->lock); +- } +- +- /* Duplicate the descriptor. */ +- return dup_elf (fildes, cmd, ref); +- } ++#define lock_dup_elf() \ ++ ({ \ ++ /* We need wrlock to dup an archive. */ \ ++ if (ref->kind == ELF_K_AR) \ ++ { \ ++ rwlock_unlock (ref->lock); \ ++ rwlock_wrlock (ref->lock); \ ++ } \ ++ /* Duplicate the descriptor. */ \ ++ dup_elf (fildes, cmd, ref); \ ++ }) + + switch (cmd) + { |