aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 2124350ab94d..641aa30b3638 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -91,8 +91,17 @@ cflags-y += -ffreestanding
91# carefully avoid to add it redundantly because gcc 3.3/3.4 complains 91# carefully avoid to add it redundantly because gcc 3.3/3.4 complains
92# when fed the toolchain default! 92# when fed the toolchain default!
93# 93#
94cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB -D__MIPSEB__) 94# Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of
95cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL -D__MIPSEL__) 95# 2006-10-10 don't properly change the the predefined symbols if -EB / -EL
96# are used, so we kludge that here. A bug has been filed at
97# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413.
98#
99undef-all += -UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__
100undef-all += -UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__
101predef-be += -DMIPSEB -D_MIPSEB -D__MIPSEB -D__MIPSEB__
102predef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__
103cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be))
104cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
96 105
97cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ 106cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \
98 -fno-omit-frame-pointer 107 -fno-omit-frame-pointer