commit: b7ca385711341d6f2bdedeb984f7b6bcff045363
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun May 29 04:06:07 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 29 04:06:47 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7ca3857
toolchain.eclass: misc fixups
- Revert back to previous MAKEOPTS method which seemed to work better
(weird splitting/parsing issue?)
- Throw in extra bash like we did before, not just relying on CONFIG_SHELL
- Add missing die
- Build JIT variant first, then main variant
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 0ce2ef02b432..8e96849608c1 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -497,7 +497,7 @@ toolchain_pkg_setup() {
# See
https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
# Avoid really confusing logs from subconfigure spam, makes logs far
# more legible.
- MAKEOPTS=" --output-sync=line ${MAKEOPTS}"
+ MAKEOPTS+=" --output-sync=line"
}
#---->> src_unpack <<----
@@ -1079,7 +1079,7 @@ toolchain_src_configure() {
case ${CTARGET//_/-} in
*-hardfloat-*|*eabihf)
confgcc+=( --with-float=hard )
- ;;
+ ;;
esac
esac
@@ -1346,7 +1346,7 @@ toolchain_src_configure() {
mkdir -p "${WORKDIR}"/build-jit || die
pushd "${WORKDIR}"/build-jit > /dev/null || die
- CONFIG_SHELL="${BROOT}"/bin/bash edo "${S}"/configure \
+ CONFIG_SHELL="${BROOT}"/bin/bash edo "${BROOT}"/bin/bash
"${S}"/configure \
"${confgcc[@]}" \
--disable-libada \
--disable-libsanitizer \
@@ -1363,10 +1363,10 @@ toolchain_src_configure() {
# Older gcc versions did not detect bash and re-exec itself, so force
the
# use of bash. Newer ones will auto-detect, but this is not harmful.
- CONFIG_SHELL="${BROOT}"/bin/bash edo "${S}"/configure "${confgcc[@]}"
+ CONFIG_SHELL="${BROOT}"/bin/bash edo "${BROOT}"/bin/bash
"${S}"/configure "${confgcc[@]}"
# Return to whatever directory we were in before
- popd > /dev/null
+ popd > /dev/null || die
}
# Replace -m flags unsupported by the version being built with the best
@@ -1691,6 +1691,19 @@ gcc_do_make() {
BOOT_CFLAGS=${BOOT_CFLAGS-"$(get_abi_CFLAGS
${TARGET_DEFAULT_ABI}) ${CFLAGS}"}
fi
+ if is_jit ; then
+ # TODO: docs for jit?
+ pushd "${WORKDIR}"/build-jit > /dev/null || die
+
+ einfo "Building JIT"
+ emake \
+ LDFLAGS="${LDFLAGS}" \
+ STAGE1_CFLAGS="${STAGE1_CFLAGS}" \
+ LIBPATH="${LIBPATH}" \
+ BOOT_CFLAGS="${BOOT_CFLAGS}"
+ popd > /dev/null || die
+ fi
+
einfo "Compiling ${PN} (${GCC_MAKE_TARGET})..."
pushd "${WORKDIR}"/build >/dev/null
@@ -1735,19 +1748,6 @@ gcc_do_make() {
fi
fi
- if is_jit ; then
- # TODO: docs for jit?
- pushd "${WORKDIR}"/build-jit > /dev/null || die
-
- einfo "Building JIT"
- emake \
- LDFLAGS="${LDFLAGS}" \
- STAGE1_CFLAGS="${STAGE1_CFLAGS}" \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${BOOT_CFLAGS}"
- popd > /dev/null || die
- fi
-
popd >/dev/null
}