From: YunQiang Su <yunqiang.su@cipunited.com>
To: macro@orcam.me.uk
Cc: binutils@sourceware.org, iant@google.com, ccoutant@gmail.com,
YunQiang Su <yunqiang.su@cipunited.com>
Subject: [PATCH v3 1/2] Gold/MIPS: Improve MIPS support in configure.tgt
Date: Mon, 21 Aug 2023 01:14:56 +0800 [thread overview]
Message-ID: <20230820171457.1377429-1-yunqiang.su@cipunited.com> (raw)
1. Drop mips*le triple pattern, which will consider as big endian
by other components of binutils.
2. Use EM_MIPS instead of EM_MIPS_RS3_LE for little endian.
EM_MIPS_RS3_LE has been deprecated quite long ago, and in fact
most of current LE ELF files are using EM_MIPS.
3. Add targ_extra_size=64 for mips32 triples.
4. Add targ_extra_little_endian=true for big endian triples.
5. Add mips64 triples support, and define targ_extra_little_endian/
targ_extra_big_endian, and targ_extra_size=32.
Let's use `targ_extra_little_endian` in configure.ac/configure,
so that littlen endian can be enabled if the targets are all big endian.
---
gold/configure | 8 ++++++++
gold/configure.ac | 8 ++++++++
gold/configure.tgt | 24 +++++++++++++++++++++---
3 files changed, 37 insertions(+), 3 deletions(-)
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..e2e131bbd84 100644
--- a/gold/configure.tgt
+++ b/gold/configure.tgt
@@ -153,19 +153,37 @@ aarch64*-*)
targ_big_endian=false
targ_extra_big_endian=true
;;
-mips*el*-*-*|mips*le*-*-*)
+mips64*el-*-*)
targ_obj=mips
- targ_machine=EM_MIPS_RS3_LE
+ 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
targ_size=32
+ targ_extra_size=64
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
targ_size=32
+ targ_extra_size=64
targ_big_endian=true
- targ_extra_big_endian=false
+ targ_extra_little_endian=true
;;
s390-*-*)
targ_obj=s390
--
2.30.2
next reply other threads:[~2023-08-20 17:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-20 17:14 YunQiang Su [this message]
2023-08-20 17:14 ` [PATCH v3 2/2] MIPS: Use 64-bit a ABI by default for `mipsisa64*-*-linux*' targets YunQiang Su
2023-08-25 2:57 ` [PATCH v3 1/2] Gold/MIPS: Improve MIPS support in configure.tgt YunQiang Su
2023-08-25 3:31 ` Maciej W. Rozycki
2023-08-29 22:49 ` YunQiang Su
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230820171457.1377429-1-yunqiang.su@cipunited.com \
--to=yunqiang.su@cipunited.com \
--cc=binutils@sourceware.org \
--cc=ccoutant@gmail.com \
--cc=iant@google.com \
--cc=macro@orcam.me.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).