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

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

 



Hi all,

The issues Markos has seen will be resolved in the toolchain so this
patch is good to go.

Matthew

> -----Original Message-----
> From: Manuel Lauss [mailto:manuel.lauss@xxxxxxxxx]
> Sent: 31 October 2014 16:23
> To: Markos Chandras
> Cc: Linux-MIPS; Matthew Fortune; Maciej W. Rozycki; Ralf Baechle
> Subject: Re: [RFC PATCH v6] MIPS: fix build with binutils 2.24.51+
> 
> I didn't encounter this error with what will be gcc-4.9.3.
> 
> 
> Manuel
> 
> On Fri, Oct 31, 2014 at 5:13 PM, Markos Chandras
> <Markos.Chandras@xxxxxxxxxx> wrote:
> > On 10/31/2014 04:03 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, tested with alchemy
> (mips32r1)
> >> and maltasmvp_defconfig (64bit)
> >>
> >> Tests with MSA and other extensions also appreciated!
> >>
> >> v6: #undef fp so that the preprocessor does not replace the fp in
> >>       .set fp=64 with $30...  Fixes 64bit build.
> >
> > Technically speaking, a maltasmvp_defconfig selects CONFIG_32BIT=y so
> > it's still a 32-bit build.
> >> [...]
> >
> > Ok the fp problem went away but I still have the even/odd errors with my
> > tools
> >
> > arch/mips/kernel/r4k_switch.S: Assembler messages:
> > arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
> > was 1
> > arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
> > was 3
> > arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
> > was 5
> > arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
> > was 7
> > arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
> > was 9
> > arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
> > was 11
> > arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
> > was 13
> > arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
> > was 15
> > arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
> > was 17
> > arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
> > was 19
> >
> > The following patch did not help either:
> >
> > diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> > index 58076472bdd8..b8bb7e170fee 100644
> > --- a/arch/mips/Makefile
> > +++ b/arch/mips/Makefile
> > @@ -56,7 +56,7 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER
> >    endif
> >  endif
> >  cflags-y += $(call cc-option, -mno-check-zero-division)
> > -
> > +cflags-y += -mno-odd-spreg
> >
> > This is with a regular maltasmvp_defconfig
> >
> > I guess my gcc version is newer than yours. Matthew?
> >
> > --
> > markos





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

  Powered by Linux