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 <sam@gentoo.org>
This commit is contained in:
Sam James
2025-04-17 02:25:50 +01:00
parent 43253b89e2
commit 6335bd10df

View File

@@ -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