* [PATCH] [SPARC] Add -Av9 to AFLAGS in ld test suite
@ 2020-08-30 12:36 Mikael Pettersson
2020-09-16 15:22 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Mikael Pettersson @ 2020-08-30 12:36 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]
Add -Av9 to AFLAGS_PIC and AFLAGS_PIE in the ld test suite on SPARC.
Fixes the following ld test failures on sparcv9-linux-gnu:
FAIL: Build pr23162a
FAIL: Build pr23162b
FAIL: Build pr23161a
FAIL: Build pr23161b
FAIL: Build pr22263-1
due to:
tmpdir/pr22263-1a.s:26: Error: Architecture mismatch on "return %i7+8".
tmpdir/pr22263-1a.s:26: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8;
requested architecture is sparclite.)
which happens when gcc generates v9 code by default.
This extends a similar fix made for Solaris/SPARC recently.
ld/
* testsuite/ld-elf/shared.exp: Add -Av9 to AFLAGS_PIE on sparc*-*-*.
* testsuite/ld-elf/tls.exp: Add -Av9 to AFLAGS_PIC on sparc*-*-*.
---
ld/testsuite/ld-elf/shared.exp | 3 +++
ld/testsuite/ld-elf/tls.exp | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 66da7203df..d791356afd 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -1541,6 +1541,9 @@ if { [istarget "i?86-*-*"]
|| [istarget "x86_64-*-*"] } {
set AFLAGS_PIE "-mrelax-relocations=yes"
}
+if [istarget "sparc*-*-*"] {
+ set AFLAGS_PIE "-Av9"
+}
if { ([istarget "*-*-linux*"]
|| [istarget "*-*-nacl*"]
diff --git a/ld/testsuite/ld-elf/tls.exp b/ld/testsuite/ld-elf/tls.exp
index 8afbb9f129..99ca3aba00 100644
--- a/ld/testsuite/ld-elf/tls.exp
+++ b/ld/testsuite/ld-elf/tls.exp
@@ -36,7 +36,7 @@ if { ![check_compiler_available] } {
# This target requires extra GAS options when building PIC/PIE code.
set AFLAGS_PIC ""
if [istarget "sparc*-*-*"] {
- append AFLAGS_PIC " -K PIC"
+ append AFLAGS_PIC " -K PIC -Av9"
}
run_ld_link_tests [list \
--
2.25.4
[-- Attachment #2: 0001-SPARC-Add-Av9-to-AFLAGS-in-ld-test-suite.patch --]
[-- Type: text/x-patch, Size: 1945 bytes --]
From f3cdf04e9dc3db6381a09b50fc04eb7a57f0934a Mon Sep 17 00:00:00 2001
From: Mikael Pettersson <mikpelinux@gmail.com>
Date: Sun, 30 Aug 2020 14:03:48 +0200
Subject: [PATCH] [SPARC] Add -Av9 to AFLAGS in ld test suite
Add -Av9 to AFLAGS_PIC and AFLAGS_PIE in the ld test suite on SPARC.
Fixes the following ld test failures on sparcv9-linux-gnu:
FAIL: Build pr23162a
FAIL: Build pr23162b
FAIL: Build pr23161a
FAIL: Build pr23161b
FAIL: Build pr22263-1
due to:
tmpdir/pr22263-1a.s:26: Error: Architecture mismatch on "return %i7+8".
tmpdir/pr22263-1a.s:26: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is sparclite.)
which happens when gcc generates v9 code by default.
This extends a similar fix made for Solaris/SPARC recently.
ld/
* testsuite/ld-elf/shared.exp: Add -Av9 to AFLAGS_PIE on sparc*-*-*.
* testsuite/ld-elf/tls.exp: Add -Av9 to AFLAGS_PIC on sparc*-*-*.
---
ld/testsuite/ld-elf/shared.exp | 3 +++
ld/testsuite/ld-elf/tls.exp | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 66da7203df..d791356afd 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -1541,6 +1541,9 @@ if { [istarget "i?86-*-*"]
|| [istarget "x86_64-*-*"] } {
set AFLAGS_PIE "-mrelax-relocations=yes"
}
+if [istarget "sparc*-*-*"] {
+ set AFLAGS_PIE "-Av9"
+}
if { ([istarget "*-*-linux*"]
|| [istarget "*-*-nacl*"]
diff --git a/ld/testsuite/ld-elf/tls.exp b/ld/testsuite/ld-elf/tls.exp
index 8afbb9f129..99ca3aba00 100644
--- a/ld/testsuite/ld-elf/tls.exp
+++ b/ld/testsuite/ld-elf/tls.exp
@@ -36,7 +36,7 @@ if { ![check_compiler_available] } {
# This target requires extra GAS options when building PIC/PIE code.
set AFLAGS_PIC ""
if [istarget "sparc*-*-*"] {
- append AFLAGS_PIC " -K PIC"
+ append AFLAGS_PIC " -K PIC -Av9"
}
run_ld_link_tests [list \
--
2.25.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [SPARC] Add -Av9 to AFLAGS in ld test suite
2020-08-30 12:36 [PATCH] [SPARC] Add -Av9 to AFLAGS in ld test suite Mikael Pettersson
@ 2020-09-16 15:22 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2020-09-16 15:22 UTC (permalink / raw)
To: Mikael Pettersson, binutils
Hi Mikael,
> ld/
>
> * testsuite/ld-elf/shared.exp: Add -Av9 to AFLAGS_PIE on sparc*-*-*.
> * testsuite/ld-elf/tls.exp: Add -Av9 to AFLAGS_PIC on sparc*-*-*.
Approved and applied.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-16 15:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-30 12:36 [PATCH] [SPARC] Add -Av9 to AFLAGS in ld test suite Mikael Pettersson
2020-09-16 15:22 ` Nick Clifton
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).