commit: 8c1d94226bc344629e44ff7d13a19b4e2631a249 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> AuthorDate: Mon Aug 24 08:44:20 2020 +0000 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> CommitDate: Mon Aug 24 09:14:42 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c1d9422
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 <AT> gentoo.org> eclass/toolchain.eclass | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index a3c948a9352..5bbf46ecd3d 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -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.