]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: Default to V8+ on 32-bit Solaris/SPARC
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 30 Sep 2025 11:06:50 +0000 (13:06 +0200)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 30 Sep 2025 11:06:50 +0000 (13:06 +0200)
commitd69c70ce8990fa66020e3d7d568a1dce9caff43b
tree3d3ddfc5a5535f7df6293adddc77f46c79554121
parent647a377cb55a825b3be65b3cae67b2d3ef39e50d
gas: Default to V8+ on 32-bit Solaris/SPARC

While compilers default to v8plus on 32-bit Solaris/SPARC (gcc at least
since 4.4 in 2009, cc since at least Stdio 9 in 2010), gas still uses a
sparclite default.  While this doesn't cause issue for gcc (it passes
-Av8plus as necessary), it repeatedly lead to problems in the testsuite
which has to be sprinkled with setting ASFLAGS accordingly since gas cannot
assemble the gcc output by default.

This patch switches the default to v8plus on Solaris to match gcc.
I had to introduce a new arch value, v8plus-32, matching v9-64, to allow
for this.

I cannot reliably tell if other SPARC targets are similarly affected, so
this patch restricts the change to Solaris.

Tested on sparc-sun-solaris2.11 and sparcv9-sun-solaris2.11.

2025-09-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

gas:
* config/tc-sparc.c (sparc_arch_table): Introduce v8plus-32.
* configure.tgt (generic_target) <sparc-*-solaris*>: Set arch to
v8plus-32 for 32-bit sparc.
* testsuite/gas/sparc/v8plus.rd, testsuite/gas/sparc/v8plus.s: New
test.
* testsuite/gas/sparc/sparc.exp: Run it on sparc*-*-solaris2*.
gas/config/tc-sparc.c
gas/configure.tgt
gas/testsuite/gas/sparc/sparc.exp
gas/testsuite/gas/sparc/v8plus.d [new file with mode: 0644]
gas/testsuite/gas/sparc/v8plus.s [new file with mode: 0644]