[v4] MIPS: Use 64-bit a ABI by default for `mipsisa64*-*-linux*' targets
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_binutils_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-arm |
success
|
Testing passed
|
Commit Message
Following the arrangement in GCC select a 64-bit ABI by default, either
n32 or n64, rather than o32 for `mipsisa64*-*-linux*' targets, just as
with the corresponding `mips64*-*-linux*' targets.
---
bfd/config.bfd | 8 ++++----
binutils/testsuite/binutils-all/mips/mips.exp | 3 ++-
binutils/testsuite/binutils-all/objcopy.exp | 2 +-
binutils/testsuite/binutils-all/remove-relocs-01.d | 2 +-
binutils/testsuite/binutils-all/remove-relocs-04.d | 2 +-
binutils/testsuite/binutils-all/remove-relocs-05.d | 2 +-
binutils/testsuite/binutils-all/remove-relocs-06.d | 2 +-
gas/configure | 6 +++---
gas/configure.ac | 6 +++---
gas/testsuite/gas/mips/compact-eh-eb-7.d | 2 +-
gas/testsuite/gas/mips/compact-eh-el-7.d | 2 +-
ld/configure.tgt | 10 ++++++----
12 files changed, 25 insertions(+), 22 deletions(-)
Comments
YunQiang Su <yunqiang.su@cipunited.com> 于2023年11月17日周五 17:04写道:
>
> Following the arrangement in GCC select a 64-bit ABI by default, either
> n32 or n64, rather than o32 for `mipsisa64*-*-linux*' targets, just as
> with the corresponding `mips64*-*-linux*' targets.
> ---
ping
Hi YunQiang Su,
>> Following the arrangement in GCC select a 64-bit ABI by default, either
>> n32 or n64, rather than o32 for `mipsisa64*-*-linux*' targets, just as
>> with the corresponding `mips64*-*-linux*' targets.
>> ---
>
> ping
Sorry - I meant to post that I am leaving this one to Maciej. I am concerned
that changing the target matching for those targets might affect already
existing users who are expecting the old behaviour. I do not know if this is
possible/likely however, so I would prefer to leave the decision to someone
who has much more knowledge of the MIPS target than myself, ie Maciej.
Cheers
Nick
在 2023/11/30 21:40, Nick Clifton 写道:
> Hi YunQiang Su,
>
>>> Following the arrangement in GCC select a 64-bit ABI by default, either
>>> n32 or n64, rather than o32 for `mipsisa64*-*-linux*' targets, just as
>>> with the corresponding `mips64*-*-linux*' targets.
>>> ---
>>
>> ping
>
> Sorry - I meant to post that I am leaving this one to Maciej. I am
> concerned
> that changing the target matching for those targets might affect already
> existing users who are expecting the old behaviour. I do not know if
> this is
> possible/likely however, so I would prefer to leave the decision to someone
> who has much more knowledge of the MIPS target than myself, ie Maciej.
>
https://sourceware.org/pipermail/binutils/2023-August/128758.html
In this post, Maciej suggested that we can limit mips*64-* to
mipsisa64*-linux*.
> Cheers
> Nick
>
YunQiang Su <wzssyqa@gmail.com> 于2023年12月1日周五 08:56写道:
>
>
>
> 在 2023/11/30 21:40, Nick Clifton 写道:
> > Hi YunQiang Su,
> >
> >>> Following the arrangement in GCC select a 64-bit ABI by default, either
> >>> n32 or n64, rather than o32 for `mipsisa64*-*-linux*' targets, just as
> >>> with the corresponding `mips64*-*-linux*' targets.
> >>> ---
> >>
> >> ping
> >
> > Sorry - I meant to post that I am leaving this one to Maciej. I am
> > concerned
> > that changing the target matching for those targets might affect already
> > existing users who are expecting the old behaviour. I do not know if
> > this is
> > possible/likely however, so I would prefer to leave the decision to someone
> > who has much more knowledge of the MIPS target than myself, ie Maciej.
> >
>
> https://sourceware.org/pipermail/binutils/2023-August/128758.html
> In this post, Maciej suggested that we can limit mips*64-* to
> mipsisa64*-linux*.
>
ping.
This config has been in gcc since 2008, with this commit:
f2d6ca5081ba8fb31b5d03545f45cce12ac67b3f
> > Cheers
> > Nick
> >
@@ -956,21 +956,21 @@ case "${targ}" in
targ_defvec=mips_elf32_be_vec
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
;;
- mips64*el-*-linux*-gnuabi64)
+ mips64*el-*-linux*-gnuabi64 | mipsisa64*el-*-linux*-gnuabi64)
targ_defvec=mips_elf64_trad_le_vec
targ_selvecs="mips_elf64_trad_be_vec mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec"
want64=true
;;
- mips64*el-*-linux*)
+ mips64*el-*-linux* | mipsisa64*el-*-linux*)
targ_defvec=mips_elf32_ntrad_le_vec
targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
;;
- mips64*-*-linux*-gnuabi64)
+ mips64*-*-linux*-gnuabi64 | mipsisa64*-*-linux*-gnuabi64)
targ_defvec=mips_elf64_trad_be_vec
targ_selvecs="mips_elf64_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec"
want64=true
;;
- mips64*-*-linux*)
+ mips64*-*-linux* | mipsisa64*-*-linux*)
targ_defvec=mips_elf32_ntrad_be_vec
targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
;;
@@ -121,7 +121,8 @@ set abi_ldflags(eabi) ""
# Override as needed.
if {[istarget *-*-openbsd*] } {
set irixemul 0
-} elseif { [istarget mips64*-*-linux*] } {
+} elseif { [istarget mips64*-*-linux*] \
+ || [istarget mipsisa64*-*-linux*] } {
if [istarget *el-*-*] {
set abi_asflags(o32) -32
set abi_ldflags(o32) -melf32ltsmip
@@ -1276,7 +1276,7 @@ if [is_elf_format] {
run_dump_test "strip-12"
if { [istarget "mips64*-*-openbsd*"] \
- || [istarget "mips64*-*-*-gnuabi64"] } {
+ || [istarget "mipsisa64*-*-*-gnuabi64"] } {
set reloc_format mips64
}
# A relocation type not supported by any target
@@ -2,7 +2,7 @@
#source: remove-relocs-01.s
#objcopy: --remove-relocations=.data.relocs.01
#readelf: -r
-#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64 mipsisa64*-*-*-gnuabi64
Relocation section '\.rela?\.data\.relocs\.02' at offset 0x[0-9a-f]+ contains 3 entries:
.*
@@ -2,7 +2,7 @@
#source: remove-relocs-01.s
#objcopy: --remove-relocations=.data.relocs.0\[12\]
#readelf: -r
-#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64 mipsisa64*-*-*-gnuabi64
Relocation section '\.rela?\.data\.relocs\.03' at offset 0x[0-9a-f]+ contains 3 entries:
.*
@@ -2,7 +2,7 @@
#source: remove-relocs-01.s
#objcopy: --remove-section=.rela.data.relocs.01 --remove-section=.rel.data.relocs.01
#readelf: -r
-#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64 mipsisa64*-*-*-gnuabi64
Relocation section '\.rela?\.data\.relocs\.02' at offset 0x[0-9a-f]+ contains 3 entries:
.*
@@ -2,7 +2,7 @@
#source: remove-relocs-01.s
#objcopy: --remove-relocations=.data.relocs.* --remove-relocations=!.data.relocs.02
#readelf: -r
-#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64 mipsisa64*-*-*-gnuabi64
Relocation section '\.rela?\.data\.relocs\.02' at offset 0x[0-9a-f]+ contains 3 entries:
.*
@@ -12276,11 +12276,11 @@ _ACEOF
esac
# Decide which ABI to target by default.
case ${target} in
- mips64*-openbsd* | mips64*-linux-gnuabi64)
+ mips64*-openbsd* | mips64*-linux-gnuabi64 | mipsisa64*-linux-gnuabi64)
mips_default_abi=N64_ABI
;;
- mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \
- | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*)
+ mips64*-linux* | mipsisa64*-linux* | mips-sgi-irix6* \
+ | mips64*-freebsd* | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*)
mips_default_abi=N32_ABI
;;
mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu)
@@ -394,11 +394,11 @@ changequote([,])dnl
esac
# Decide which ABI to target by default.
case ${target} in
- mips64*-openbsd* | mips64*-linux-gnuabi64)
+ mips64*-openbsd* | mips64*-linux-gnuabi64 | mipsisa64*-linux-gnuabi64)
mips_default_abi=N64_ABI
;;
- mips64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \
- | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*)
+ mips64*-linux* | mipsisa64*-linux* | mips-sgi-irix6* \
+ | mips64*-freebsd* | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*)
mips_default_abi=N32_ABI
;;
mips*-linux* | mips*-freebsd* | mips*-kfreebsd*-gnu)
@@ -2,7 +2,7 @@
#name: Compact EH EB #7 with personality id and fallback FDE
#source: compact-eh-7.s
#as: -EB -mno-pdr
-#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64 mipsisa64*-*-*-gnuabi64
.*: file format.*
@@ -2,7 +2,7 @@
#name: Compact EH EL #7 with personality id and fallback FDE
#source: compact-eh-7.s
#as: -EL -mno-pdr
-#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64
+#notarget: mips64*-*-openbsd* mips64*-*-*-gnuabi64 mipsisa64*-*-*-gnuabi64
.*: file format.*
@@ -587,21 +587,23 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
;;
mips*-*-windiss) targ_emul=elf32mipswindiss
;;
-mips64*el-*-linux-gnuabi64)
+mips64*el-*-linux-gnuabi64 | mipsisa64*el-*-linux-gnuabi64)
targ_emul=elf64ltsmip
targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip"
targ_extra_libpath=$targ_extra_emuls
;;
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
+mips64*el-*-linux-* | mipsisa64*el-*-linux-*)
+ targ_emul=elf32ltsmipn32
targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
targ_extra_libpath=$targ_extra_emuls
;;
-mips64*-*-linux-gnuabi64)
+mips64*-*-linux-gnuabi64 | mipsisa64*-*-linux-gnuabi64)
targ_emul=elf64btsmip
targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip"
targ_extra_libpath=$targ_extra_emuls
;;
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
+mips64*-*-linux-* | mipsisa64*-*-linux-*)
+ targ_emul=elf32btsmipn32
targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
targ_extra_libpath=$targ_extra_emuls
;;