RE: [RFC PATCH v5] MIPS: fix build with binutils 2.24.51+

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 10/30/2014 08:24 PM, Manuel Lauss wrote:
> > Starting with version 2.24.51.20140728 MIPS binutils complain loudly
> > about mixing soft-float and hard-float object files, leading to this
> > build failure since GCC is invoked with "-msoft-float" on MIPS:
> >
> > {standard input}: Warning: .gnu_attribute 4,3 requires `softfloat'
> >   LD      arch/mips/alchemy/common/built-in.o
> > mipsel-softfloat-linux-gnu-ld: Warning: arch/mips/alchemy/common/built-
> in.o
> >  uses -msoft-float (set by arch/mips/alchemy/common/prom.o),
> >  arch/mips/alchemy/common/sleeper.o uses -mhard-float
> >
> > To fix this, we detect if GAS is new enough to support "-msoft-float"
> command
> > option, and if it does, we can let GCC pass it to GAS;  but then we also
> need
> > to sprinkle the files which make use of floating point registers with
> the
> > necessary ".set hardfloat" directives.
> >
> > Signed-off-by: Manuel Lauss <manuel.lauss@xxxxxxxxx>
> > ---
> > Compiles with binutils 2.23 and current git head, 32bit mips32r1 tested
> only.
> >
> > Tests on 64bit and with MSA and other extensions also appreciated!
> > Markos: I can't reproduce the malta defconfig error you're seeing, at
> least
> > not with sourceware sources.
> >
> > v5: fixed issues with code for 32bit mips32r2 using .set mips64r2
> outlined
> >     by Matthew: what the code really wants is 64bit float support, but
> not
> >     64bit mips code.
> >
> > v4: fixed issues outlined by Markos and Matthew.
> >
> > v3: incorporate Maciej's suggestions:
> > 	- detect if gas can handle -msoft-float and ".set hardfloat"
> > 	- apply .set hardfloat only where really necessary
> >
> > v2: cover more files
> >
> > This was introduced in binutils commit
> 351cdf24d223290b15fa991e5052ec9e9bd1e284
> > ("[MIPS] Implement O32 FPXX, FP64 and FP64A ABI extensions").
> >
> 
> Hello,
> 
> I still can't build it with the toolchain I am using over here. This is
> with a regular maltasmvp_defconfig
> 
> arch/mips/kernel/r4k_fpu.S: Assembler messages:
> arch/mips/kernel/r4k_fpu.S:47: Warning: tried to set unrecognized
> symbol: $30=64

Presumably 'fp' is a pre-processor macro for the 'frame pointer' register.
That's really frustrating. I can't think up any smart macro tricks other
than just #undef fp given that the fp register alias does not appear to be
used in this file.

Matthew





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux