From e3c9b9f9287a17c2a20d9b1b77747bd209e8408b Mon Sep 17 00:00:00 2001 From: wdenk Date: Sun, 24 Oct 2004 23:54:40 +0000 Subject: * Fix configuration for ERIC board (needs more room) * Adjust MIPS compiler options at run-time depending on tools version ("-march=4kc -mtune=4kc -Wa,-mips_allow_branch_to_undefined" for new, "-mcpu=4kc" for old tools) --- cpu/mips/config.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cpu') diff --git a/cpu/mips/config.mk b/cpu/mips/config.mk index 1664e14..3c9aab8 100644 --- a/cpu/mips/config.mk +++ b/cpu/mips/config.mk @@ -20,5 +20,13 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # +v=$(shell \ +mips-linux-as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}') +MIPSFLAGS=$(shell \ +if [ "$v" -lt "14" ]; then \ + echo "-mcpu=4kc -EB -mabicalls"; \ +else \ + echo "-march=4kc -mtune=4kc -Wa,-mips_allow_branch_to_undefined -EB -mabicalls"; \ +fi) -PLATFORM_CPPFLAGS += -mcpu=4kc -EB -mabicalls +PLATFORM_CPPFLAGS += $(MIPSFLAGS) -- cgit v1.1