commit:     0c5af65cfb92b7702f170999488c970fc278d9a2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 23 07:16:07 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 23 07:46:08 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c5af65c

toolchain.eclass: allow fixincludes for mingw & special MIPS target

config/i386/t-cygming always sets STMP_FIXINC regardless of the configure
arg for fixincludes, so don't disable it there.

The only other case is config/mips/t-sdemtk which I've handled too.

Exposed by 0b75d3ce0bae8240c28c6a8f191f5130548f8475.

Bug: https://bugs.gentoo.org/905118
Closes: https://bugs.gentoo.org/925204
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 67a04f297d6b..fef38790922c 100644
--- a/eclass/toolchain.eclass
+++ b/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

Reply via email to