summaryrefslogtreecommitdiff
path: root/sys-devel/elftoolchain
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /sys-devel/elftoolchain
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'sys-devel/elftoolchain')
-rw-r--r--sys-devel/elftoolchain/Manifest3
-rw-r--r--sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild (renamed from sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild)39
-rw-r--r--sys-devel/elftoolchain/files/elftoolchain-0.7.1-fno-common.patch34
3 files changed, 57 insertions, 19 deletions
diff --git a/sys-devel/elftoolchain/Manifest b/sys-devel/elftoolchain/Manifest
index 132427c72520..8d1eb3447f34 100644
--- a/sys-devel/elftoolchain/Manifest
+++ b/sys-devel/elftoolchain/Manifest
@@ -1,3 +1,4 @@
+AUX elftoolchain-0.7.1-fno-common.patch 631 BLAKE2B 8808d37d9a0a92f224501d2e29ac05a19c836d65d0a5628da4c63f8324db126e86ba84d916869f21a01e8997512c4fa7578b68ce8e99f4eb9f4453b8e78ddf54 SHA512 3ae70a0c117dbb4531ff1e7449216dde63d7bc35412d308b295099c85634404ed577ffbb8392f39764a5a139fbb6ca790fd5bb27368c297d5e0b04e259b0b367
DIST elftoolchain-0.7.1.tar.bz2 5361427 BLAKE2B f86204b3c89433948eaf2cd2edc57abf9b77bfab777dc2a840b7aa5fbddfd31665bd27f31d7af2dea09fab0118e201b12802b4da85f8210af29094661f6f1fe5 SHA512 8226c468b393f0d567167a9dd6b16d2a226227e4d05dab8f44550038da44dcbfb92749f8e1a4b130b893675337a6771e24a81f350f3f864b1b8b17402ed23b26
-EBUILD elftoolchain-0.7.1.ebuild 1158 BLAKE2B 70b0256921589051bc4f1c7fae4ab0347fb959743d507b0e868e08ca88ac25954cec163132d66bf841fd539ea814dccd8f8d3aa9c3d0b135d3758fc1243bf93e SHA512 9ddead8c7df0b5a589acd72eb7fe799600fe6397e36de59a6dce9309a77aaf61173d695a5d9430f8c8002d69ca7c1feefd26f3f84dccd01e2d141aec68bba3ee
+EBUILD elftoolchain-0.7.1-r2.ebuild 1275 BLAKE2B 8a37ec62e7d09051d8a6b794c113dac64bc1986de6e897c4051c864dbf6d8b6ce6bb095dd82e7982afea08c634a26d3c5d912ad685b5dad180946c2ca8a0156f SHA512 40ed6cea81157836c11326fcb414019809feda1cd4b276332f358c1bfe996cdfdd7b4f7ad4b8749e440868a6f22b399bc5292ffad2e62e95dd08f78bcf827a0d
MISC metadata.xml 450 BLAKE2B b2e66c3665e4d1d24e8a4887114e5b5d2306a996a56660c7f40846550383588aea10c667b6e055c32dd22b756d8b2a81afbb0512919b273ef15bcf28b0a9c2c0 SHA512 8306332a971bd86d79ee9c3e3d1415ac15a40d015aa9db631b57e4afd125641f5106b8a06bc1c22b0d1aa128dc01ba390b94abaed780e8d92d3a43833fd79f40
diff --git a/sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild b/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild
index 8b4360d62099..4eea87b1c581 100644
--- a/sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild
+++ b/sys-devel/elftoolchain/elftoolchain-0.7.1-r2.ebuild
@@ -14,42 +14,45 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="
+ app-arch/libarchive:=
!dev-libs/elfutils
!dev-libs/libelf"
DEPEND="${RDEPEND}"
BDEPEND="
dev-vcs/subversion
sys-apps/lsb-release
- >=sys-devel/bmake-20210206
+ >=sys-devel/bmake-20210314-r1
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
}
-_bmake() {
- bmake \
- AR="$(tc-getAR)" \
- CC="$(tc-getCC)" \
- LD="$(tc-getLD)" \
- RANLIB="$(tc-getRANLIB)" \
- "$@" || die
+src_configure() {
+ tc-export AR CC LD RANLIB
+ export MAKESYSPATH="${BROOT}"/usr/share/mk/bmake
}
src_compile() {
- export MAKESYSPATH="${BROOT}"/usr/share/mk/bmake
- _bmake -C common
- _bmake -C libelf
+ bmake || die
}
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/bin/${CHOST}-elftoolchain \
+ LIBDIR="${EPREFIX}"/usr/$(get_libdir) \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ install || die
+
+ # 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 *);