https://sources.debian.org/patches/binutils/2.33.1-2/mips64-default-n64.diff/ For historical reasons, mips64*-linux-gnu is set as N32, so some distributions like Debian use -gnuabi64 as their ABI section for N64 port. So we should set all mips*64*-linux-gnuabi64 as N64.
The reason change mips64* to mips*64* is that for MIPS r6, we use something like mipsisa64r6el-linux-gnuabi64 Since config.guess and config.sub use it.
https://sources.debian.org/patches/binutils/2.33.90.20200122-2/mips64-default-n64.diff/
we need to fix the testsuite
As to making the default ABI/ISA configurable I would recommend reusing the approach we have taken with GCC, that is to provide `--with-abi=', `--with-arch=', `--with-arch-32=' and `--with-arch-64=' configuration options. This way the toolchain will remain consistent and will not depend on the target triplet in a different way across packages, and also we won't have to invent more and more complicated target triplets to handle new cases as they arise. As I recall this design decision has been discussed a few times over the years. Please note that GAS/LD are low-level tools however and in ordinary use cases they are supposed to be driven by GCC, which will set correct flags according to its configuration and any additional options requested. I'm not therefore sure we need to change the semantics in the first place. What is your use case that requires GAS/LD to be invoked directly rather than via GCC? Cf. PR ld/25494.
(In reply to Maciej W. Rozycki from comment #4) > As to making the default ABI/ISA configurable I would recommend reusing > the approach we have taken with GCC, that is to provide `--with-abi=', > `--with-arch=', `--with-arch-32=' and `--with-arch-64=' configuration > options. This way the toolchain will remain consistent and will not > depend on the target triplet in a different way across packages, and also > we won't have to invent more and more complicated target triplets to > handle new cases as they arise. As I recall this design decision has > been discussed a few times over the years. > > Please note that GAS/LD are low-level tools however and in ordinary use > cases they are supposed to be driven by GCC, which will set correct flags > according to its configuration and any additional options requested. I'm > not therefore sure we need to change the semantics in the first place. > What is your use case that requires GAS/LD to be invoked directly rather > than via GCC? > > Cf. PR ld/25494. Yes. the correct way to invoke as/ld is by gcc, while in the real Linux distributions world, just like Debian, there are so many software invoke as/ld directly. To compatiable with them, we have to make our toolchain in the way as they expect.
FIXED by https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=32f1c80375ebe8ad25d9805ee5889f0006c51e59