Hi all,

Just a gentle ping on this patch.

Thanks,
Eldar.

On 8/3/26 16:07, Eldar Osmanovic wrote:
> From: Aleksandar Rakic <[email protected]>
>
> This patch applies the previously introduced --with-multi-buildlist
> mechanism to the MIPS target.
>
> It replaces legacy multilib configuration files (e.g. t-img-linux,
> t-mti-linux) with a unified t-mips-multi file that describes all
> supported MIPS multilib variants. The actual set of built variants
> is filtered using the --with-multi-buildlist option.
>
> This approach allows vendors and toolchain maintainers to define
> precise multilib sets per target via external buildlist files,
> reducing build time and improving maintainability.
>
> The patch includes:
> - New ml-* buildlist files for MIPS targets
> - Replacement of t-* files with t-mips-multi
> - Updates to config.gcc and header files
>
> Additionally, this patch removes unsupported multilib variants such as
> single-float and short-double, which are no longer viable due to the
> removal of -fshort-double in GCC 6, and there is currently no backend
> logic to implement a direct replacement. If support is reintroduced in
> the future, it will require appropriate ABI markers to distinguish the
> additional variant.
>
> New multilibs added include:
> - mips32r2 mips16 little-endian soft-float
> - MIPS64R6 big-endian soft-float N32/N64 Linux libraries
> - MIPS32R1 hard-float little-endian Linux libraries
> - microMIPSr2 big-endian hard/soft-float support
>
> microMIPSr6 multilibs are explicitly disabled.
>
> This patch uses the target-independent --with-multi-buildlist support
> that is already part of GCC.
>
> gcc/ChangeLog:
>
>       * config.gcc: MIPS: Replace t-img-linux, t-mti-linux, t-mti-elf,
>       and t-img-elf with unified t-mips-multi.
>       Use TM_MULTILIB_EXCEPTIONS_CONFIG to control exceptions list.
>       * config/mips/ml-img-elf: New file.
>       * config/mips/ml-img-linux: New file.
>       * config/mips/ml-mti-elf: New file.
>       * config/mips/ml-mti-linux: New file.
>       * config/mips/mti-elf.h: Undef MULTILIB_DEFAULTS to allow more
>       flexible multilib selection.
>       * config/mips/mti-linux.h: Likewise.
>       * config/mips/t-img-elf: Delete file.
>       * config/mips/t-img-linux: Delete file.
>       * config/mips/t-mips-multi: New file.
>       * config/mips/t-mti-elf: Delete file.
>       * config/mips/t-mti-linux: Delete file.
>       * configure.tgt: Select default multilib build variants using
>       new per-target multilib lists (ml-* files).
>
> Cherry-picked 2b2481cc71284ad9db3dff60bd6cab2be678e87e,
> 0e3416279af1417b85d1a09b1e74327c31899a5d,
> e50ab07265fd8188bd4275c14b744ed2dc39116d,
> 32f7098d7d5bee9754c7728639a0e1cdb24d63f7,
> 24e261b2c9a9bea1c205cfab761c218ad50f938e, and
> 796ddebed418e953ba7cd5de1da42311fb1fe096
> from https://github.com/MIPS/gcc
>
> Signed-off-by: Robert Suchanek <[email protected]>
> Signed-off-by: Matthew Fortune <[email protected]>
> Signed-off-by: Chao-ying Fu <[email protected]>
> Signed-off-by: Faraz Shahbazker <[email protected]>
> Signed-off-by: Aleksandar Rakic <[email protected]>
> Signed-off-by: Eldar Osmanovic <[email protected]>
> ---
> The target independent prerequiste has since been commited:
>
> https://gcc.gnu.org/cgit/gcc/commit/?id=6ae5a2a6ba4bc8c3a2f337d49121a9f8f7eaa8b5
>
> Changes in v5:
> - Rebased onto current GCC master.
> - Dropped the small/tiny -mclib multilibs because -mclib is not
>    present on GCC master.
> - Fixed the default buildlist variable and path.
> - Extended newlib directory detection to all accepted elf* targets.
> - Removed stale exception patterns and corrected a microMIPS32R2
>    comment.
>
> Link to v4:
> https://sourceware.org/pipermail/gcc-patches/2025-October/696844.html
>
>   gcc/config.gcc               |  10 +-
>   gcc/config/mips/ml-img-elf   |  12 ++
>   gcc/config/mips/ml-img-linux |  10 ++
>   gcc/config/mips/ml-mti-elf   |  31 ++++
>   gcc/config/mips/ml-mti-linux |  27 ++++
>   gcc/config/mips/mti-elf.h    |   2 +
>   gcc/config/mips/mti-linux.h  |   4 +-
>   gcc/config/mips/t-img-elf    |  33 ----
>   gcc/config/mips/t-img-linux  |  38 -----
>   gcc/config/mips/t-mips-multi | 294 +++++++++++++++++++++++++++++++++++
>   gcc/config/mips/t-mti-elf    |  48 ------
>   gcc/config/mips/t-mti-linux  | 158 -------------------
>   gcc/configure.tgt            |   9 ++
>   13 files changed, 394 insertions(+), 282 deletions(-)
>   create mode 100644 gcc/config/mips/ml-img-elf
>   create mode 100644 gcc/config/mips/ml-img-linux
>   create mode 100644 gcc/config/mips/ml-mti-elf
>   create mode 100644 gcc/config/mips/ml-mti-linux
>   delete mode 100644 gcc/config/mips/t-img-elf
>   delete mode 100644 gcc/config/mips/t-img-linux
>   create mode 100644 gcc/config/mips/t-mips-multi
>   delete mode 100644 gcc/config/mips/t-mti-elf
>   delete mode 100644 gcc/config/mips/t-mti-linux
>
> diff --git a/gcc/config.gcc b/gcc/config.gcc
> index 0477bf22c8a..ecb42b9b3d4 100644
> --- a/gcc/config.gcc
> +++ b/gcc/config.gcc
> @@ -2633,7 +2633,7 @@ mips*-*-netbsd*)                        # NetBSD/mips, 
> either endian.
>   mips*-img-linux*)
>       tm_file="elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h 
> ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
>       extra_options="${extra_options} linux-android.opt"
> -     tmake_file="${tmake_file} mips/t-img-linux"
> +     tmake_file="${tmake_file} mips/t-mips-multi"
>       tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6 
> MIPS_ABI_DEFAULT=ABI_32"
>       with_arch_32="mips32r6"
>       with_arch_64="mips64r6"
> @@ -2641,7 +2641,7 @@ mips*-img-linux*)
>   mips*-mti-linux*)
>       tm_file="elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h 
> ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
>       extra_options="${extra_options} linux-android.opt"
> -     tmake_file="${tmake_file} mips/t-mti-linux"
> +     tmake_file="${tmake_file} mips/t-mips-multi"
>       tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2 
> MIPS_ABI_DEFAULT=ABI_32"
>       with_arch_32="mips32r2"
>       with_arch_64="mips64r2"
> @@ -2709,17 +2709,19 @@ mips*-*-linux*)                               # Linux 
> MIPS, either endian.
>       ;;
>   mips*-mti-elf*)
>       tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h 
> mips/sde.h mips/mti-elf.h"
> -     tmake_file="mips/t-mti-elf"
> +     tmake_file="mips/t-mips-multi"
>       tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2 
> MIPS_ABI_DEFAULT=ABI_32"
>       with_arch_32="mips32r2"
>       with_arch_64="mips64r2"
> +     TM_MULTILIB_EXCEPTIONS_CONFIG="*muclibc*"
>       ;;
>   mips*-img-elf*)
>       tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h 
> mips/sde.h mips/mti-elf.h"
> -     tmake_file="mips/t-img-elf"
> +     tmake_file="mips/t-mips-multi"
>       tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6 
> MIPS_ABI_DEFAULT=ABI_32"
>       with_arch_32="mips32r6"
>       with_arch_64="mips64r6"
> +     TM_MULTILIB_EXCEPTIONS_CONFIG="*muclibc*"
>       ;;
>   mips*-sde-elf*)
>       tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h 
> mips/sde.h"
> diff --git a/gcc/config/mips/ml-img-elf b/gcc/config/mips/ml-img-elf
> new file mode 100644
> index 00000000000..91204f825ed
> --- /dev/null
> +++ b/gcc/config/mips/ml-img-elf
> @@ -0,0 +1,12 @@
> +mips-r6-hard-newlib/lib
> +mips-r6-hard-newlib/lib32
> +mips-r6-hard-newlib/lib64
> +mips-r6-soft-newlib/lib
> +mips-r6-soft-newlib/lib32
> +mips-r6-soft-newlib/lib64
> +mipsel-r6-hard-newlib/lib
> +mipsel-r6-hard-newlib/lib32
> +mipsel-r6-hard-newlib/lib64
> +mipsel-r6-soft-newlib/lib
> +mipsel-r6-soft-newlib/lib32
> +mipsel-r6-soft-newlib/lib64
> diff --git a/gcc/config/mips/ml-img-linux b/gcc/config/mips/ml-img-linux
> new file mode 100644
> index 00000000000..c9a58272f55
> --- /dev/null
> +++ b/gcc/config/mips/ml-img-linux
> @@ -0,0 +1,10 @@
> +mips-r6-hard/lib
> +mips-r6-soft/lib
> +mips-r6-hard/lib32
> +mips-r6-soft/lib32
> +mips-r6-hard/lib64
> +mips-r6-soft/lib64
> +mipsel-r6-hard/lib
> +mipsel-r6-soft/lib
> +mipsel-r6-hard/lib32
> +mipsel-r6-hard/lib64
> diff --git a/gcc/config/mips/ml-mti-elf b/gcc/config/mips/ml-mti-elf
> new file mode 100644
> index 00000000000..ba61eb3efa6
> --- /dev/null
> +++ b/gcc/config/mips/ml-mti-elf
> @@ -0,0 +1,31 @@
> +mips-r2-hard-newlib/lib
> +mips-r2-hard-newlib/lib32
> +mips-r2-hard-newlib/lib64
> +mips-r2-hard-nan2008-newlib/lib
> +mips-r2-soft-newlib/lib
> +mips-r2-soft-newlib/lib32
> +mips-r2-soft-newlib/lib64
> +mipsel-r2-hard-newlib/lib
> +mipsel-r2-hard-newlib/lib32
> +mipsel-r2-hard-newlib/lib64
> +mipsel-r2-soft-newlib/lib
> +mipsel-r2-soft-newlib/lib32
> +mipsel-r2-soft-newlib/lib64
> +mipsel-r2-mips16-soft-newlib/lib
> +mipsel-r2-hard-nan2008-newlib/lib
> +micromips-r2-hard-nan2008-newlib/lib
> +micromips-r2-soft-newlib/lib
> +micromipsel-r2-hard-nan2008-newlib/lib
> +micromipsel-r2-soft-newlib/lib
> +mips-r6-hard-newlib/lib
> +mips-r6-hard-newlib/lib32
> +mips-r6-hard-newlib/lib64
> +mips-r6-soft-newlib/lib
> +mips-r6-soft-newlib/lib32
> +mips-r6-soft-newlib/lib64
> +mipsel-r6-hard-newlib/lib
> +mipsel-r6-hard-newlib/lib32
> +mipsel-r6-hard-newlib/lib64
> +mipsel-r6-soft-newlib/lib
> +mipsel-r6-soft-newlib/lib32
> +mipsel-r6-soft-newlib/lib64
> diff --git a/gcc/config/mips/ml-mti-linux b/gcc/config/mips/ml-mti-linux
> new file mode 100644
> index 00000000000..aabd81bceb9
> --- /dev/null
> +++ b/gcc/config/mips/ml-mti-linux
> @@ -0,0 +1,27 @@
> +mips-r2-hard/lib
> +mips-r2-soft/lib
> +mips-r2-hard/lib32
> +mips-r2-hard/lib64
> +mips-r2-hard-nan2008/lib
> +mipsel-r1-hard/lib
> +mipsel-r2-hard/lib
> +mipsel-r2-soft/lib
> +mipsel-r2-hard/lib32
> +mipsel-r2-hard/lib64
> +mipsel-r2-hard-nan2008/lib
> +micromipsel-r2-hard-nan2008/lib
> +micromipsel-r2-soft/lib
> +mips-r2-hard-uclibc/lib
> +mips-r2-hard-nan2008-uclibc/lib
> +mipsel-r2-hard-uclibc/lib
> +mipsel-r2-hard-nan2008-uclibc/lib
> +mips-r6-hard/lib
> +mips-r6-soft/lib
> +mips-r6-hard/lib32
> +mips-r6-soft/lib32
> +mips-r6-hard/lib64
> +mips-r6-soft/lib64
> +mipsel-r6-hard/lib
> +mipsel-r6-soft/lib
> +mipsel-r6-hard/lib32
> +mipsel-r6-hard/lib64
> diff --git a/gcc/config/mips/mti-elf.h b/gcc/config/mips/mti-elf.h
> index 9df82adb1a0..72331b8408a 100644
> --- a/gcc/config/mips/mti-elf.h
> +++ b/gcc/config/mips/mti-elf.h
> @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public 
> License
>   along with GCC; see the file COPYING3.  If not see
>   <http://www.gnu.org/licenses/>.  */
>   
> +#undef MULTILIB_DEFAULTS
> +
>   #undef DRIVER_SELF_SPECS
>   #define DRIVER_SELF_SPECS                                           \
>     /* Set the ISA for the default multilib.  */                              
> \
> diff --git a/gcc/config/mips/mti-linux.h b/gcc/config/mips/mti-linux.h
> index 4859ccd841a..66cd70c91cd 100644
> --- a/gcc/config/mips/mti-linux.h
> +++ b/gcc/config/mips/mti-linux.h
> @@ -21,7 +21,9 @@ along with GCC; see the file COPYING3.  If not see
>      MIPS_SYSVERSION_SPEC defaults to 'r2' (mips32r2 or mips64r2) unless
>      'r1' or 'r6' are specifically given so that mips32r3, mips32r5,
>      mips64r3, and mips64r5 will all default to 'r2'.  See MULTILIB_MATCHES
> -   definition in t-mti-linux.  */
> +   definition in t-mips-multi.  */
> +
> +#undef MULTILIB_DEFAULTS
>   
>   #define MIPS_SYSVERSION_SPEC \
>       "%{mips32|mips64:r1;mips32r6|mips64r6:r6;:r2}%{mips16:-mips16}"
> diff --git a/gcc/config/mips/t-img-elf b/gcc/config/mips/t-img-elf
> deleted file mode 100644
> index 9e517a0944c..00000000000
> --- a/gcc/config/mips/t-img-elf
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -# Copyright (C) 2014-2026 Free Software Foundation, Inc.
> -#
> -# This file is part of GCC.
> -#
> -# GCC is free software; you can redistribute it and/or modify
> -# it under the terms of the GNU General Public License as published by
> -# the Free Software Foundation; either version 3, or (at your option)
> -# any later version.
> -#
> -# GCC is distributed in the hope that it will be useful,
> -# but WITHOUT ANY WARRANTY; without even the implied warranty of
> -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -# GNU General Public License for more details.
> -#
> -# You should have received a copy of the GNU General Public License
> -# along with GCC; see the file COPYING3.  If not see
> -# <http://www.gnu.org/licenses/>.
> -
> -# The default build is mips32r6, hard-float big-endian.
> -# A multilib for mips32r6+LE
> -# A multilib for mips64r6
> -# A multilib for mips64r6+LE
> -
> -MULTILIB_OPTIONS = mips64r6 mabi=64 EL msoft-float/msingle-float
> -MULTILIB_DIRNAMES = mips64r6 64 el sof sgl
> -MULTILIB_MATCHES = EL=mel EB=meb
> -
> -# Don't build 64r6 with single-float
> -MULTILIB_EXCEPTIONS += mips64r6/*msingle-float*
> -
> -MULTILIB_EXCEPTIONS += mabi=64*
> -MULTILIB_EXCEPTIONS += msingle-float*
> -MULTILIB_EXCEPTIONS += *msingle-float
> diff --git a/gcc/config/mips/t-img-linux b/gcc/config/mips/t-img-linux
> deleted file mode 100644
> index e15cdaf69f2..00000000000
> --- a/gcc/config/mips/t-img-linux
> +++ /dev/null
> @@ -1,38 +0,0 @@
> -# Copyright (C) 2014-2026 Free Software Foundation, Inc.
> -#
> -# This file is part of GCC.
> -#
> -# GCC is free software; you can redistribute it and/or modify
> -# it under the terms of the GNU General Public License as published by
> -# the Free Software Foundation; either version 3, or (at your option)
> -# any later version.
> -#
> -# GCC is distributed in the hope that it will be useful,
> -# but WITHOUT ANY WARRANTY; without even the implied warranty of
> -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -# GNU General Public License for more details.
> -#
> -# You should have received a copy of the GNU General Public License
> -# along with GCC; see the file COPYING3.  If not see
> -# <http://www.gnu.org/licenses/>.
> -
> -# The default build is mips32r6, hard-float big-endian.  Add mips64r6,
> -# 64-bit ABI and little-endian variations.
> -
> -MULTILIB_OPTIONS = mips64r6 mabi=64 EL
> -MULTILIB_DIRNAMES = mips64r6 64 el
> -MULTILIB_MATCHES = EL=mel EB=meb
> -
> -MULTILIB_REQUIRED =
> -MULTILIB_OSDIRNAMES = .=mips-r6-hard/lib
> -MULTILIB_REQUIRED += mips64r6
> -MULTILIB_OSDIRNAMES += mips64r6=!mips-r6-hard/lib32
> -MULTILIB_REQUIRED += mips64r6/mabi=64
> -MULTILIB_OSDIRNAMES += mips64r6/mabi.64=!mips-r6-hard/lib64
> -
> -MULTILIB_REQUIRED += EL
> -MULTILIB_OSDIRNAMES += EL=!mipsel-r6-hard/lib
> -MULTILIB_REQUIRED += mips64r6/EL
> -MULTILIB_OSDIRNAMES += mips64r6/EL=!mipsel-r6-hard/lib32
> -MULTILIB_REQUIRED += mips64r6/mabi=64/EL
> -MULTILIB_OSDIRNAMES += mips64r6/mabi.64/EL=!mipsel-r6-hard/lib64
> diff --git a/gcc/config/mips/t-mips-multi b/gcc/config/mips/t-mips-multi
> new file mode 100644
> index 00000000000..775dafd8f56
> --- /dev/null
> +++ b/gcc/config/mips/t-mips-multi
> @@ -0,0 +1,294 @@
> +# Copyright (C) 2024-2026 Free Software Foundation, Inc.
> +#
> +# This file is part of GCC.
> +#
> +# GCC is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 3, or (at your option)
> +# any later version.
> +#
> +# GCC is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with GCC; see the file COPYING3.  If not see
> +# <http://www.gnu.org/licenses/>.
> +
> +# There is no default build in this multilib setup.  This
> +# unfortunately does not prevent config-ml.in from building a default
> +# but this can be removed via post install scripts.
> +#
> +# All possible MIPS multilibs are shown in this file.  They are
> +# limited via a file that lists required multilibs for each vendor/OS
> +# combination which can be overridden at build time as well.
> +#
> +# The benefit to describing all multilibs is that the compiler driver
> +# can use any multilib if it is present and therefore additional
> +# library variants can be added to an installation after initial
> +# build.  This could be achieved by building all libraries and
> +# removing the ones we don't want to ship but this would massively
> +# increase build times in situations where only a few are required
> +# immediately.
> +
> +MULTILIB_OPTIONS = muclibc \
> +                mips32/mips32r2/mips32r6/mips64/mips64r2/mips64r6 \
> +                mips16/mmicromips \
> +                mabi=32/mabi=n32/mabi=64 \
> +                EB/EL \
> +                msoft-float \
> +                mnan=2008
> +MULTILIB_DIRNAMES = uclibc mips32 mips32r2 mips32r6 mips64 \
> +                 mips64r2 mips64r6 mips16 micromips 32 n32 64 \
> +                 eb el sof nan2008
> +MULTILIB_MATCHES = EL=mel EB=meb \
> +                mips32r2=mips32r3 mips32r2=mips32r5 \
> +                mips64r2=mips64r3 mips64r2=mips64r5
> +
> +# Allow the exceptions list to be controlled by configure time options
> +MULTILIB_EXCEPTIONS = $(TM_MULTILIB_EXCEPTIONS_CONFIG)
> +
> +# Determine if this is a bare metal target with a newlib default library
> +is_newlib = $(if $(filter elf%, $(lastword $(subst -, ,$(target)))),-newlib)
> +
> +MULTILIB_EXCLUSIONS := !muclibc/!mips32/!mips32r2
> +MULTILIB_EXCLUSIONS := $(MULTILIB_EXCLUSIONS)/!mips32r6/!mips64/!mips64r2
> +MULTILIB_EXCLUSIONS := $(MULTILIB_EXCLUSIONS)/!mips64r6/!mips16/!mmicromips
> +MULTILIB_EXCLUSIONS := $(MULTILIB_EXCLUSIONS)/!mabi=32/!mabi=n32/!mabi=64/!EB
> +MULTILIB_EXCLUSIONS := $(MULTILIB_EXCLUSIONS)/!EL/!msoft-float/!mnan=2008
> +
> +# MIPS32R6/MIPS64R6
> +MULTILIB_REQUIRED   = mips32r6/mabi=32/EB/mnan=2008
> +MULTILIB_OSDIRNAMES = mips32r6/mabi.32/EB/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r6-hard$(is_newlib)/lib
> +MULTILIB_REUSE      = mips32r6/mabi.32/EB/mnan.2008=
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)mips64r6/mabi.32/EB/mnan.2008
> +MULTILIB_REQUIRED   += mips64r6/mabi=n32/EB/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r6/mabi.n32/EB/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r6-hard$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64r6/mabi=64/EB/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r6/mabi.64/EB/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r6-hard$(is_newlib)/lib64
> +
> +MULTILIB_REQUIRED   += mips32r6/mabi=32/EB/msoft-float/mnan=2008
> +MULTILIB_OSDIRNAMES += mips32r6/mabi.32/EB/msoft-float/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r6-soft$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32r6/mabi.32/EB/msoft-float/mnan.2008=mips64r6
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)/mabi.32/EB/msoft-float/mnan.2008
> +MULTILIB_REQUIRED   += mips64r6/mabi=n32/EB/msoft-float/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r6/mabi.n32/EB/msoft-float/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r6-soft$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64r6/mabi=64/EB/msoft-float/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r6/mabi.64/EB/msoft-float/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r6-soft$(is_newlib)/lib64
> +
> +MULTILIB_REQUIRED   += mips32r6/mabi=32/EL/mnan=2008
> +MULTILIB_OSDIRNAMES += mips32r6/mabi.32/EL/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mipsel-r6-hard$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32r6/mabi.32/EL/mnan.2008=
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)mips64r6/mabi.32/EL/mnan.2008
> +MULTILIB_REQUIRED   += mips64r6/mabi=n32/EL/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r6/mabi.n32/EL/mnan.2008=
> +MULTILIB_OSDIRNAMES := 
> $(MULTILIB_OSDIRNAMES)!mipsel-r6-hard$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64r6/mabi=64/EL/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r6/mabi.64/EL/mnan.2008=
> +MULTILIB_OSDIRNAMES := 
> $(MULTILIB_OSDIRNAMES)!mipsel-r6-hard$(is_newlib)/lib64
> +
> +MULTILIB_REQUIRED   += mips32r6/mabi=32/EL/msoft-float/mnan=2008
> +MULTILIB_OSDIRNAMES += mips32r6/mabi.32/EL/msoft-float/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mipsel-r6-soft$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32r6/mabi.32/EL/msoft-float/mnan.2008=mips64r6
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)/mabi.32/EL/msoft-float/mnan.2008
> +MULTILIB_REQUIRED   += mips64r6/mabi=n32/EL/msoft-float/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r6/mabi.n32/EL/msoft-float/mnan.2008=
> +MULTILIB_OSDIRNAMES := 
> $(MULTILIB_OSDIRNAMES)!mipsel-r6-soft$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64r6/mabi=64/EL/msoft-float/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r6/mabi.64/EL/msoft-float/mnan.2008=
> +MULTILIB_OSDIRNAMES := 
> $(MULTILIB_OSDIRNAMES)!mipsel-r6-soft$(is_newlib)/lib64
> +
> +# MIPS32R2/MIPS64R2
> +MULTILIB_REQUIRED   += mips32r2/mabi=32/EB
> +MULTILIB_OSDIRNAMES += mips32r2/mabi.32/EB=!mips-r2-hard$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32r2/mabi.32/EB=mips64r2/mabi.32/EB
> +MULTILIB_REQUIRED   += mips64r2/mabi=n32/EB
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.n32/EB=!mips-r2-hard$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64r2/mabi=64/EB
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.64/EB=!mips-r2-hard$(is_newlib)/lib64
> +
> +MULTILIB_REQUIRED   += mips32r2/mabi=32/EB/mnan=2008
> +MULTILIB_OSDIRNAMES += mips32r2/mabi.32/EB/mnan.2008=!mips-r2-hard-nan2008
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32r2/mabi.32/EB/mnan.2008=
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)mips64r2/mabi.32/EB/mnan.2008
> +MULTILIB_REQUIRED   += mips64r2/mabi=n32/EB/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.n32/EB/mnan.2008=!mips-r2-hard-nan2008
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64r2/mabi=64/EB/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.64/EB/mnan.2008=!mips-r2-hard-nan2008
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib64
> +
> +MULTILIB_REQUIRED   += mips32r2/mabi=32/EB/msoft-float
> +MULTILIB_OSDIRNAMES += mips32r2/mabi.32/EB/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r2-soft$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32r2/mabi.32/EB/msoft-float=
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)mips64r2/mabi.32/EB/msoft-float
> +MULTILIB_REQUIRED   += mips64r2/mabi=n32/EB/msoft-float
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.n32/EB/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r2-soft$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64r2/mabi=64/EB/msoft-float
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.64/EB/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r2-soft$(is_newlib)/lib64
> +
> +MULTILIB_REQUIRED   += mips32r2/mabi=32/EL
> +MULTILIB_OSDIRNAMES += mips32r2/mabi.32/EL=!mipsel-r2-hard$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32r2/mabi.32/EL=mips64r2/mabi.32/EL
> +MULTILIB_REQUIRED   += mips64r2/mabi=n32/EL
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.n32/EL=!mipsel-r2-hard$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64r2/mabi=64/EL
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.64/EL=!mipsel-r2-hard$(is_newlib)/lib64
> +
> +MULTILIB_REQUIRED   += mips32r2/mabi=32/EL/mnan=2008
> +MULTILIB_OSDIRNAMES += mips32r2/mabi.32/EL/mnan.2008=!mipsel-r2-hard-nan2008
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32r2/mabi.32/EL/mnan.2008=
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)mips64r2/mabi.32/EL/mnan.2008
> +MULTILIB_REQUIRED   += mips64r2/mabi=n32/EL/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.n32/EL/mnan.2008=!mipsel-r2-hard-nan2008
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64r2/mabi=64/EL/mnan=2008
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.64/EL/mnan.2008=!mipsel-r2-hard-nan2008
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib64
> +
> +MULTILIB_REQUIRED   += mips32r2/mabi=32/EL/msoft-float
> +MULTILIB_OSDIRNAMES += mips32r2/mabi.32/EL/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mipsel-r2-soft$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32r2/mabi.32/EL/msoft-float=
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)mips64r2/mabi.32/EL/msoft-float
> +MULTILIB_REQUIRED   += mips64r2/mabi=n32/EL/msoft-float
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.n32/EL/msoft-float=
> +MULTILIB_OSDIRNAMES := 
> $(MULTILIB_OSDIRNAMES)!mipsel-r2-soft$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64r2/mabi=64/EL/msoft-float
> +MULTILIB_OSDIRNAMES += mips64r2/mabi.64/EL/msoft-float=
> +MULTILIB_OSDIRNAMES := 
> $(MULTILIB_OSDIRNAMES)!mipsel-r2-soft$(is_newlib)/lib64
> +
> +# MIPS16 - We will not include any 64 bit mips16 combinations.
> +MULTILIB_REQUIRED   += mips32r2/mips16/mabi=32/EB
> +MULTILIB_OSDIRNAMES += mips32r2/mips16/mabi.32/EB=!mips-r2-mips16-hard
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +MULTILIB_REQUIRED   += mips32r2/mips16/mabi=32/EB/mnan=2008
> +MULTILIB_OSDIRNAMES += mips32r2/mips16/mabi.32/EB/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r2-mips16-hard-nan2008
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +MULTILIB_REQUIRED   += mips32r2/mips16/mabi=32/EB/msoft-float
> +MULTILIB_OSDIRNAMES += mips32r2/mips16/mabi.32/EB/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r2-mips16-soft
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +
> +MULTILIB_REQUIRED   += mips32r2/mips16/mabi=32/EL
> +MULTILIB_OSDIRNAMES += mips32r2/mips16/mabi.32/EL=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mipsel-r2-mips16-hard
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +MULTILIB_REQUIRED   += mips32r2/mips16/mabi=32/EL/mnan=2008
> +MULTILIB_OSDIRNAMES += mips32r2/mips16/mabi.32/EL/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mipsel-r2-mips16-hard-nan2008
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +MULTILIB_REQUIRED   += mips32r2/mips16/mabi=32/EL/msoft-float
> +MULTILIB_OSDIRNAMES += mips32r2/mips16/mabi.32/EL/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mipsel-r2-mips16-soft
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +
> +# microMIPS32R2 - We will not include any 64 bit microMIPS combinations
> +MULTILIB_REQUIRED   += mips32r2/mmicromips/mabi=32/EB/mnan=2008
> +MULTILIB_OSDIRNAMES += mips32r2/mmicromips/mabi.32/EB/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!micromips-r2-hard-nan2008
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +MULTILIB_REQUIRED   += mips32r2/mmicromips/mabi=32/EB/msoft-float
> +MULTILIB_OSDIRNAMES += mips32r2/mmicromips/mabi.32/EB/msoft-float=
> +MULTILIB_OSDIRNAMES := 
> $(MULTILIB_OSDIRNAMES)!micromips-r2-soft$(is_newlib)/lib
> +
> +MULTILIB_REQUIRED   += mips32r2/mmicromips/mabi=32/EL/mnan=2008
> +MULTILIB_OSDIRNAMES += mips32r2/mmicromips/mabi.32/EL/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!micromipsel-r2-hard-nan2008
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +MULTILIB_REQUIRED   += mips32r2/mmicromips/mabi=32/EL/msoft-float
> +MULTILIB_OSDIRNAMES += mips32r2/mmicromips/mabi.32/EL/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!micromipsel-r2-soft
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +
> +# Version 1 multilibs
> +
> +MULTILIB_REQUIRED   += mips32/mabi=32/EB
> +MULTILIB_OSDIRNAMES += mips32/mabi.32/EB=!mips-r1-hard$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32/mabi.32/EB=mips64/mabi.32/EB
> +MULTILIB_REQUIRED   += mips64/mabi=n32/EB
> +MULTILIB_OSDIRNAMES += mips64/mabi.n32/EB=!mips-r1-hard$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64/mabi=64/EB
> +MULTILIB_OSDIRNAMES += mips64/mabi.64/EB=!mips-r1-hard$(is_newlib)/lib64
> +
> +MULTILIB_REQUIRED   += mips32/mabi=32/EB/msoft-float
> +MULTILIB_OSDIRNAMES += mips32/mabi.32/EB/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r1-soft$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32/mabi.32/EB/msoft-float=
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)mips64/mabi.32/EB/msoft-float
> +MULTILIB_REQUIRED   += mips64/mabi=n32/EB/msoft-float
> +MULTILIB_OSDIRNAMES += mips64/mabi.n32/EB/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r1-soft$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64/mabi=64/EB/msoft-float
> +MULTILIB_OSDIRNAMES += mips64/mabi.64/EB/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r1-soft$(is_newlib)/lib64
> +
> +MULTILIB_REQUIRED   += mips32/mabi=32/EL
> +MULTILIB_OSDIRNAMES += mips32/mabi.32/EL=!mipsel-r1-hard$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32/mabi.32/EL=mips64/mabi.32/EL
> +MULTILIB_REQUIRED   += mips64/mabi=n32/EL
> +MULTILIB_OSDIRNAMES += mips64/mabi.n32/EL=!mipsel-r1-hard$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64/mabi=64/EL
> +MULTILIB_OSDIRNAMES += mips64/mabi.64/EL=!mipsel-r1-hard$(is_newlib)/lib64
> +
> +MULTILIB_REQUIRED   += mips32/mabi=32/EL/msoft-float
> +MULTILIB_OSDIRNAMES += mips32/mabi.32/EL/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mipsel-r1-soft$(is_newlib)/lib
> +MULTILIB_REUSE      += mips32/mabi.32/EL/msoft-float=
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)mips64/mabi.32/EL/msoft-float
> +MULTILIB_REQUIRED   += mips64/mabi=n32/EL/msoft-float
> +MULTILIB_OSDIRNAMES += mips64/mabi.n32/EL/msoft-float=
> +MULTILIB_OSDIRNAMES := 
> $(MULTILIB_OSDIRNAMES)!mipsel-r1-soft$(is_newlib)/lib32
> +MULTILIB_REQUIRED   += mips64/mabi=64/EL/msoft-float
> +MULTILIB_OSDIRNAMES += mips64/mabi.64/EL/msoft-float=
> +MULTILIB_OSDIRNAMES := 
> $(MULTILIB_OSDIRNAMES)!mipsel-r1-soft$(is_newlib)/lib64
> +
> +# We will not include any 64 bit mips16 combinations.
> +MULTILIB_REQUIRED   += mips32/mips16/mabi=32/EB
> +MULTILIB_OSDIRNAMES += mips32/mips16/mabi.32/EB=!mips-r1-mips16-hard
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +MULTILIB_REQUIRED   += mips32/mips16/mabi=32/EB/msoft-float
> +MULTILIB_OSDIRNAMES += 
> mips32/mips16/mabi.32/EB/msoft-float=!mips-r1-mips16-soft
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +
> +MULTILIB_REQUIRED   += mips32/mips16/mabi=32/EL
> +MULTILIB_OSDIRNAMES += mips32/mips16/mabi.32/EL=!mipsel-r1-mips16-hard
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +MULTILIB_REQUIRED   += mips32/mips16/mabi=32/EL/msoft-float
> +MULTILIB_OSDIRNAMES += mips32/mips16/mabi.32/EL/msoft-float=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mipsel-r1-mips16-soft
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)$(is_newlib)/lib
> +
> +# Uclibc variants
> +MULTILIB_REQUIRED   += muclibc/mips32r2/mabi=32/EB
> +MULTILIB_OSDIRNAMES += muclibc/mips32r2/mabi.32/EB=!mips-r2-hard-uclibc/lib
> +MULTILIB_REUSE      += 
> muclibc/mips32r2/mabi.32/EB=muclibc/mips64r2/mabi.32/EB
> +MULTILIB_REQUIRED   += muclibc/mips32r2/mabi=32/EB/mnan=2008
> +MULTILIB_OSDIRNAMES += muclibc/mips32r2/mabi.32/EB/mnan.2008=
> +MULTILIB_OSDIRNAMES := $(MULTILIB_OSDIRNAMES)!mips-r2-hard-nan2008-uclibc/lib
> +MULTILIB_REUSE      += muclibc/mips32r2/mabi.32/EB/mnan.2008=
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)muclibc/mips64r2/mabi.32/EB/mnan.2008
> +
> +MULTILIB_REQUIRED   += muclibc/mips32r2/mabi=32/EL
> +MULTILIB_OSDIRNAMES += muclibc/mips32r2/mabi.32/EL=!mipsel-r2-hard-uclibc/lib
> +MULTILIB_REUSE      += 
> muclibc/mips32r2/mabi.32/EL=muclibc/mips64r2/mabi.32/EL
> +MULTILIB_REQUIRED   += muclibc/mips32r2/mabi=32/EL/mnan=2008
> +MULTILIB_OSDIRNAMES += muclibc/mips32r2/mabi.32/EL/mnan.2008=
> +MULTILIB_OSDIRNAMES := 
> $(MULTILIB_OSDIRNAMES)!mipsel-r2-hard-nan2008-uclibc/lib
> +MULTILIB_REUSE      += muclibc/mips32r2/mabi.32/EL/mnan.2008=
> +MULTILIB_REUSE      := $(MULTILIB_REUSE)muclibc/mips64r2/mabi.32/EL/mnan.2008
> diff --git a/gcc/config/mips/t-mti-elf b/gcc/config/mips/t-mti-elf
> deleted file mode 100644
> index 3f20d1150fc..00000000000
> --- a/gcc/config/mips/t-mti-elf
> +++ /dev/null
> @@ -1,48 +0,0 @@
> -# Copyright (C) 2012-2026 Free Software Foundation, Inc.
> -#
> -# This file is part of GCC.
> -#
> -# GCC is free software; you can redistribute it and/or modify
> -# it under the terms of the GNU General Public License as published by
> -# the Free Software Foundation; either version 3, or (at your option)
> -# any later version.
> -#
> -# GCC is distributed in the hope that it will be useful,
> -# but WITHOUT ANY WARRANTY; without even the implied warranty of
> -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -# GNU General Public License for more details.
> -#
> -# You should have received a copy of the GNU General Public License
> -# along with GCC; see the file COPYING3.  If not see
> -# <http://www.gnu.org/licenses/>.
> -
> -# The default build is mips32r2, hard-float big-endian.  Add mips32,
> -# soft-float, and little-endian variations.
> -
> -MULTILIB_OPTIONS = mips32/mips64/mips64r2 mips16/mmicromips mabi=64 EL 
> msoft-float mnan=2008
> -MULTILIB_DIRNAMES = mips32 mips64 mips64r2 mips16 micromips 64 el sof nan2008
> -MULTILIB_MATCHES = EL=mel EB=meb mips32r2=mips32r3 mips32r2=mips32r5 
> mips64r2=mips64r3 mips64r2=mips64r5
> -
> -# The 64 bit ABI is not supported on the mips32 architecture.
> -MULTILIB_EXCEPTIONS += *mips32*/*mabi=64*
> -
> -# The 64 bit ABI is not supported on the mips32r2 architecture.
> -# Because mips32r2 is the default we can't use that flag to trigger
> -# the exception so we check for mabi=64 with no specific mips
> -# architecture flag instead.
> -MULTILIB_EXCEPTIONS += mabi=64*
> -
> -# We do not want to build mips16 versions of mips64* architectures.
> -MULTILIB_EXCEPTIONS += *mips64*/*mips16*
> -MULTILIB_EXCEPTIONS += *mips16/mabi=64*
> -
> -# We only want micromips for mips32r2 architecture.
> -MULTILIB_EXCEPTIONS += *mips32/mmicromips*
> -MULTILIB_EXCEPTIONS += *mips64*/mmicromips*
> -MULTILIB_EXCEPTIONS += *mmicromips/mabi=64*
> -
> -# We do not want nan2008 libraries for soft-float,
> -# mips32[r1], or mips64[r1].
> -MULTILIB_EXCEPTIONS += *msoft-float*/*mnan=2008*
> -MULTILIB_EXCEPTIONS += *mips32/*mnan=2008*
> -MULTILIB_EXCEPTIONS += *mips64/*mnan=2008*
> diff --git a/gcc/config/mips/t-mti-linux b/gcc/config/mips/t-mti-linux
> deleted file mode 100644
> index 55026a30387..00000000000
> --- a/gcc/config/mips/t-mti-linux
> +++ /dev/null
> @@ -1,158 +0,0 @@
> -# Copyright (C) 2012-2026 Free Software Foundation, Inc.
> -#
> -# This file is part of GCC.
> -#
> -# GCC is free software; you can redistribute it and/or modify
> -# it under the terms of the GNU General Public License as published by
> -# the Free Software Foundation; either version 3, or (at your option)
> -# any later version.
> -#
> -# GCC is distributed in the hope that it will be useful,
> -# but WITHOUT ANY WARRANTY; without even the implied warranty of
> -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -# GNU General Public License for more details.
> -#
> -# You should have received a copy of the GNU General Public License
> -# along with GCC; see the file COPYING3.  If not see
> -# <http://www.gnu.org/licenses/>.
> -
> -# The default build is mips32r2, hard-float big-endian.  Add mips32,
> -# soft-float, and little-endian variations.
> -
> -MULTILIB_OPTIONS = mips32/mips64/mips64r2 mips16/mmicromips mabi=64 EL 
> msoft-float mnan=2008
> -MULTILIB_DIRNAMES = mips32 mips64 mips64r2 mips16 micromips 64 el sof nan2008
> -MULTILIB_MATCHES = EL=mel EB=meb mips32r2=mips32r3 mips32r2=mips32r5 
> mips64r2=mips64r3 mips64r2=mips64r5
> -
> -MULTILIB_REQUIRED    =
> -MULTILIB_OSDIRNAMES  = .=mips-r2-hard/lib
> -MULTILIB_REQUIRED   += mips64r2
> -MULTILIB_OSDIRNAMES += mips64r2=!mips-r2-hard/lib32
> -MULTILIB_REQUIRED   += mips64r2/mabi=64
> -MULTILIB_OSDIRNAMES += mips64r2/mabi.64=!mips-r2-hard/lib64
> -
> -MULTILIB_REQUIRED   += mnan=2008
> -MULTILIB_OSDIRNAMES += mnan.2008=!mips-r2-hard-nan2008/lib
> -MULTILIB_REQUIRED   += mips64r2/mnan=2008
> -MULTILIB_OSDIRNAMES += mips64r2/mnan.2008=!mips-r2-hard-nan2008/lib32
> -MULTILIB_REQUIRED   += mips64r2/mabi=64/mnan=2008
> -MULTILIB_OSDIRNAMES += mips64r2/mabi.64/mnan.2008=!mips-r2-hard-nan2008/lib64
> -
> -MULTILIB_REQUIRED   += msoft-float
> -MULTILIB_OSDIRNAMES += msoft-float=!mips-r2-soft/lib
> -MULTILIB_REQUIRED   += mips64r2/msoft-float
> -MULTILIB_OSDIRNAMES += mips64r2/msoft-float=!mips-r2-soft/lib32
> -MULTILIB_REQUIRED   += mips64r2/mabi=64/msoft-float
> -MULTILIB_OSDIRNAMES += mips64r2/mabi.64/msoft-float=!mips-r2-soft/lib64
> -
> -#MULTILIB_REQUIRED   += msoft-float/mnan=2008
> -#MULTILIB_OSDIRNAMES += msoft-float/mnan.2008=!mips-r2-soft-nan2008/lib
> -#MULTILIB_REQUIRED   += mips64r2/msoft-float/mnan=2008
> -#MULTILIB_OSDIRNAMES += 
> mips64r2/msoft-float/mnan.2008=!mips-r2-soft-nan2008/lib32
> -#MULTILIB_REQUIRED   += mips64r2/mabi=64/msoft-float/mnan=2008
> -#MULTILIB_OSDIRNAMES += 
> mips64r2/mabi.64/msoft-float/mnan.2008=!mips-r2-soft-nan2008/lib64
> -
> -MULTILIB_REQUIRED   += EL
> -MULTILIB_OSDIRNAMES += EL=!mipsel-r2-hard/lib
> -MULTILIB_REQUIRED   += mips64r2/EL
> -MULTILIB_OSDIRNAMES += mips64r2/EL=!mipsel-r2-hard/lib32
> -MULTILIB_REQUIRED   += mips64r2/mabi=64/EL
> -MULTILIB_OSDIRNAMES += mips64r2/mabi.64/EL=!mipsel-r2-hard/lib64
> -
> -MULTILIB_REQUIRED   += EL/mnan=2008
> -MULTILIB_OSDIRNAMES += EL/mnan.2008=!mipsel-r2-hard-nan2008/lib
> -MULTILIB_REQUIRED   += mips64r2/EL/mnan=2008
> -MULTILIB_OSDIRNAMES += mips64r2/EL/mnan.2008=!mipsel-r2-hard-nan2008/lib32
> -MULTILIB_REQUIRED   += mips64r2/mabi=64/EL/mnan=2008
> -MULTILIB_OSDIRNAMES += 
> mips64r2/mabi.64/EL/mnan.2008=!mipsel-r2-hard-nan2008/lib64
> -
> -MULTILIB_REQUIRED   += EL/msoft-float
> -MULTILIB_OSDIRNAMES += EL/msoft-float=!mipsel-r2-soft/lib
> -MULTILIB_REQUIRED   += mips64r2/EL/msoft-float
> -MULTILIB_OSDIRNAMES += mips64r2/EL/msoft-float=!mipsel-r2-soft/lib32
> -MULTILIB_REQUIRED   += mips64r2/mabi=64/EL/msoft-float
> -MULTILIB_OSDIRNAMES += mips64r2/mabi.64/EL/msoft-float=!mipsel-r2-soft/lib64
> -
> -#MULTILIB_REQUIRED   += EL/msoft-float/mnan=2008
> -#MULTILIB_OSDIRNAMES += EL/msoft-float/mnan.2008=!mipsel-r2-soft-nan2008/lib
> -#MULTILIB_REQUIRED   += mips64r2/EL/msoft-float/mnan=2008
> -#MULTILIB_OSDIRNAMES += 
> mips64r2/EL/msoft-float/mnan.2008=!mipsel-r2-soft-nan2008/lib32
> -#MULTILIB_REQUIRED   += mips64r2/mabi=64/EL/msoft-float/mnan=2008
> -#MULTILIB_OSDIRNAMES += 
> mips64r2/mabi.64/EL/msoft-float/mnan.2008=!mipsel-r2-soft-nan2008/lib64
> -
> -# We will not include any 64 bit mips16 combinations.
> -MULTILIB_REQUIRED   += mips16
> -MULTILIB_OSDIRNAMES += mips16=!mips-r2-mips16-hard/lib
> -MULTILIB_REQUIRED   += mips16/mnan=2008
> -MULTILIB_OSDIRNAMES += mips16/mnan.2008=!mips-r2-mips16-hard-nan2008/lib
> -MULTILIB_REQUIRED   += mips16/msoft-float
> -MULTILIB_OSDIRNAMES += mips16/msoft-float=!mips-r2-mips16-soft/lib
> -#MULTILIB_REQUIRED   += mips16/msoft-float/mnan=2008
> -#MULTILIB_OSDIRNAMES += 
> mips16/msoft-float/mnan.2008=!mips-r2-mips16-soft-nan2008/lib
> -
> -MULTILIB_REQUIRED   += mips16/EL
> -MULTILIB_OSDIRNAMES += mips16/EL=!mipsel-r2-mips16-hard/lib
> -MULTILIB_REQUIRED   += mips16/EL/mnan=2008
> -MULTILIB_OSDIRNAMES += mips16/EL/mnan.2008=!mipsel-r2-mips16-hard-nan2008/lib
> -MULTILIB_REQUIRED   += mips16/EL/msoft-float
> -MULTILIB_OSDIRNAMES += mips16/EL/msoft-float=!mipsel-r2-mips16-soft/lib
> -#MULTILIB_REQUIRED   += mips16/EL/msoft-float/mnan=2008
> -#MULTILIB_OSDIRNAMES += 
> mips16/EL/msoft-float/mnan.2008=!mipsel-r2-mips16-soft-nan2008/lib
> -
> -MULTILIB_REQUIRED   += mmicromips
> -MULTILIB_OSDIRNAMES += mmicromips=!micromips-r2-hard/lib
> -MULTILIB_REQUIRED   += mmicromips/mnan=2008
> -MULTILIB_OSDIRNAMES += mmicromips/mnan.2008=!micromips-r2-hard-nan2008/lib
> -MULTILIB_REQUIRED   += mmicromips/msoft-float
> -MULTILIB_OSDIRNAMES += mmicromips/msoft-float=!micromips-r2-soft/lib
> -#MULTILIB_REQUIRED   += mmicromips/msoft-float/mnan=2008
> -#MULTILIB_OSDIRNAMES += 
> mmicromips/msoft-float/mnan.2008=!micromips-r2-soft-nan2008/lib
> -
> -MULTILIB_REQUIRED   += mmicromips/EL
> -MULTILIB_OSDIRNAMES += mmicromips/EL=!micromipsel-r2-hard/lib
> -MULTILIB_REQUIRED   += mmicromips/EL/mnan=2008
> -MULTILIB_OSDIRNAMES += 
> mmicromips/EL/mnan.2008=!micromipsel-r2-hard-nan2008/lib
> -MULTILIB_REQUIRED   += mmicromips/EL/msoft-float
> -MULTILIB_OSDIRNAMES += mmicromips/EL/msoft-float=!micromipsel-r2-soft/lib
> -#MULTILIB_REQUIRED   += mmicromips/EL/msoft-float/mnan=2008
> -#MULTILIB_OSDIRNAMES += 
> mmicromips/EL/msoft-float/mnan.2008=!micromipsel-r2-soft-nan2008/lib
> -
> -# Version 1 multilibs
> -
> -MULTILIB_REQUIRED   += mips32
> -MULTILIB_OSDIRNAMES += mips32=!mips-r1-hard/lib
> -MULTILIB_REQUIRED   += mips64
> -MULTILIB_OSDIRNAMES += mips64=!mips-r1-hard/lib32
> -MULTILIB_REQUIRED   += mips64/mabi=64
> -MULTILIB_OSDIRNAMES += mips64/mabi.64=!mips-r1-hard/lib64
> -
> -MULTILIB_REQUIRED   += mips32/msoft-float
> -MULTILIB_OSDIRNAMES += mips32/msoft-float=!mips-r1-soft/lib
> -MULTILIB_REQUIRED   += mips64/msoft-float
> -MULTILIB_OSDIRNAMES += mips64/msoft-float=!mips-r1-soft/lib32
> -MULTILIB_REQUIRED   += mips64/mabi=64/msoft-float
> -MULTILIB_OSDIRNAMES += mips64/mabi.64/msoft-float=!mips-r1-soft/lib64
> -
> -MULTILIB_REQUIRED   += mips32/EL
> -MULTILIB_OSDIRNAMES += mips32/EL=!mipsel-r1-hard/lib
> -MULTILIB_REQUIRED   += mips64/EL
> -MULTILIB_OSDIRNAMES += mips64/EL=!mipsel-r1-hard/lib32
> -MULTILIB_REQUIRED   += mips64/mabi=64/EL
> -MULTILIB_OSDIRNAMES += mips64/mabi.64/EL=!mipsel-r1-hard/lib64
> -
> -MULTILIB_REQUIRED   += mips32/EL/msoft-float
> -MULTILIB_OSDIRNAMES += mips32/EL/msoft-float=!mipsel-r1-soft/lib
> -MULTILIB_REQUIRED   += mips64/EL/msoft-float
> -MULTILIB_OSDIRNAMES += mips64/EL/msoft-float=!mipsel-r1-soft/lib32
> -MULTILIB_REQUIRED   += mips64/mabi=64/EL/msoft-float
> -MULTILIB_OSDIRNAMES += mips64/mabi.64/EL/msoft-float=!mipsel-r1-soft/lib64
> -
> -# We will not include any 64 bit mips16 combinations.
> -MULTILIB_REQUIRED   += mips32/mips16
> -MULTILIB_OSDIRNAMES += mips32/mips16=!mips-r1-mips16-hard/lib
> -MULTILIB_REQUIRED   += mips32/mips16/msoft-float
> -MULTILIB_OSDIRNAMES += mips32/mips16/msoft-float=!mips-r1-mips16-soft/lib
> -
> -MULTILIB_REQUIRED   += mips32/mips16/EL
> -MULTILIB_OSDIRNAMES += mips32/mips16/EL=!mipsel-r1-mips16-hard/lib
> -MULTILIB_REQUIRED   += mips32/mips16/EL/msoft-float
> -MULTILIB_OSDIRNAMES += 
> mips32/mips16/EL/msoft-float=!mipsel-r1-mips16-soft/lib
> diff --git a/gcc/configure.tgt b/gcc/configure.tgt
> index 04da2cbd4b0..6bdae128cb0 100644
> --- a/gcc/configure.tgt
> +++ b/gcc/configure.tgt
> @@ -18,3 +18,12 @@
>   # autoconf generated configure script.  Putting it in a separate shell file
>   # lets us skip running autoconf when modifying target specific information.
>   
> +# Select default multilib build variants
> +if test x${with_multi_buildlist} = x ; then
> +  case "$target" in
> +    mips*-img-linux*) 
> with_multi_buildlist=${topsrcdir}/gcc/config/mips/ml-img-linux ;;
> +    mips*-mti-linux*) 
> with_multi_buildlist=${topsrcdir}/gcc/config/mips/ml-mti-linux ;;
> +    mips*-img-elf*) 
> with_multi_buildlist=${topsrcdir}/gcc/config/mips/ml-img-elf ;;
> +    mips*-mti-elf*) 
> with_multi_buildlist=${topsrcdir}/gcc/config/mips/ml-mti-elf ;;
> +  esac
> +fi

Reply via email to