From 6335bd10dfd41fa1f1a508c9e4d3458b6ae39a91 Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 17 Apr 2025 02:25:50 +0100 Subject: [PATCH] toolchain.eclass: extend JIT location hack to libgdiagnostics too libgccjit is strange in that it's a non-internal library installed by GCC and isn't intended to be interacted with via some magic options like -fopenmp or whatever, but just linked like a regular library. libgdiagnostics is the same, so extend the same treatment to it. Thanks to tdr for testing. Closes: https://bugs.gentoo.org/953823 Signed-off-by: Sam James --- eclass/toolchain.eclass | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index ebb63901fba55..df6ed170fe1f6 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -2782,10 +2782,15 @@ gcc_movelibs() { # libgccjit gets installed to /usr/lib, not /usr/$(get_libdir). Probably # due to a bug in gcc build system. if [[ ${PWD} == "${WORKDIR}"/build-jit ]] ; then - if is_jit || _tc_use_if_iuse libgdiagnostics ; then - dodir "${LIBPATH#${EPREFIX}}" + dodir "${LIBPATH#${EPREFIX}}" + + if is_jit ; then mv "${ED}"/usr/lib/libgccjit* "${D}${LIBPATH}" || die fi + + if _tc_use_if_iuse libgdiagnostics ; then + mv "${ED}"/usr/lib/libgdiagnostics* "${D}${LIBPATH}" || die + fi fi # For all the libs that are built for CTARGET, move them into the