[PATCH] ld: testsuite: Fix several CTF tests on 32-bit SPARC

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Mon Jul 28 09:37:19 GMT 2025


Several ld CTF tests FAIL on 32-bit SPARC, e.g.

FAIL: Arrays (conflicted)

The failure mode is always the same:

./tmpdir/array-char-conflicting-1.s: Assembler messages:
./tmpdir/array-char-conflicting-1.s:89: Error: Architecture mismatch on "return %i7+8".
./tmpdir/array-char-conflicting-1.s:89: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is sparclite.)

The problem is that gcc emits v8plus code by default, and thus invokes
as with -xarch=v8plus (equivalent to -Av8plus), while the testcase lacks
the latter.

Fixed by setting ASFLAGS to match.

Alternatively, one could use -Av9 which is already done for sparc-*-* in
a couple of other cases.

Tested on sparc-sun-solaris2.11, sparc-unknown-linux-gnu,
sparcv9-sun-solaris2.11, and sparc64-unknown-linux-gnu.

Ok for trunk?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


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

	ld:
	* testsuite/ld-ctf/ctf.exp (ASFLAGS): Append -Av8plus on
	sparc-*-*.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparc-ld-testsuite-ctf-v8plus.patch
Type: text/x-patch
Size: 777 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20250728/ded9038a/attachment.bin>


More information about the Binutils mailing list