diff options
author | Jakov Smolic <jakov.smolic@sartura.hr> | 2021-03-30 12:11:41 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-03-30 12:11:41 +0200 |
commit | 20c8d59ab2c7910384b505494a6f9299586bb636 (patch) | |
tree | 94af89e4be5509f76916aa7c66b13b84928508c1 /sys-devel/elftoolchain | |
parent | app-admin/monit: Minor init script adjustment (diff) | |
download | gentoo-20c8d59ab2c7910384b505494a6f9299586bb636.tar.gz gentoo-20c8d59ab2c7910384b505494a6f9299586bb636.tar.bz2 gentoo-20c8d59ab2c7910384b505494a6f9299586bb636.zip |
sys-devel/elftoolchain: Build and install all avalable tools
Closes: https://github.com/gentoo/gentoo/pull/20138
Closes: https://bugs.gentoo.org/778452
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-devel/elftoolchain')
-rw-r--r-- | sys-devel/elftoolchain/elftoolchain-0.7.1-r1.ebuild (renamed from sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild) | 26 | ||||
-rw-r--r-- | sys-devel/elftoolchain/files/elftoolchain-0.7.1-fno-common.patch | 34 |
2 files changed, 51 insertions, 9 deletions
diff --git a/sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild b/sys-devel/elftoolchain/elftoolchain-0.7.1-r1.ebuild index 8b4360d62099..f5ede11619da 100644 --- a/sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild +++ b/sys-devel/elftoolchain/elftoolchain-0.7.1-r1.ebuild @@ -14,6 +14,7 @@ SLOT="0" KEYWORDS="~amd64 ~x86" RDEPEND=" + app-arch/libarchive:= !dev-libs/elfutils !dev-libs/libelf" DEPEND="${RDEPEND}" @@ -23,8 +24,14 @@ BDEPEND=" >=sys-devel/bmake-20210206 virtual/yacc" +PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) + src_prepare() { default + + # needs unpackaged TET tools + rm -r test || die + sed -i -e "s@cc@$(tc-getCC)@" common/native-elf-format || die sed -i -e "s@readelf@$(tc-getREADELF)@" common/native-elf-format || die } @@ -40,16 +47,17 @@ _bmake() { src_compile() { export MAKESYSPATH="${BROOT}"/usr/share/mk/bmake - _bmake -C common - _bmake -C libelf + _bmake } src_install() { - doheader common/elfdefinitions.h - doheader libelf/{gelf,libelf}.h - - dolib.so libelf/libelf.so.1 - dosym libelf.so.1 /usr/$(get_libdir)/libelf.so - - dodoc README + _bmake \ + DESTDIR="${D}" \ + BINDIR="${EPREFIX}"/usr/${CHOST}-elftoolchain/usr/bin \ + LIBDIR="${EPREFIX}"/usr/$(get_libdir) \ + DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \ + install + + # remove static libraries + find "${ED}" -name '*.a' -delete || die } diff --git a/sys-devel/elftoolchain/files/elftoolchain-0.7.1-fno-common.patch b/sys-devel/elftoolchain/files/elftoolchain-0.7.1-fno-common.patch new file mode 100644 index 000000000000..d03bff2d4af3 --- /dev/null +++ b/sys-devel/elftoolchain/files/elftoolchain-0.7.1-fno-common.patch @@ -0,0 +1,34 @@ +Author: Dimitry Andric <dimitry@andric.com> +Taken from: https://sourceforge.net/p/elftoolchain/code/3879/ +--- a/ld/amd64.h ++++ b/ld/amd64.h +@@ -26,6 +26,6 @@ + * $Id$ + */ + +-char *amd64_script; ++extern char *amd64_script; + + void amd64_register(struct ld *); +--- a/ld/i386.h ++++ b/ld/i386.h +@@ -26,6 +26,6 @@ + * $Id$ + */ + +-char *i386_script; ++extern char *i386_script; + + void i386_register(struct ld *); +--- a/ld/mips.h ++++ b/ld/mips.h +@@ -23,7 +23,7 @@ + * SUCH DAMAGE. + */ + +-char *littlemips_script; +-char *bigmips_script; ++extern char *littlemips_script; ++extern char *bigmips_script; + + void mips_register(struct ld *); |