commit: 913d9dfb7d4085a133192fcab817202b2a94bf3b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 31 02:35:13 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul 31 02:35:13 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=913d9dfb
toolchain.eclass: sanity-check against bootstrapping for cross
Had a report on IRC where bootstrap-cet was being used for a cross-compiler
which seems wrong even if it's a bit odd that --disable-bootstrap doesn't
win with it. Add a guard as we don't need any of the bootstrap-* targets
for cross.
Thanks to Ionen for spotting.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index cc104873a497..edd4c89bb00a 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1320,8 +1320,8 @@ toolchain_src_configure() {
confgcc+=( "$@" ${EXTRA_ECONF} )
- if [[ -n ${build_config_targets} ]] ; then
- # ./configure --with-build-config='bootstrap-lto bootstrap-cet'
+ if ! is_crosscompile && ! tc-is-cross-compiler && [[ -n
${build_config_targets} ]] ; then
+ # e.g. ./configure --with-build-config='bootstrap-lto
bootstrap-cet'
confgcc+=( --with-build-config="${build_config_targets[*]}" )
fi