* [committed 1/6] Gold: Add targ_extra_little_endian to configure.ac
@ 2023-08-28 3:49 YunQiang Su
2023-08-28 3:49 ` [committed 2/6] Gold/MIPS: Use EM_MIPS instead of EM_MIPS_RS3_LE for little endian YunQiang Su
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: YunQiang Su @ 2023-08-28 3:49 UTC (permalink / raw)
To: binutils; +Cc: YunQiang Su
This option will be used by architectures which is big endian
by default, while little-endian support is also needed.
Mips(eb) ports are the examples.
---
gold/configure | 8 ++++++++
gold/configure.ac | 8 ++++++++
gold/configure.tgt | 2 +-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/gold/configure b/gold/configure
index 5c6fe2a5607..ccb1f2269b2 100755
--- a/gold/configure
+++ b/gold/configure
@@ -5266,6 +5266,10 @@ for targ in $target $canon_targets; do
-o "$targ_extra_big_endian" = "true"; then
targ_32_big=yes
fi
+ if test "$targ_little_endian" = "true" \
+ -o "$targ_extra_little_endian" = "true"; then
+ targ_32_little=yes
+ fi
if test "$targ_big_endian" = "false" \
-o "$targ_extra_big_endian" = "false"; then
targ_32_little=yes
@@ -5276,6 +5280,10 @@ for targ in $target $canon_targets; do
-o "$targ_extra_big_endian" = "true"; then
targ_64_big=yes
fi
+ if test "$targ_little_endian" = "true" \
+ -o "$targ_extra_little_endian" = "true"; then
+ targ_64_little=yes
+ fi
if test "$targ_big_endian" = "false" \
-o "$targ_extra_big_endian" = "false"; then
targ_64_little=yes
diff --git a/gold/configure.ac b/gold/configure.ac
index cafd3503b3b..e04e4086140 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -193,6 +193,10 @@ for targ in $target $canon_targets; do
-o "$targ_extra_big_endian" = "true"; then
targ_32_big=yes
fi
+ if test "$targ_little_endian" = "true" \
+ -o "$targ_extra_little_endian" = "true"; then
+ targ_32_little=yes
+ fi
if test "$targ_big_endian" = "false" \
-o "$targ_extra_big_endian" = "false"; then
targ_32_little=yes
@@ -203,6 +207,10 @@ for targ in $target $canon_targets; do
-o "$targ_extra_big_endian" = "true"; then
targ_64_big=yes
fi
+ if test "$targ_little_endian" = "true" \
+ -o "$targ_extra_little_endian" = "true"; then
+ targ_64_little=yes
+ fi
if test "$targ_big_endian" = "false" \
-o "$targ_extra_big_endian" = "false"; then
targ_64_little=yes
diff --git a/gold/configure.tgt b/gold/configure.tgt
index 4b54e08d27f..b472b8f0bad 100644
--- a/gold/configure.tgt
+++ b/gold/configure.tgt
@@ -165,7 +165,7 @@ mips*-*-*)
targ_machine=EM_MIPS
targ_size=32
targ_big_endian=true
- targ_extra_big_endian=false
+ targ_extra_little_endian=true
;;
s390-*-*)
targ_obj=s390
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [committed 2/6] Gold/MIPS: Use EM_MIPS instead of EM_MIPS_RS3_LE for little endian
2023-08-28 3:49 [committed 1/6] Gold: Add targ_extra_little_endian to configure.ac YunQiang Su
@ 2023-08-28 3:49 ` YunQiang Su
2023-10-07 3:32 ` YunQiang Su
2023-08-28 3:49 ` [committed 3/6] Gold/MIPS: Drop mips*le/mips*el* triple pattern YunQiang Su
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: YunQiang Su @ 2023-08-28 3:49 UTC (permalink / raw)
To: binutils; +Cc: YunQiang Su
EM_MIPS_RS3_LE has been deprecated quite long ago, and in fact
most of current LE ELF files are using EM_MIPS.
This problem didn't make some trouble for us, is due to that
gold is a linker, and all of the inputs to it has right EM values.
---
gold/configure.tgt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gold/configure.tgt b/gold/configure.tgt
index b472b8f0bad..996bc901d1d 100644
--- a/gold/configure.tgt
+++ b/gold/configure.tgt
@@ -155,7 +155,7 @@ aarch64*-*)
;;
mips*el*-*-*|mips*le*-*-*)
targ_obj=mips
- targ_machine=EM_MIPS_RS3_LE
+ targ_machine=EM_MIPS
targ_size=32
targ_big_endian=false
targ_extra_big_endian=true
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [committed 3/6] Gold/MIPS: Drop mips*le/mips*el* triple pattern
2023-08-28 3:49 [committed 1/6] Gold: Add targ_extra_little_endian to configure.ac YunQiang Su
2023-08-28 3:49 ` [committed 2/6] Gold/MIPS: Use EM_MIPS instead of EM_MIPS_RS3_LE for little endian YunQiang Su
@ 2023-08-28 3:49 ` YunQiang Su
2023-08-28 3:49 ` [committed 4/6] Gold/MIPS: Add targ_extra_size=64 for mips32 triples YunQiang Su
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: YunQiang Su @ 2023-08-28 3:49 UTC (permalink / raw)
To: binutils; +Cc: YunQiang Su
Only mips*el triples are supported by binutils. The mips*le
or mips*el* may cause some problem with other components of
binutils, since they will consider them as big endian.
---
gold/configure.tgt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gold/configure.tgt b/gold/configure.tgt
index 996bc901d1d..8f0f21bdc03 100644
--- a/gold/configure.tgt
+++ b/gold/configure.tgt
@@ -153,7 +153,7 @@ aarch64*-*)
targ_big_endian=false
targ_extra_big_endian=true
;;
-mips*el*-*-*|mips*le*-*-*)
+mips*el-*-*)
targ_obj=mips
targ_machine=EM_MIPS
targ_size=32
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [committed 4/6] Gold/MIPS: Add targ_extra_size=64 for mips32 triples
2023-08-28 3:49 [committed 1/6] Gold: Add targ_extra_little_endian to configure.ac YunQiang Su
2023-08-28 3:49 ` [committed 2/6] Gold/MIPS: Use EM_MIPS instead of EM_MIPS_RS3_LE for little endian YunQiang Su
2023-08-28 3:49 ` [committed 3/6] Gold/MIPS: Drop mips*le/mips*el* triple pattern YunQiang Su
@ 2023-08-28 3:49 ` YunQiang Su
2023-08-28 3:49 ` [committed 5/6] Gold/MIPS: Add mips64*/mips64*el triple support YunQiang Su
2023-08-28 3:49 ` [committed 6/6] MIPS: Use 64-bit a ABI by default for `mipsisa64*-*-linux*' targets YunQiang Su
4 siblings, 0 replies; 8+ messages in thread
From: YunQiang Su @ 2023-08-28 3:49 UTC (permalink / raw)
To: binutils; +Cc: YunQiang Su
So we can enable 64bit ELF support for MIPS32 toolchain.
---
gold/configure.tgt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gold/configure.tgt b/gold/configure.tgt
index 8f0f21bdc03..4b16634ff4e 100644
--- a/gold/configure.tgt
+++ b/gold/configure.tgt
@@ -157,6 +157,7 @@ mips*el-*-*)
targ_obj=mips
targ_machine=EM_MIPS
targ_size=32
+ targ_extra_size=64
targ_big_endian=false
targ_extra_big_endian=true
;;
@@ -164,6 +165,7 @@ mips*-*-*)
targ_obj=mips
targ_machine=EM_MIPS
targ_size=32
+ targ_extra_size=64
targ_big_endian=true
targ_extra_little_endian=true
;;
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [committed 5/6] Gold/MIPS: Add mips64*/mips64*el triple support
2023-08-28 3:49 [committed 1/6] Gold: Add targ_extra_little_endian to configure.ac YunQiang Su
` (2 preceding siblings ...)
2023-08-28 3:49 ` [committed 4/6] Gold/MIPS: Add targ_extra_size=64 for mips32 triples YunQiang Su
@ 2023-08-28 3:49 ` YunQiang Su
2023-08-28 3:49 ` [committed 6/6] MIPS: Use 64-bit a ABI by default for `mipsisa64*-*-linux*' targets YunQiang Su
4 siblings, 0 replies; 8+ messages in thread
From: YunQiang Su @ 2023-08-28 3:49 UTC (permalink / raw)
To: binutils; +Cc: YunQiang Su
Use targ_size=64 and targ_extra_size=32
---
gold/configure.tgt | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/gold/configure.tgt b/gold/configure.tgt
index 4b16634ff4e..e2e131bbd84 100644
--- a/gold/configure.tgt
+++ b/gold/configure.tgt
@@ -153,6 +153,14 @@ aarch64*-*)
targ_big_endian=false
targ_extra_big_endian=true
;;
+mips64*el-*-*)
+ targ_obj=mips
+ targ_machine=EM_MIPS
+ targ_size=64
+ targ_extra_size=32
+ targ_big_endian=false
+ targ_extra_big_endian=true
+ ;;
mips*el-*-*)
targ_obj=mips
targ_machine=EM_MIPS
@@ -161,6 +169,14 @@ mips*el-*-*)
targ_big_endian=false
targ_extra_big_endian=true
;;
+mips64*-*-*)
+ targ_obj=mips
+ targ_machine=EM_MIPS
+ targ_size=64
+ targ_extra_size=32
+ targ_big_endian=true
+ targ_extra_little_endian=true
+ ;;
mips*-*-*)
targ_obj=mips
targ_machine=EM_MIPS
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [committed 6/6] MIPS: Use 64-bit a ABI by default for `mipsisa64*-*-linux*' targets
2023-08-28 3:49 [committed 1/6] Gold: Add targ_extra_little_endian to configure.ac YunQiang Su
` (3 preceding siblings ...)
2023-08-28 3:49 ` [committed 5/6] Gold/MIPS: Add mips64*/mips64*el triple support YunQiang Su
@ 2023-08-28 3:49 ` YunQiang Su
4 siblings, 0 replies; 8+ messages in thread
From: YunQiang Su @ 2023-08-28 3:49 UTC (permalink / raw)
To: binutils; +Cc: 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.
---
bfd/config.bfd | 8 ++++----
gas/configure | 6 +++---
gas/configure.ac | 6 +++---
gold/configure.tgt | 4 ++--
ld/configure.tgt | 10 ++++++----
5 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 08129e6a8cb..55fd02e787c 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -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"
;;
diff --git a/gas/configure b/gas/configure
index 3c80fe5741a..1827e38690e 100755
--- a/gas/configure
+++ b/gas/configure
@@ -12256,11 +12256,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)
diff --git a/gas/configure.ac b/gas/configure.ac
index 3a04c39d344..ecfab6bf510 100644
--- a/gas/configure.ac
+++ b/gas/configure.ac
@@ -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)
diff --git a/gold/configure.tgt b/gold/configure.tgt
index e2e131bbd84..99a5fcc91ee 100644
--- a/gold/configure.tgt
+++ b/gold/configure.tgt
@@ -153,7 +153,7 @@ aarch64*-*)
targ_big_endian=false
targ_extra_big_endian=true
;;
-mips64*el-*-*)
+mips64*el-*-* | mipsisa64*el-linux*)
targ_obj=mips
targ_machine=EM_MIPS
targ_size=64
@@ -169,7 +169,7 @@ mips*el-*-*)
targ_big_endian=false
targ_extra_big_endian=true
;;
-mips64*-*-*)
+mips64*-*-* | mipsisa64*-linux*)
targ_obj=mips
targ_machine=EM_MIPS
targ_size=64
diff --git a/ld/configure.tgt b/ld/configure.tgt
index ff0aaaae257..34d20e05bc9 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -586,21 +586,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.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [committed 2/6] Gold/MIPS: Use EM_MIPS instead of EM_MIPS_RS3_LE for little endian
2023-08-28 3:49 ` [committed 2/6] Gold/MIPS: Use EM_MIPS instead of EM_MIPS_RS3_LE for little endian YunQiang Su
@ 2023-10-07 3:32 ` YunQiang Su
2023-10-07 15:01 ` Maciej W. Rozycki
0 siblings, 1 reply; 8+ messages in thread
From: YunQiang Su @ 2023-10-07 3:32 UTC (permalink / raw)
To: YunQiang Su, Maciej W. Rozycki, Nick Clifton; +Cc: binutils
@Maciej W. Rozycki Since this patch is so simple, so is it ok to recommit it?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [committed 2/6] Gold/MIPS: Use EM_MIPS instead of EM_MIPS_RS3_LE for little endian
2023-10-07 3:32 ` YunQiang Su
@ 2023-10-07 15:01 ` Maciej W. Rozycki
0 siblings, 0 replies; 8+ messages in thread
From: Maciej W. Rozycki @ 2023-10-07 15:01 UTC (permalink / raw)
To: YunQiang Su; +Cc: YunQiang Su, Nick Clifton, binutils
On Sat, 7 Oct 2023, YunQiang Su wrote:
> @Maciej W. Rozycki Since this patch is so simple, so is it ok to recommit it?
As I requested off-list please resubmit any changes from this series you
want to have reviewed.
Maciej
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-10-07 15:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-28 3:49 [committed 1/6] Gold: Add targ_extra_little_endian to configure.ac YunQiang Su
2023-08-28 3:49 ` [committed 2/6] Gold/MIPS: Use EM_MIPS instead of EM_MIPS_RS3_LE for little endian YunQiang Su
2023-10-07 3:32 ` YunQiang Su
2023-10-07 15:01 ` Maciej W. Rozycki
2023-08-28 3:49 ` [committed 3/6] Gold/MIPS: Drop mips*le/mips*el* triple pattern YunQiang Su
2023-08-28 3:49 ` [committed 4/6] Gold/MIPS: Add targ_extra_size=64 for mips32 triples YunQiang Su
2023-08-28 3:49 ` [committed 5/6] Gold/MIPS: Add mips64*/mips64*el triple support YunQiang Su
2023-08-28 3:49 ` [committed 6/6] MIPS: Use 64-bit a ABI by default for `mipsisa64*-*-linux*' targets 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).