[RFC RFC PATCH] MIPS: fix build with newest binutils

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

 



With recent binutils devel, I get the following build failure:
{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

This hackish patch "fixes" it, but I'm not sure if this is actually
a binutils problem.

---
 arch/mips/Makefile            | 2 +-
 arch/mips/kernel/r4k_fpu.S    | 1 +
 arch/mips/kernel/r4k_switch.S | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 9336509..cffbd49 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -88,7 +88,7 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlinuz
 # crossformat linking we rely on the elf2ecoff tool for format conversion.
 #
 cflags-y			+= -G 0 -mno-abicalls -fno-pic -pipe
-cflags-y			+= -msoft-float
+cflags-y			+= -msoft-float -Wa,-msoft-float
 LDFLAGS_vmlinux			+= -G 0 -static -n -nostdlib
 KBUILD_AFLAGS_MODULE		+= -mlong-calls
 KBUILD_CFLAGS_MODULE		+= -mlong-calls
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S
index 8352523..10dd5d4 100644
--- a/arch/mips/kernel/r4k_fpu.S
+++ b/arch/mips/kernel/r4k_fpu.S
@@ -31,6 +31,7 @@
 
 	.set	noreorder
 	.set	arch=r4000
+	.set	hardfloat
 
 LEAF(_save_fp_context)
 	cfc1	t1, fcr31
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S
index 4c4ec18..a030f74 100644
--- a/arch/mips/kernel/r4k_switch.S
+++ b/arch/mips/kernel/r4k_switch.S
@@ -34,6 +34,8 @@
  *		       struct thread_info *next_ti, s32 fp_save)
  */
 	.align	5
+	.set hardfloat
+
 	LEAF(resume)
 	mfc0	t1, CP0_STATUS
 	LONG_S	t1, THREAD_STATUS(a0)
-- 
2.0.4



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

  Powered by Linux