commit:     73fda26842575668580ad90e98ef93cdb73cd329
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 19 19:12:39 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 19 19:14:36 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73fda268

toolchain.eclass: only enable JIT with USE=jit

My fix in 6335bd10dfd41fa1f1a508c9e4d3458b6ae39a91 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 <AT> gentoo.org>

 eclass/toolchain.eclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index df6ed170fe1f..0857395b4234 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -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

Reply via email to