From 0a13033827d256eaf00ebbe2fd74f001f874d363 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 25 Sep 2023 07:14:14 +0000 Subject: [PATCH] eclass/toolchain: Sync with Gentoo It's from Gentoo commit 6302dd47e23ee32cfcb446355704ba8bc61b668e. --- .../src/third_party/portage-stable/eclass/toolchain.eclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass b/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass index 6a88676b75..d93068619c 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass @@ -2244,7 +2244,9 @@ should_we_gcc_config() { local curr_branch_ver=$(ver_cut 1-2 ${curr_config_ver}) - if [[ ${curr_branch_ver} == ${GCC_BRANCH_VER} ]] ; then + if tc_use_major_version_only && [[ ${curr_config_ver} == ${GCCMAJOR} ]] ; then + return 0 + elif ! tc_use_major_version_only && [[ ${curr_branch_ver} == ${GCC_BRANCH_VER} ]] ; then return 0 else # If we're installing a genuinely different compiler version,