summaryrefslogtreecommitdiffstats
path: root/lemote/gnewsense/tags/2.6.34.13-gnu_0loongsonlibre/gnewsense-binutils-flag.patch
blob: d58a589d69eed4ac846f25645bce3cae7accca58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Our binutils somehow ended up with a -mfix-gs2f-kernel, rather than
-mfix-ls2f-kernel.  Cope with it.

Index: arch/mips/Makefile
===================================================================
--- arch/mips/Makefile.orig	2010-05-16 21:17:36.000000000 +0000
+++ arch/mips/Makefile	2010-05-22 08:47:53.000000000 +0000
@@ -138,6 +138,12 @@
 	$(call cc-option,-march=loongson2f,-march=r4600)
 # enable the workarounds for loongson2f
 ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS
+ ifneq ($(call as-option,-Wa$(comma)-mfix-gs2f-kernel,),)
+   cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel
+   ifneq ($(CONFIG_CPU_NOP_WORKAROUNDS),$(CONFIG_CPU_JUMP_WORKAROUNDS))
+     cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-gs2f-kernel
+   endif
+ else
   ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),)
     $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop)
   else
@@ -148,6 +154,7 @@
   else
     cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-jump
   endif
+ endif
 endif
 
 cflags-$(CONFIG_CPU_MIPS32_R1)	+= $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
OpenPOWER on IntegriCloud