commit: 73e756bb1320787d68f55e99405baffd37b6d2ee
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 30 06:25:07 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 30 06:29:23 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73e756bb
toolchain.eclass: add bootstrap-set build config if USE=cet
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index aa0cfb1cd612..bd7da8ced160 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -817,6 +817,8 @@ toolchain_src_configure() {
local confgcc=( --host=${CHOST} )
+ local build_config_targets=()
+
if is_crosscompile || tc-is-cross-compiler ; then
# Straight from the GCC install doc:
# "GCC has code to correctly determine the correct value for
target
@@ -918,7 +920,11 @@ toolchain_src_configure() {
# Build compiler itself using LTO
if tc_version_is_at_least 9.1 && _tc_use_if_iuse lto ; then
- confgcc+=( --with-build-config=bootstrap-lto )
+ build_config_targets+=( bootstrap-lto )
+ fi
+
+ if tc_version_is_at_least 12 && _tc_use_if_iuse cet ; then
+ build_config_targets+=( bootstrap-cet )
fi
# Support to disable PCH when building libstdcxx
@@ -1321,7 +1327,12 @@ toolchain_src_configure() {
# killing the 32bit builds which want /usr/lib.
export ac_cv_have_x='have_x=yes ac_x_includes= ac_x_libraries='
- confgcc+=( "$@" ${EXTRA_ECONF} )
+ confgcc+=( "$@" )
+
+ if [[ -n ${build_config_targets} ]] ; then
+ # ./configure --with-build-config='bootstrap-lto bootstrap-cet'
+ confgcc+=( --with-build-config="${build_config_targets[*]}" )
+ fi
# Nothing wrong with a good dose of verbosity
echo