From: Thiemo Seufer Date: Thu, 7 Jul 2005 09:19:31 +0000 (+0000) Subject: Hack to make compiles for the other endianness easier. X-Git-Tag: v2.6.15-rc1~731^2~1^2~162 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f425a6dce50475f08547d08763f707589478b027;p=linux-2.6 Hack to make compiles for the other endianness easier. Signed-off-by: Ralf Baechle Signed-off-by: Thiemo Seufer --- diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 56e1d42a57..056aae5971 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -97,6 +97,15 @@ cflags-y += $(call cc-option, -finline-limit=100000) LDFLAGS_vmlinux += -G 0 -static -n -nostdlib MODFLAGS += -mlong-calls +# +# We explicitly add the endianness specifier if needed, this allows +# to compile kernels with a toolchain for the other endianness. We +# carefully avoid to add it redundantly because gcc 3.3/3.4 complains +# when fed the toolchain default! +# +cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips*el-linux*' && echo -EB) +cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips*el-linux*' || echo -EL) + cflags-$(CONFIG_SB1XXX_CORELIS) += -mno-sched-prolog -fno-omit-frame-pointer #