From 8c1d94226bc344629e44ff7d13a19b4e2631a249 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 24 Aug 2020 09:44:20 +0100 Subject: [PATCH] toolchain.eclass: fix relocation of libgccjit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- eclass/toolchain.eclass | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index a3c948a935260..5bbf46ecd3d59 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.