GNU binutils support the selection of the default MIPS subtarget via the 
configuration triplet, e.g. `mips64octeon+el-unknown-linux-gnu' builds a
Linux/GNU 64-bit MIPS (n32 ABI) little-endian configuration with the CPU 
set to Octeon+ by default.  However `config.sub' rejects such a triplet 
and indeed it only lets through a random choice of ones people submitted 
changes for to support.

There is a large number of MIPS CPU configurations, 118 at the moment, 
that GNU binutils know, so rather than adding them individually and then 
hoping it will be kept up to date from now on accept any `mips*' pattern 
for the machine part, just as we already do for a few of other targets.

        * config.sub: Allow any `mips*' CPU rather than listing a choice 
        individually.
        * doc/config.sub.1: Regenerate.
        * testsuite/config-sub.data: Add test cases.
---
 config.sub                |   28 ++--------------------------
 doc/config.sub.1          |    2 +-
 testsuite/config-sub.data |    6 ++++++
 3 files changed, 9 insertions(+), 27 deletions(-)

config-mips-all.diff
Index: config/config.sub
===================================================================
--- config.orig/config.sub
+++ config/config.sub
@@ -4,7 +4,7 @@
 
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 
-timestamp='2023-06-26'
+timestamp='2023-07-31'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -1214,31 +1214,7 @@ case $cpu-$vendor in
                        | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
                        | m88110 | m88k | maxq | mb | mcore | mep | metag \
                        | microblaze | microblazeel \
-                       | mips | mipsbe | mipseb | mipsel | mipsle \
-                       | mips16 \
-                       | mips64 | mips64eb | mips64el \
-                       | mips64octeon | mips64octeonel \
-                       | mips64orion | mips64orionel \
-                       | mips64r5900 | mips64r5900el \
-                       | mips64vr | mips64vrel \
-                       | mips64vr4100 | mips64vr4100el \
-                       | mips64vr4300 | mips64vr4300el \
-                       | mips64vr5000 | mips64vr5000el \
-                       | mips64vr5900 | mips64vr5900el \
-                       | mipsisa32 | mipsisa32el \
-                       | mipsisa32r2 | mipsisa32r2el \
-                       | mipsisa32r3 | mipsisa32r3el \
-                       | mipsisa32r5 | mipsisa32r5el \
-                       | mipsisa32r6 | mipsisa32r6el \
-                       | mipsisa64 | mipsisa64el \
-                       | mipsisa64r2 | mipsisa64r2el \
-                       | mipsisa64r3 | mipsisa64r3el \
-                       | mipsisa64r5 | mipsisa64r5el \
-                       | mipsisa64r6 | mipsisa64r6el \
-                       | mipsisa64sb1 | mipsisa64sb1el \
-                       | mipsisa64sr71k | mipsisa64sr71kel \
-                       | mipsr5900 | mipsr5900el \
-                       | mipstx39 | mipstx39el \
+                       | mips* \
                        | mmix \
                        | mn10200 | mn10300 \
                        | moxie \
Index: config/doc/config.sub.1
===================================================================
--- config.orig/doc/config.sub.1
+++ config/doc/config.sub.1
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.48.5.
-.TH CONFIG.SUB "1" "July 2023" "GNU config.sub (2023-06-26)" "User Commands"
+.TH CONFIG.SUB "1" "July 2023" "GNU config.sub (2023-07-31)" "User Commands"
 .SH NAME
 config.sub \- validate and canonicalize a configuration triplet
 .SH SYNOPSIS
Index: config/testsuite/config-sub.data
===================================================================
--- config.orig/testsuite/config-sub.data
+++ config/testsuite/config-sub.data
@@ -406,6 +406,10 @@ mips64                                             
mips64-unknown-elf
 mips64eb                                       mips64eb-unknown-elf
 mips64el                                       mips64el-unknown-elf
 mips64octeon                                   mips64octeon-unknown-elf
+mips64octeon+                                  mips64octeon+-unknown-elf
+mips64octeon+-elf                              mips64octeon+-unknown-elf
+mips64octeon+el                                        
mips64octeon+el-unknown-elf
+mips64octeon+el-elf                            mips64octeon+el-unknown-elf
 mips64octeon-elf                               mips64octeon-unknown-elf
 mips64octeonel                                 mips64octeonel-unknown-elf
 mips64octeonel-elf                             mips64octeonel-unknown-elf
@@ -430,6 +434,8 @@ mips64vrel                                  
mips64vrel-unknown-elf
 mipsbe                                         mipsbe-unknown-elf
 mipseb                                         mipseb-unknown-elf
 mipsel                                         mipsel-unknown-elf
+mipsinteraptiv                                 mipsinteraptiv-unknown-elf
+mipsinteraptivel                               mipsinteraptivel-unknown-elf
 mipsisa32                                      mipsisa32-unknown-elf
 mipsisa32el                                    mipsisa32el-unknown-elf
 mipsisa32r2                                    mipsisa32r2-unknown-elf

Reply via email to