toolchain.eclass: fix relocation of libgccjit

Before the change libgccjit.so was installed to /usr/lib.
Relocation code in toolchain.eclass:gcc_movelibs() only
handles /usr/$(get_libdir) -> $LIBDIR location.

As a result gcc did not relocate libraries to version-speciifc
firectory: caused collisions and installed library into wrong
LIBDIR.

The change handles libgccjit special case by relocating it
explicitly.

Reported-by: Michał Górny
Bug: https://bugs.gentoo.org/583010
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This commit is contained in:
Sergei Trofimovich
2020-08-24 09:44:20 +01:00
parent 69db8d3836
commit 8c1d94226b

View File

@@ -1882,6 +1882,12 @@ gcc_movelibs() {
dodir "${HOSTLIBPATH#${EPREFIX}}"
mv "${ED}"/usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die
fi
# libgccjit gets installed to /usr/lib, not /usr/$(get_libdir). Probably
# due to a bug in gcc build system.
if is_jit ; then
dodir "${LIBPATH#${EPREFIX}}"
mv "${ED}"/usr/lib/libgccjit* "${D}${LIBPATH}" || die
fi
# For all the libs that are built for CTARGET, move them into the
# compiler-specific CTARGET internal dir.