Bug 64569

Summary: [4.8/4.9 only] [MIPS] Unable to build soft-float in conjunction with binutils 2.25
Product: gcc Reporter: Matthew Fortune <matthew.fortune>
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 4.9.3   
Target Milestone: 5.0   
Host: Target: mips*-*-*
Build: Known to work: 5.0
Known to fail: 4.9.4 Last reconfirmed:

Description Matthew Fortune 2015-01-12 16:57:28 UTC
binutils 2.25 for MIPS includes more aggressive checks on ABI usage and in particular warns when given code that claims to be soft-float via .gnu_attribute 4,3 but is assembled without -msoft-float. binutils 2.25 will also infer an ABI from the floating-point related command line options.

No GCC compiler drivers prior to GCC 5.0 pass the -msoft-float option through to the assembler which means that the assembler is given an inconsistent view of the intended ABI.

For compiled code the issue will show itself as a warning from the assembler:
Warning: .gnu_attribute 4,3 requires `softfloat'

For hand-crafted assembler modules assembled via the compiler driver then the ABI inferred by the assembler will be hard-float instead of soft-float owing to the missing -msoft-float option.

A combination of these two problems will then lead to a link failure stating that incompatible ABIs are in use. A number of other relocation errors can also occur as a side effect.

(This bug was also filed as a binutils issue but is actually a compiler driver issue: https://sourceware.org/bugzilla/show_bug.cgi?id=17219)
Comment 1 Andrew Pinski 2015-01-12 17:45:40 UTC
Fixed in GCC 5 already.
Comment 2 mpf 2015-02-26 10:56:41 UTC
Author: mpf
Date: Thu Feb 26 10:56:09 2015
New Revision: 221001

URL: https://gcc.gnu.org/viewcvs?rev=221001&root=gcc&view=rev
Log:
Add missing bug number to r221000

	PR target/64569
	* See r221000

Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
Comment 3 Richard Biener 2016-08-03 11:46:23 UTC
Fixed in GCC 5+.