toolchain.eclass: only enable JIT with USE=jit

My fix in 6335bd10df exposed another
issue with USE="-jit libgdiagnostics" that was being obscured by the
issue I fixed in that commit: with USE=-jit, as long as we were still
doing the separate host-shared build (with USE=libgdiagnostics), we were
still passing --enable-languages=jit.

Bug: https://bugs.gentoo.org/953823
Closes: https://bugs.gentoo.org/954077
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-04-19 20:12:39 +01:00
parent ab930d5c09
commit 73fda26842

View File

@@ -1915,7 +1915,6 @@ toolchain_src_configure() {
--disable-systemtap
--enable-host-shared
--enable-languages=jit
# Might be used for the just-built GCC. Easier to just
# respect USE=graphite here in case the user passes some
@@ -1924,6 +1923,12 @@ toolchain_src_configure() {
--with-system-zlib
)
if is_jit ; then
confgcc_jit+=( --enable-languages=jit )
else
confgcc_jit+=( --enable-languages=c,c++ )
fi
if tc_has_feature zstd ; then
confgcc_jit+=( $(use_with zstd) )
fi