source: mainline/arch/mips/Makefile.inc@ 8491c48

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 8491c48 was a1493d9, checked in by Ondrej Palkovsky <ondrap@…>, 20 years ago

Fixed bad address loading in simulators.
FPU cooprocessor unusable now checks, if it is FPU that is unusable.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1MIPS_TARGET=mipsel-linux-gnu
2
3MIPS_CC_DIR=/usr/local/mipsel/bin
4MIPS_BINUTILS_DIR=/usr/local/mipsel/bin
5
6CC=$(MIPS_CC_DIR)/$(MIPS_TARGET)-gcc
7AS=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-as
8LD=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-ld
9OBJDUMP=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-objdump
10OBJCOPY=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-objcopy
11BFD_NAME=elf32-tradlittlemips
12BFD_ARCH=mips
13
14DEFS=-DARCH=$(ARCH) -DMACHINE=${MACHINE} -DKERNEL_LOAD_ADDRESS=${KERNEL_LOAD_ADDRESS}
15CFLAGS=$(DEFS) -mno-abicalls -G 0 -nostdlib -fno-builtin -O2 -fno-zero-initialized-in-bss
16LFLAGS=-M -N
17
18# It seems that on big endian either GCC or the simulators
19# have the swl/swr/lwl/lwr instructions wrong. Just for sure,
20# disable it with -mmemcpy (force calling memcpy instead of inlining)
21
22ifeq (${MACHINE},indy)
23 CFLAGS += -EB -mmemcpy -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY -march=r4600
24 BFD = ecoff-bigmips
25 KERNEL_LOAD_ADDRESS = 0x88002000
26endif
27
28ifeq (${MACHINE},lgxemul)
29 CFLAGS += -DHAVE_FPU -DFPU_LAZY -mips3
30 BFD = ecoff-littlemips
31 KERNEL_LOAD_ADDRESS = 0x80100000
32endif
33
34ifeq (${MACHINE},bgxemul)
35 CFLAGS += -EB -mmemcpy -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY -mips3
36 BFD = ecoff-bigmips
37 KERNEL_LOAD_ADDRESS = 0x80100000
38endif
39
40# MSIM needs lwl/swl patch & 4kc instruction patch to work
41# otherwise add -mmemcpy -mips3
42ifeq (${MACHINE},msim)
43 BFD = binary
44 CFLAGS += -msoft-float -march=4kc
45 KERNEL_LOAD_ADDRESS = 0x80100000
46endif
47
48# SIMICS 4kc emulation is broken, although for instructions
49# that do not bother us
50ifeq (${MACHINE},simics)
51 BFD = elf32-little
52 CFLAGS += -msoft-float -mips3
53 KERNEL_LOAD_ADDRESS = 0x80100000
54endif
55
56../arch/$(ARCH)/_link.ld: ../arch/$(ARCH)/_link.ld.in
57 $(CC) $(CFLAGS) -C -DBFD=${BFD} -E -x c $< | grep -v "^\#" > $@
58
59arch_sources= \
60 arch/start.S \
61 arch/context.S \
62 arch/panic.S \
63 arch/mips.c \
64 arch/dummy.S \
65 arch/console.c \
66 arch/asm.S \
67 arch/exception.c \
68 arch/interrupt.c \
69 arch/cache.c \
70 arch/cpu/cpu.c \
71 arch/mm/frame.c \
72 arch/mm/page.c \
73 arch/mm/tlb.c \
74 arch/fpu_context.c \
75 arch/fmath.c
Note: See TracBrowser for help on using the repository browser.