diff options
author | Manuel Lauss <manuel.lauss@gmail.com> | 2014-11-07 14:13:54 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-04-04 22:21:53 +0100 |
commit | 1e7276ac0cf61d026e7fa93fed2e3594019e2f56 (patch) | |
tree | 4ee3e99d1ed8cf013ce60bfdb4e032f488271d11 /arch/mips/math-emu | |
parent | 2c627f990c564fb99a70cf9a044db0edeca802fc (diff) | |
download | linux-stable-1e7276ac0cf61d026e7fa93fed2e3594019e2f56.tar.gz linux-stable-1e7276ac0cf61d026e7fa93fed2e3594019e2f56.tar.bz2 linux-stable-1e7276ac0cf61d026e7fa93fed2e3594019e2f56.zip |
MIPS: Fix build with binutils 2.24.51+
commit 842dfc11ea9a21f9825167c8a4f2834b205b0a79 upstream.
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@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
Cc: Markos Chandras <Markos.Chandras@imgtec.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/8355/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/mips/math-emu')
-rw-r--r-- | arch/mips/math-emu/cp1emu.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index bc5ab0dbdf91..22a2e15bd91b 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c @@ -586,11 +586,7 @@ static int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, if (insn.i_format.rs == bc_op) { preempt_disable(); if (is_fpu_owner()) - asm volatile( - ".set push\n" - "\t.set mips1\n" - "\tcfc1\t%0,$31\n" - "\t.set pop" : "=r" (fcr31)); + fcr31 = read_32bit_cp1_register(CP1_STATUS); else fcr31 = current->thread.fpu.fcr31; preempt_enable(); |