]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
MIPS: Use N64 by default for mips*64*-*-linux-gnuabi64
authorYunQiang Su <syq@gcc.gnu.org>
Fri, 12 Jul 2024 10:18:59 +0000 (18:18 +0800)
committerYunQiang Su <syq@debian.org>
Fri, 12 Jul 2024 10:19:27 +0000 (18:19 +0800)
the ABI section of the triple explicitly asks for N64,
and in fact GCC also does so.

It can fix the test failure:
  FAIL: libdep test: did not get expected output from the linker
with Debian's mipsisa64r6el-linux-gnuabi64 toolchain.

gas/configure
gas/configure.ac
ld/configure.tgt
ld/testsuite/config/default.exp

index 0cebc4e0fa9e4b5eb385962f4e6593e8ca7d3dda..4a6d4721cc438fdd3ceb466a17833eaeca5347f6 100755 (executable)
@@ -12280,7 +12280,7 @@ _ACEOF
        esac
        # Decide which ABI to target by default.
        case ${target} in
-         mips64*-openbsd* | mips64*-linux-gnuabi64)
+         mips64*-openbsd* | mips*64*-linux-gnuabi64)
            mips_default_abi=N64_ABI
            ;;
          mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \
index 6b978aae3f75288621c4a68e3e4ab9932b348485..20939b660c2703b2cbf5e89b98d3457f6cdfc6d6 100644 (file)
@@ -399,7 +399,7 @@ changequote([,])dnl
        esac
        # Decide which ABI to target by default.
        case ${target} in
-         mips64*-openbsd* | mips64*-linux-gnuabi64)
+         mips64*-openbsd* | mips*64*-linux-gnuabi64)
            mips_default_abi=N64_ABI
            ;;
          mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \
index f937f78b876a70f2d8eba4bf50d24ee8fe4946ec..44079ae2792a912509835835e221e92d9af4716e 100644 (file)
@@ -592,7 +592,7 @@ mips*-*-vxworks*)   targ_emul=elf32ebmipvxworks
                        ;;
 mips*-*-windiss)       targ_emul=elf32mipswindiss
                        ;;
-mips64*el-*-linux-gnuabi64)
+mips*64*el-*-linux-gnuabi64)
                        targ_emul=elf64ltsmip
                        targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip"
                        targ_extra_libpath=$targ_extra_emuls
@@ -601,7 +601,7 @@ mips64*el-*-linux-*)        targ_emul=elf32ltsmipn32
                        targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
                        targ_extra_libpath=$targ_extra_emuls
                        ;;
-mips64*-*-linux-gnuabi64)
+mips*64*-*-linux-gnuabi64)
                        targ_emul=elf64btsmip
                        targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip"
                        targ_extra_libpath=$targ_extra_emuls
index 8374920c775b4ef9865a4644a8b3fdda94b2012c..d60f6290083d32465a413a64199293d3d32bb7be 100644 (file)
@@ -177,11 +177,16 @@ if {! [info exists env(CCC_OVERRIDE_OPTIONS)]} {
 # installed, but to the O32 ABI in the build tree, because of some
 # specs-file hacks.  Make sure we use an ABI that is compatible with
 # the one we expect.
-if {[istarget mips64*-*-linux*] &&
+# mips*64*-*linux-gnuabi64 compiler defaults to N64 ABI.
+if {([istarget mips64*-*-linux*] || [istarget mips*64*-*-linux-gnuabi64]) &&
     (![board_info [target_info name] exists multilib_flags] ||
      ![string match "*-mabi" [board_info [target_info name] multilib_flags]])
    } {
-    append gcc_B_opt " -mabi=n32"
+    if { [istarget *-*-gnuabi64] } {
+      append gcc_B_opt " -mabi=64"
+    } else {
+      append gcc_B_opt " -mabi=n32"
+    }
 }
 
 if { [istarget rx-*-*] } {