1 |
commit: 20c8d59ab2c7910384b505494a6f9299586bb636 |
2 |
Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr> |
3 |
AuthorDate: Tue Mar 30 10:11:41 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 30 10:11:41 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20c8d59a |
7 |
|
8 |
sys-devel/elftoolchain: Build and install all avalable tools |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/20138 |
11 |
Closes: https://bugs.gentoo.org/778452 |
12 |
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr> |
13 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
14 |
|
15 |
...n-0.7.1.ebuild => elftoolchain-0.7.1-r1.ebuild} | 26 +++++++++++------ |
16 |
.../files/elftoolchain-0.7.1-fno-common.patch | 34 ++++++++++++++++++++++ |
17 |
2 files changed, 51 insertions(+), 9 deletions(-) |
18 |
|
19 |
diff --git a/sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild b/sys-devel/elftoolchain/elftoolchain-0.7.1-r1.ebuild |
20 |
similarity index 71% |
21 |
rename from sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild |
22 |
rename to sys-devel/elftoolchain/elftoolchain-0.7.1-r1.ebuild |
23 |
index 8b4360d6209..f5ede11619d 100644 |
24 |
--- a/sys-devel/elftoolchain/elftoolchain-0.7.1.ebuild |
25 |
+++ b/sys-devel/elftoolchain/elftoolchain-0.7.1-r1.ebuild |
26 |
@@ -14,6 +14,7 @@ SLOT="0" |
27 |
KEYWORDS="~amd64 ~x86" |
28 |
|
29 |
RDEPEND=" |
30 |
+ app-arch/libarchive:= |
31 |
!dev-libs/elfutils |
32 |
!dev-libs/libelf" |
33 |
DEPEND="${RDEPEND}" |
34 |
@@ -23,8 +24,14 @@ BDEPEND=" |
35 |
>=sys-devel/bmake-20210206 |
36 |
virtual/yacc" |
37 |
|
38 |
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) |
39 |
+ |
40 |
src_prepare() { |
41 |
default |
42 |
+ |
43 |
+ # needs unpackaged TET tools |
44 |
+ rm -r test || die |
45 |
+ |
46 |
sed -i -e "s@cc@$(tc-getCC)@" common/native-elf-format || die |
47 |
sed -i -e "s@readelf@$(tc-getREADELF)@" common/native-elf-format || die |
48 |
} |
49 |
@@ -40,16 +47,17 @@ _bmake() { |
50 |
|
51 |
src_compile() { |
52 |
export MAKESYSPATH="${BROOT}"/usr/share/mk/bmake |
53 |
- _bmake -C common |
54 |
- _bmake -C libelf |
55 |
+ _bmake |
56 |
} |
57 |
|
58 |
src_install() { |
59 |
- doheader common/elfdefinitions.h |
60 |
- doheader libelf/{gelf,libelf}.h |
61 |
- |
62 |
- dolib.so libelf/libelf.so.1 |
63 |
- dosym libelf.so.1 /usr/$(get_libdir)/libelf.so |
64 |
- |
65 |
- dodoc README |
66 |
+ _bmake \ |
67 |
+ DESTDIR="${D}" \ |
68 |
+ BINDIR="${EPREFIX}"/usr/${CHOST}-elftoolchain/usr/bin \ |
69 |
+ LIBDIR="${EPREFIX}"/usr/$(get_libdir) \ |
70 |
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \ |
71 |
+ install |
72 |
+ |
73 |
+ # remove static libraries |
74 |
+ find "${ED}" -name '*.a' -delete || die |
75 |
} |
76 |
|
77 |
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 |
78 |
new file mode 100644 |
79 |
index 00000000000..d03bff2d4af |
80 |
--- /dev/null |
81 |
+++ b/sys-devel/elftoolchain/files/elftoolchain-0.7.1-fno-common.patch |
82 |
@@ -0,0 +1,34 @@ |
83 |
+Author: Dimitry Andric <dimitry@××××××.com> |
84 |
+Taken from: https://sourceforge.net/p/elftoolchain/code/3879/ |
85 |
+--- a/ld/amd64.h |
86 |
++++ b/ld/amd64.h |
87 |
+@@ -26,6 +26,6 @@ |
88 |
+ * $Id$ |
89 |
+ */ |
90 |
+ |
91 |
+-char *amd64_script; |
92 |
++extern char *amd64_script; |
93 |
+ |
94 |
+ void amd64_register(struct ld *); |
95 |
+--- a/ld/i386.h |
96 |
++++ b/ld/i386.h |
97 |
+@@ -26,6 +26,6 @@ |
98 |
+ * $Id$ |
99 |
+ */ |
100 |
+ |
101 |
+-char *i386_script; |
102 |
++extern char *i386_script; |
103 |
+ |
104 |
+ void i386_register(struct ld *); |
105 |
+--- a/ld/mips.h |
106 |
++++ b/ld/mips.h |
107 |
+@@ -23,7 +23,7 @@ |
108 |
+ * SUCH DAMAGE. |
109 |
+ */ |
110 |
+ |
111 |
+-char *littlemips_script; |
112 |
+-char *bigmips_script; |
113 |
++extern char *littlemips_script; |
114 |
++extern char *bigmips_script; |
115 |
+ |
116 |
+ void mips_register(struct ld *); |