diff options
author | Wu Zhangjin <wuzhangjin@gmail.com> | 2009-07-02 11:27:41 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-09-17 14:07:47 -0400 |
commit | 3702bba5eb4f7a0c89107089af6fd9bc2966b65a (patch) | |
tree | ab2a7c8a0a88d7fb2ade98d42d24655370537640 /arch/mips/Makefile | |
parent | 3209e70e5ed1821be8d9b87fe9e8bd6cffa4b4c7 (diff) |
MIPS: Loongson: Add GCC 4.4 support for Loongson2E
Because only gcc >=4.4 have loongson-specific support, we need to choose
the suitable -march argument for gcc <= 4.3 and gcc >= 4.4, and here, we
use -march=loongson2e for loongson2e.
Thanks goes to Arnaud Patard <apatard@mandriva.com> for suggestion of
using cc-options(Documentation/kbuild/makefiles.txt). and thanks Zhang
Le for introducing the new CPU_LOONGSON2E kernel option.
NOTE: -mtune option is not need if -march and -mtune use the same value.
Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r-- | arch/mips/Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 94d6f581386..1efa9aa6488 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -120,7 +120,11 @@ cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap | |||
120 | cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap | 120 | cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap |
121 | cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap | 121 | cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap |
122 | cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap | 122 | cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap |
123 | cflags-$(CONFIG_CPU_LOONGSON2) += -march=r4600 -Wa,--trap | 123 | # only gcc >= 4.4 have the loongson-specific support |
124 | cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap | ||
125 | cflags-$(CONFIG_CPU_LOONGSON2E) += \ | ||
126 | $(call cc-option,-march=loongson2e,-march=r4600) | ||
127 | |||
124 | cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ | 128 | cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ |
125 | -Wa,-mips32 -Wa,--trap | 129 | -Wa,-mips32 -Wa,--trap |
126 | cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ | 130 | cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ |