* [PATCH] MIPS: recoginze mipsisa64 as 64bit CPU @ 2023-08-15 10:48 YunQiang Su 2023-08-17 12:36 ` Maciej W. Rozycki 0 siblings, 1 reply; 5+ messages in thread From: YunQiang Su @ 2023-08-15 10:48 UTC (permalink / raw) To: macro; +Cc: binutils, YunQiang Su In GCC, mipsisa64* in triples are recoginzed as 64bit CPU. Let's do the same. The default ABI is determined by the abi section of triples, which is same with the `mips64*' CPU: -gnuabi64 and -openbsd for N64 otherwise, N32. --- bfd/config.bfd | 8 ++++---- gas/configure | 4 ++-- gas/configure.ac | 4 ++-- gold/configure.tgt | 16 +++++++++++++++- ld/configure.tgt | 10 ++++++---- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/bfd/config.bfd b/bfd/config.bfd index 3b39ff36c00..972e847788b 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -941,21 +941,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" ;; diff --git a/gas/configure b/gas/configure index 1b9bf0f83d5..dc6e1ee5f34 100755 --- a/gas/configure +++ b/gas/configure @@ -12256,10 +12256,10 @@ _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*-linux* | mipsisa64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \ | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*) mips_default_abi=N32_ABI ;; diff --git a/gas/configure.ac b/gas/configure.ac index c3bd1178d41..617a5ca1473 100644 --- a/gas/configure.ac +++ b/gas/configure.ac @@ -394,10 +394,10 @@ 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*-linux* | mipsisa64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \ | mips64*-kfreebsd*-gnu | mips64*-ps2-elf*) mips_default_abi=N32_ABI ;; diff --git a/gold/configure.tgt b/gold/configure.tgt index 4b54e08d27f..d09bb76ef02 100644 --- a/gold/configure.tgt +++ b/gold/configure.tgt @@ -153,13 +153,27 @@ aarch64*-*) targ_big_endian=false targ_extra_big_endian=true ;; -mips*el*-*-*|mips*le*-*-*) +mips64*el*-*-* | mipsisa64*le*-*-*) + targ_obj=mips + targ_machine=EM_MIPS_RS3_LE + targ_size=64 + targ_big_endian=false + targ_extra_big_endian=true + ;; +mips*el*-*-*) targ_obj=mips targ_machine=EM_MIPS_RS3_LE targ_size=32 targ_big_endian=false targ_extra_big_endian=true ;; +mips64*-*-* | mipsisa64*-*-*) + targ_obj=mips + targ_machine=EM_MIPS + targ_size=64 + targ_big_endian=true + targ_extra_big_endian=false + ;; mips*-*-*) targ_obj=mips targ_machine=EM_MIPS diff --git a/ld/configure.tgt b/ld/configure.tgt index c62b9581d9b..e1ac1b33d4c 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -580,21 +580,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 ;; -- 2.30.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: recoginze mipsisa64 as 64bit CPU 2023-08-15 10:48 [PATCH] MIPS: recoginze mipsisa64 as 64bit CPU YunQiang Su @ 2023-08-17 12:36 ` Maciej W. Rozycki 2023-08-20 13:53 ` YunQiang Su 0 siblings, 1 reply; 5+ messages in thread From: Maciej W. Rozycki @ 2023-08-17 12:36 UTC (permalink / raw) To: YunQiang Su; +Cc: binutils On Tue, 15 Aug 2023, YunQiang Su wrote: > In GCC, mipsisa64* in triples are recoginzed as 64bit CPU. > Let's do the same. > > The default ABI is determined by the abi section of triples, > which is same with the `mips64*' CPU: > -gnuabi64 and -openbsd for N64 > otherwise, N32. The change description has to be explicit in that we only refer to Linux configurations here, as it doesn't change the semantics of `mipsisa64*' CPUs for other OSes. And it's not that we don't consider the CPU 64-bit for `mipsisa64*-*-linux*' configurations. We just don't use a 64-bit ABI by default. Finally there's no need to repeat the rules for ABI selection as we just follow the existing ones for `mips64*-*-linux*' configurations. How about: MIPS: Use a 64-bit ABI by default for `mipsisa64*-*-linux*' targets 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. then? NB please remember to capitalise the sentence in change headings, whether it's there on its own or prefixed with a subsystem name such as "MIPS:". And use a hyphen in combined number-word adjectives such as "64-bit". > diff --git a/gas/configure.ac b/gas/configure.ac > index c3bd1178d41..617a5ca1473 100644 > --- a/gas/configure.ac > +++ b/gas/configure.ac > @@ -394,10 +394,10 @@ 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*-linux* | mipsisa64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \ These lines overrun 79 columns and need to be wrapped; there's a reason for the existing wrapping. > diff --git a/gold/configure.tgt b/gold/configure.tgt > index 4b54e08d27f..d09bb76ef02 100644 > --- a/gold/configure.tgt > +++ b/gold/configure.tgt > @@ -153,13 +153,27 @@ aarch64*-*) > targ_big_endian=false > targ_extra_big_endian=true > ;; > -mips*el*-*-*|mips*le*-*-*) > +mips64*el*-*-* | mipsisa64*le*-*-*) > + targ_obj=mips > + targ_machine=EM_MIPS_RS3_LE > + targ_size=64 > + targ_big_endian=false > + targ_extra_big_endian=true > + ;; > +mips*el*-*-*) You are removing the `mips*le*-*-*' configuration here. It may well be the right move given that no other binutils component has it, but it has to be a separate change. Also the use of EM_MIPS_RS3_LE has been deprecated since forever, so please don't introduce a new case. I have no idea why the existing case has been accepted into GOLD in the first place as BFD has never emitted it and it was never intended to be used for newly-produced ELF files (the extra MIPS ELF machine type allocation was essentially an accident in the psABI design, it's not even named correctly). NB `mips*el*-*-*' isn't right either, it should be `mips*el-*-*' just as elsewhere, because we'll otherwise take a CPU name with "el" in the middle for the endianness. > targ_obj=mips > targ_machine=EM_MIPS_RS3_LE > targ_size=32 > targ_big_endian=false > targ_extra_big_endian=true > ;; > +mips64*-*-* | mipsisa64*-*-*) > + targ_obj=mips > + targ_machine=EM_MIPS > + targ_size=64 > + targ_big_endian=true > + targ_extra_big_endian=false > + ;; Also you're adding new 64-bit MIPS support to GOLD here, so it has to be a separate patch too from the changes to the other binutils components. Is it a working configuration for GOLD even? Doesn't it need to have `targ_extra_size' also set? Please resubmit with these issues addressed. Maciej ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: recoginze mipsisa64 as 64bit CPU 2023-08-17 12:36 ` Maciej W. Rozycki @ 2023-08-20 13:53 ` YunQiang Su 2023-08-20 15:21 ` Maciej W. Rozycki 0 siblings, 1 reply; 5+ messages in thread From: YunQiang Su @ 2023-08-20 13:53 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: YunQiang Su, binutils Maciej W. Rozycki <macro@orcam.me.uk> 于2023年8月17日周四 20:37写道: > > On Tue, 15 Aug 2023, YunQiang Su wrote: > > > In GCC, mipsisa64* in triples are recoginzed as 64bit CPU. > > Let's do the same. > > > > The default ABI is determined by the abi section of triples, > > which is same with the `mips64*' CPU: > > -gnuabi64 and -openbsd for N64 > > otherwise, N32. > > The change description has to be explicit in that we only refer to Linux > configurations here, as it doesn't change the semantics of `mipsisa64*' > CPUs for other OSes. And it's not that we don't consider the CPU 64-bit > for `mipsisa64*-*-linux*' configurations. We just don't use a 64-bit ABI > by default. Finally there's no need to repeat the rules for ABI selection > as we just follow the existing ones for `mips64*-*-linux*' configurations. > > How about: > > MIPS: Use a 64-bit ABI by default for `mipsisa64*-*-linux*' targets > I use ABIs here, since they are both N32 and/or N64. > 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. > > then? > > NB please remember to capitalise the sentence in change headings, whether > it's there on its own or prefixed with a subsystem name such as "MIPS:". > And use a hyphen in combined number-word adjectives such as "64-bit". > > > diff --git a/gas/configure.ac b/gas/configure.ac > > index c3bd1178d41..617a5ca1473 100644 > > --- a/gas/configure.ac > > +++ b/gas/configure.ac > > @@ -394,10 +394,10 @@ 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*-linux* | mipsisa64*-linux* | mips-sgi-irix6* | mips64*-freebsd* \ > > These lines overrun 79 columns and need to be wrapped; there's a reason > for the existing wrapping. > > > diff --git a/gold/configure.tgt b/gold/configure.tgt > > index 4b54e08d27f..d09bb76ef02 100644 > > --- a/gold/configure.tgt > > +++ b/gold/configure.tgt > > @@ -153,13 +153,27 @@ aarch64*-*) > > targ_big_endian=false > > targ_extra_big_endian=true > > ;; > > -mips*el*-*-*|mips*le*-*-*) > > +mips64*el*-*-* | mipsisa64*le*-*-*) > > + targ_obj=mips > > + targ_machine=EM_MIPS_RS3_LE > > + targ_size=64 > > + targ_big_endian=false > > + targ_extra_big_endian=true > > + ;; > > +mips*el*-*-*) > > You are removing the `mips*le*-*-*' configuration here. It may well be > the right move given that no other binutils component has it, but it has > to be a separate change. > You are right. I will add it back. > Also the use of EM_MIPS_RS3_LE has been deprecated since forever, so > please don't introduce a new case. I have no idea why the existing case > has been accepted into GOLD in the first place as BFD has never emitted it > and it was never intended to be used for newly-produced ELF files (the > extra MIPS ELF machine type allocation was essentially an accident in the > psABI design, it's not even named correctly). > Thank you. I will change it to EM_MIPS. > NB `mips*el*-*-*' isn't right either, it should be `mips*el-*-*' just as > elsewhere, because we'll otherwise take a CPU name with "el" in the middle > for the endianness. > Sure... Let's correct them. > > targ_obj=mips > > targ_machine=EM_MIPS_RS3_LE > > targ_size=32 > > targ_big_endian=false > > targ_extra_big_endian=true > > ;; > > +mips64*-*-* | mipsisa64*-*-*) > > + targ_obj=mips > > + targ_machine=EM_MIPS > > + targ_size=64 > > + targ_big_endian=true > > + targ_extra_big_endian=false > > + ;; > > Also you're adding new 64-bit MIPS support to GOLD here, so it has to be > a separate patch too from the changes to the other binutils components. > Is it a working configuration for GOLD even? Doesn't it need to have In fact, the current configure.tgt makes something wrong, if we configure it with --with-targets=mips64-linux-gnuabi64. https://buildd.debian.org/status/fetch.php?pkg=binutils-mipsen&arch=amd64&ver=10%2Bc5&stamp=1692086940&raw=0 That's why I'd like to put them in a single patch. > `targ_extra_size' also set? > Maybe no. Since `configure.tgt` is used for --enable-targets=xx,yy option. WIth this option, only the list extra targets should be support. If we set it, 32bit targets will be supported anyway. If user wants to support all targets, they need to use --with-targets=all > Please resubmit with these issues addressed. > > Maciej -- YunQiang Su ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: recoginze mipsisa64 as 64bit CPU 2023-08-20 13:53 ` YunQiang Su @ 2023-08-20 15:21 ` Maciej W. Rozycki 2023-08-20 16:00 ` YunQiang Su 0 siblings, 1 reply; 5+ messages in thread From: Maciej W. Rozycki @ 2023-08-20 15:21 UTC (permalink / raw) To: YunQiang Su; +Cc: Ian Lance Taylor, Cary Coutant, YunQiang Su, binutils [Ian, Cary -- please see my notes about GOLD at the end; I'll appreciate your input.] On Sun, 20 Aug 2023, YunQiang Su wrote: > > The change description has to be explicit in that we only refer to Linux > > configurations here, as it doesn't change the semantics of `mipsisa64*' > > CPUs for other OSes. And it's not that we don't consider the CPU 64-bit > > for `mipsisa64*-*-linux*' configurations. We just don't use a 64-bit ABI > > by default. Finally there's no need to repeat the rules for ABI selection > > as we just follow the existing ones for `mips64*-*-linux*' configurations. > > > > How about: > > > > MIPS: Use a 64-bit ABI by default for `mipsisa64*-*-linux*' targets > > > > I use ABIs here, since they are both N32 and/or N64. But only one at a time, hence the singular. You can't have n32 and n64 as the default both at a time (in which case you'd use the plural form). I realise your view might be a consequence from how you express things in your native language, but this is how English grammar works (as how it is the case with many if not all of the European languages, most of which derive from a common ancestor in the Middle East thousands of years ago). NB mind the lowercase "n" in n32 and n64. I realise people started mixing things up later on, but these were the correct spellings as the ABIs were invented (along with o32 and less officially o64) back in 1990s. There's no need to spread the mixed up form. > > > diff --git a/gold/configure.tgt b/gold/configure.tgt > > > index 4b54e08d27f..d09bb76ef02 100644 > > > --- a/gold/configure.tgt > > > +++ b/gold/configure.tgt > > > @@ -153,13 +153,27 @@ aarch64*-*) > > > targ_big_endian=false > > > targ_extra_big_endian=true > > > ;; > > > -mips*el*-*-*|mips*le*-*-*) > > > +mips64*el*-*-* | mipsisa64*le*-*-*) > > > + targ_obj=mips > > > + targ_machine=EM_MIPS_RS3_LE > > > + targ_size=64 > > > + targ_big_endian=false > > > + targ_extra_big_endian=true > > > + ;; > > > +mips*el*-*-*) > > > > You are removing the `mips*le*-*-*' configuration here. It may well be > > the right move given that no other binutils component has it, but it has > > to be a separate change. > > > > You are right. I will add it back. I suggest the opposite, that is to remove it with a separate patch, as it couldn't have been a usable configuration ever. It must have slipped through review. > > > targ_obj=mips > > > targ_machine=EM_MIPS_RS3_LE > > > targ_size=32 > > > targ_big_endian=false > > > targ_extra_big_endian=true > > > ;; > > > +mips64*-*-* | mipsisa64*-*-*) > > > + targ_obj=mips > > > + targ_machine=EM_MIPS > > > + targ_size=64 > > > + targ_big_endian=true > > > + targ_extra_big_endian=false > > > + ;; > > > > Also you're adding new 64-bit MIPS support to GOLD here, so it has to be > > a separate patch too from the changes to the other binutils components. > > Is it a working configuration for GOLD even? Doesn't it need to have > > In fact, the current configure.tgt makes something wrong, if we configure > it with --with-targets=mips64-linux-gnuabi64. > https://buildd.debian.org/status/fetch.php?pkg=binutils-mipsen&arch=amd64&ver=10%2Bc5&stamp=1692086940&raw=0 > > That's why I'd like to put them in a single patch. You can fix GOLD to match the rest of the tools first, i.e. add support for `mips64*el-*-linux*' and `mips64*-*-linux*' only with a preparatory patch before the rest of the series to be considered. This way you won't add an inconsistency. This seems like the best approach, as we can shake out the issues there with the conventional n32-by-default configurations before adding n64-by-default support treewide. > > `targ_extra_size' also set? > > Maybe no. > Since `configure.tgt` is used for --enable-targets=xx,yy option. > WIth this option, only the list extra targets should be support. > If we set it, 32bit targets will be supported anyway. Why do other targets such as `x86_64*', `sparc64-*', `powerpc64le-*', `aarch64*-*', etc. set it then? > If user wants to support all targets, they need to use > --with-targets=all You mean `--enable-targets' I guess, but that's no news of course. But other multiple-ABI 64-bit configurations (and some 32-bit ones) chose to have their 32-bit counterparts always included in GOLD, as we do too in BFD, GAS, LD. So why do you want GOLD to be different? Cc-ing GOLD maintainers in case they want to chime in as GOLD is not my usual part of interest in binutils. Maciej ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: recoginze mipsisa64 as 64bit CPU 2023-08-20 15:21 ` Maciej W. Rozycki @ 2023-08-20 16:00 ` YunQiang Su 0 siblings, 0 replies; 5+ messages in thread From: YunQiang Su @ 2023-08-20 16:00 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: Ian Lance Taylor, Cary Coutant, YunQiang Su, binutils Maciej W. Rozycki <macro@orcam.me.uk> 于2023年8月20日周日 23:21写道: > > [Ian, Cary -- please see my notes about GOLD at the end; I'll appreciate > your input.] > > On Sun, 20 Aug 2023, YunQiang Su wrote: > > > > The change description has to be explicit in that we only refer to Linux > > > configurations here, as it doesn't change the semantics of `mipsisa64*' > > > CPUs for other OSes. And it's not that we don't consider the CPU 64-bit > > > for `mipsisa64*-*-linux*' configurations. We just don't use a 64-bit ABI > > > by default. Finally there's no need to repeat the rules for ABI selection > > > as we just follow the existing ones for `mips64*-*-linux*' configurations. > > > > > > How about: > > > > > > MIPS: Use a 64-bit ABI by default for `mipsisa64*-*-linux*' targets > > > > > > > I use ABIs here, since they are both N32 and/or N64. > > But only one at a time, hence the singular. You can't have n32 and n64 > as the default both at a time (in which case you'd use the plural form). > Yes. You are right. I have not very clear about since I was in junior high school, when I started to learn English, ;) > I realise your view might be a consequence from how you express things in > your native language, but this is how English grammar works (as how it is > the case with many if not all of the European languages, most of which > derive from a common ancestor in the Middle East thousands of years ago). > > NB mind the lowercase "n" in n32 and n64. I realise people started > mixing things up later on, but these were the correct spellings as the > ABIs were invented (along with o32 and less officially o64) back in 1990s. > There's no need to spread the mixed up form. > > > > > diff --git a/gold/configure.tgt b/gold/configure.tgt > > > > index 4b54e08d27f..d09bb76ef02 100644 > > > > --- a/gold/configure.tgt > > > > +++ b/gold/configure.tgt > > > > @@ -153,13 +153,27 @@ aarch64*-*) > > > > targ_big_endian=false > > > > targ_extra_big_endian=true > > > > ;; > > > > -mips*el*-*-*|mips*le*-*-*) > > > > +mips64*el*-*-* | mipsisa64*le*-*-*) > > > > + targ_obj=mips > > > > + targ_machine=EM_MIPS_RS3_LE > > > > + targ_size=64 > > > > + targ_big_endian=false > > > > + targ_extra_big_endian=true > > > > + ;; > > > > +mips*el*-*-*) > > > > > > You are removing the `mips*le*-*-*' configuration here. It may well be > > > the right move given that no other binutils component has it, but it has > > > to be a separate change. > > > > > > > You are right. I will add it back. > > I suggest the opposite, that is to remove it with a separate patch, as > it couldn't have been a usable configuration ever. It must have slipped > through review. > OK, Send. > > > > targ_obj=mips > > > > targ_machine=EM_MIPS_RS3_LE > > > > targ_size=32 > > > > targ_big_endian=false > > > > targ_extra_big_endian=true > > > > ;; > > > > +mips64*-*-* | mipsisa64*-*-*) > > > > + targ_obj=mips > > > > + targ_machine=EM_MIPS > > > > + targ_size=64 > > > > + targ_big_endian=true > > > > + targ_extra_big_endian=false > > > > + ;; > > > > > > Also you're adding new 64-bit MIPS support to GOLD here, so it has to be > > > a separate patch too from the changes to the other binutils components. > > > Is it a working configuration for GOLD even? Doesn't it need to have > > > > In fact, the current configure.tgt makes something wrong, if we configure > > it with --with-targets=mips64-linux-gnuabi64. > > https://buildd.debian.org/status/fetch.php?pkg=binutils-mipsen&arch=amd64&ver=10%2Bc5&stamp=1692086940&raw=0 > > > > That's why I'd like to put them in a single patch. > > You can fix GOLD to match the rest of the tools first, i.e. add support > for `mips64*el-*-linux*' and `mips64*-*-linux*' only with a preparatory > patch before the rest of the series to be considered. This way you won't > add an inconsistency. This seems like the best approach, as we can shake > out the issues there with the conventional n32-by-default configurations > before adding n64-by-default support treewide. > N32-or-N64 default is another topic for gold here, I guess. > > > `targ_extra_size' also set? > > > > Maybe no. > > Since `configure.tgt` is used for --enable-targets=xx,yy option. > > WIth this option, only the list extra targets should be support. > > If we set it, 32bit targets will be supported anyway. > > Why do other targets such as `x86_64*', `sparc64-*', `powerpc64le-*', > `aarch64*-*', etc. set it then? > I have no idea. And in fact, I think that there is no standard way: i?86 doesn't enable 64bit support. while ppc does. For aarch64, I believe it should be a mistake, as it has no 32bit mode.( correct me if I am wrong. For me, I think that we should follow what users ask us to do. If they need to support more, they can use "--enable-targets". > > If user wants to support all targets, they need to use > > --with-targets=all > > You mean `--enable-targets' I guess, but that's no news of course. But > other multiple-ABI 64-bit configurations (and some 32-bit ones) chose to > have their 32-bit counterparts always included in GOLD, as we do too in > BFD, GAS, LD. So why do you want GOLD to be different? > Adding all EL/EB/32/64 etc support sounds like a good idea. I didn't do this, due to the previous mips* ones not enabling 64 bit support. > Cc-ing GOLD maintainers in case they want to chime in as GOLD is not my > usual part of interest in binutils. > > Maciej -- YunQiang Su ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-20 16:01 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-08-15 10:48 [PATCH] MIPS: recoginze mipsisa64 as 64bit CPU YunQiang Su 2023-08-17 12:36 ` Maciej W. Rozycki 2023-08-20 13:53 ` YunQiang Su 2023-08-20 15:21 ` Maciej W. Rozycki 2023-08-20 16:00 ` YunQiang Su
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).