commit: 612556c3f23ac08ac76187a81fe3f0cc6acc4a9f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 29 01:02:21 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 30 09:38:41 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=612556c3
toolchain.eclass: tidy up USE=jit build
* Pass --disable-fixincludes for newer GCCs for USE=jit (still need to try
disable it in general when we can, but we had to turn it on for a bit because
of newer glibc) as it's pointless there.
* Disable a bunch of other options for the JIT build, imported from my local
script for bisecting GCC.
* While at it, use an array for the configure args for the JIT build and just
use emake -C.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 52 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 36 insertions(+), 16 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 90a6098445f5..90576f2067ea 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1354,20 +1354,43 @@ toolchain_src_configure() {
if is_jit ; then
einfo "Configuring JIT gcc"
+ local confgcc_jit=(
+ "${confgcc[@]}"
+
+ --disable-analyzer
+ --disable-bootstrap
+ --disable-cet
+ --disable-default-pie
+ --disable-default-ssp
+ --disable-gcov
+ --disable-libada
+ --disable-libatomic
+ --disable-libgomp
+ --disable-libitm
+ --disable-libquadmath
+ --disable-libsanitizer
+ --disable-libssp
+ --disable-libstdcxx-pch
+ --disable-libvtv
+ --disable-lto
+ --disable-nls
+ --disable-objc-gc
+ --disable-systemtap
+ --enable-host-shared
+ --enable-languages=jit
+ --without-isl
+ --without-zstd
+ --with-system-zlib
+ )
+
+ if tc_version_is_at_least 13.1 ; then
+ confgcc_jit+=( --disable-fixincludes )
+ fi
+
mkdir -p "${WORKDIR}"/build-jit || die
pushd "${WORKDIR}"/build-jit > /dev/null || die
- CONFIG_SHELL="${gcc_shell}" edo "${gcc_shell}" "${S}"/configure
\
- "${confgcc[@]}" \
- --disable-libada \
- --disable-libsanitizer \
- --disable-libvtv \
- --disable-libgomp \
- --disable-libquadmath \
- --disable-libatomic \
- --disable-lto \
- --disable-bootstrap \
- --enable-host-shared \
- --enable-languages=jit
+
+ CONFIG_SHELL="${gcc_shell}" edo "${gcc_shell}" "${S}"/configure
"${confgcc_jit[@]}"
popd > /dev/null || die
fi
@@ -1701,11 +1724,8 @@ gcc_do_make() {
if is_jit ; then
# TODO: docs for jit?
- pushd "${WORKDIR}"/build-jit > /dev/null || die
-
einfo "Building JIT"
- emake "${emakeargs[@]}"
- popd > /dev/null || die
+ emake -C "${WORKDIR}"/build-jit "${emakeargs[@]}"
fi
einfo "Compiling ${PN} (${GCC_MAKE_TARGET})..."