1 |
commit: 8c1d94226bc344629e44ff7d13a19b4e2631a249 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 24 08:44:20 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 24 09:14:42 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c1d9422 |
7 |
|
8 |
toolchain.eclass: fix relocation of libgccjit |
9 |
|
10 |
Before the change libgccjit.so was installed to /usr/lib. |
11 |
Relocation code in toolchain.eclass:gcc_movelibs() only |
12 |
handles /usr/$(get_libdir) -> $LIBDIR location. |
13 |
|
14 |
As a result gcc did not relocate libraries to version-speciifc |
15 |
firectory: caused collisions and installed library into wrong |
16 |
LIBDIR. |
17 |
|
18 |
The change handles libgccjit special case by relocating it |
19 |
explicitly. |
20 |
|
21 |
Reported-by: Michał Górny |
22 |
Bug: https://bugs.gentoo.org/583010 |
23 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
24 |
|
25 |
eclass/toolchain.eclass | 6 ++++++ |
26 |
1 file changed, 6 insertions(+) |
27 |
|
28 |
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass |
29 |
index a3c948a9352..5bbf46ecd3d 100644 |
30 |
--- a/eclass/toolchain.eclass |
31 |
+++ b/eclass/toolchain.eclass |
32 |
@@ -1882,6 +1882,12 @@ gcc_movelibs() { |
33 |
dodir "${HOSTLIBPATH#${EPREFIX}}" |
34 |
mv "${ED}"/usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die |
35 |
fi |
36 |
+ # libgccjit gets installed to /usr/lib, not /usr/$(get_libdir). Probably |
37 |
+ # due to a bug in gcc build system. |
38 |
+ if is_jit ; then |
39 |
+ dodir "${LIBPATH#${EPREFIX}}" |
40 |
+ mv "${ED}"/usr/lib/libgccjit* "${D}${LIBPATH}" || die |
41 |
+ fi |
42 |
|
43 |
# For all the libs that are built for CTARGET, move them into the |
44 |
# compiler-specific CTARGET internal dir. |