From 451f8f7e52bd07bf910380f332a5eae1c19ca5f6 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 26 Feb 2024 07:14:08 +0000 Subject: [PATCH] eclass/toolchain: Sync with Gentoo It's from Gentoo commit 0c5af65cfb92b7702f170999488c970fc278d9a2. --- .../portage-stable/eclass/toolchain.eclass | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 67a04f297d..fef3879092 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass @@ -1309,6 +1309,22 @@ toolchain_src_configure() { GCC_RUN_FIXINCLUDES=1 fi + case ${CBUILD}-${CHOST}-${CTARGET} in + *i686-w64-mingw32*|*x86_64-w64-mingw32*) + # config/i386/t-cygming requires fixincludes (bug #925204) + GCC_RUN_FIXINCLUDES=1 + ;; + *mips*-sde-elf*) + # config/mips/t-sdemtk needs fixincludes too (bug #925204) + # It maps to mips*-sde-elf*, but only with --without-newlib. + if [[ ${confgcc} != *with-newlib* ]] ; then + GCC_RUN_FIXINCLUDES=1 + fi + ;; + *) + ;; + esac + if [[ ${GCC_RUN_FIXINCLUDES} == 1 ]] ; then confgcc+=( --enable-fixincludes ) else