Bug 13813 - ld-mips-elf/comm-data.exp failures for mipsisa32r2el-unknown-linux-gnu
Summary: ld-mips-elf/comm-data.exp failures for mipsisa32r2el-unknown-linux-gnu
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.24
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-06 16:31 UTC by Hans-Peter Nilsson
Modified: 2017-07-19 22:31 UTC (History)
1 user (show)

See Also:
Host:
Target: mipsisa32r2el-unknown-linux-gnu
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2012-03-06 16:31:55 UTC
The n32 and n64 variants in ld-mips-elf/comm-data.exp fail assembly:
Running /home/hp/binutils/src/ld/testsuite/ld-mips-elf/comm-data.exp ...
ERROR: -n32 -EB -call_shared /home/hp/binutils/src/ld/testsuite/ld-mips-elf/../ld-elf/comm-data1.s: assembly failed
ERROR: -n32 -EB -call_nonpic /home/hp/binutils/src/ld/testsuite/ld-mips-elf/../ld-elf/comm-data2.s: assembly failed
ERROR: -n32 -EB -call_shared /home/hp/binutils/src/ld/testsuite/ld-mips-elf/../ld-elf/comm-data1.s: assembly failed
ERROR: -n32 -EB -call_nonpic /home/hp/binutils/src/ld/testsuite/ld-mips-elf/../ld-elf/comm-data2.s: assembly failed
ERROR: -64 -EB -call_shared /home/hp/binutils/src/ld/testsuite/ld-mips-elf/../ld-elf/comm-data1.s: assembly failed
ERROR: -64 -EB --defsym ELF64=1 -call_nonpic /home/hp/binutils/src/ld/testsuite/ld-mips-elf/../ld-elf/comm-data2.s: assembly failed
ERROR: -64 -EB -call_shared /home/hp/binutils/src/ld/testsuite/ld-mips-elf/../ld-elf/comm-data1.s: assembly failed
ERROR: -64 -EB --defsym ELF64=1 -call_nonpic /home/hp/binutils/src/ld/testsuite/ld-mips-elf/../ld-elf/comm-data2.s: assembly failed

In ld.log:
Assembler messages:
Error: -march=mips32r2 is not compatible with the selected ABI
Assembler messages:
Error: -march=mips32r2 is not compatible with the selected ABI

Looking at the source, the mipsisa32r2 in the target triple is taken as the default for the -march option, and "64-bit registers" are required.  I verified a simple fix is adding a proper -march option to the test-cases for the 64-bit variants.  Patch to be posted.
Comment 1 Sourceware Commits 2012-03-21 19:15:15 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	hp@sourceware.org	2012-03-21 19:15:02

Modified files:
	ld/testsuite   : ChangeLog 
	ld/testsuite/ld-mips-elf: comm-data.exp 

Log message:
	PR ld/13813
	* ld-mips-elf/comm-data.exp (mips_comm_data_test): For N32 and N64
	tests, also specify assembler option -march=mips3.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ChangeLog.diff?cvsroot=src&r1=1.1506&r2=1.1507
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-mips-elf/comm-data.exp.diff?cvsroot=src&r1=1.1&r2=1.2
Comment 2 Hans-Peter Nilsson 2012-03-21 19:16:49 UTC
fixed.
Comment 3 Maciej W. Rozycki 2017-07-19 22:31:37 UTC
Long fixed.