commit:     6335bd10dfd41fa1f1a508c9e4d3458b6ae39a91
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 17 01:25:50 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 17 01:26:19 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6335bd10

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 <AT> gentoo.org>

 eclass/toolchain.eclass | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index ebb63901fba5..df6ed170fe1f 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

Reply via email to