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

lfn serial ticket/834-toolchain-update topic/fix-logger-deadlock topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 8491c48 was a1493d9, checked in by Ondrej Palkovsky <ondrap@…>, 21 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
RevLine 
[0970f43]1MIPS_TARGET=mipsel-linux-gnu
[f761f1eb]2
[0970f43]3MIPS_CC_DIR=/usr/local/mipsel/bin
4MIPS_BINUTILS_DIR=/usr/local/mipsel/bin
[f761f1eb]5
6CC=$(MIPS_CC_DIR)/$(MIPS_TARGET)-gcc
7AS=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-as
8LD=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-ld
[ae9624e]9OBJDUMP=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-objdump
[ab08b42]10OBJCOPY=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-objcopy
11BFD_NAME=elf32-tradlittlemips
12BFD_ARCH=mips
[f761f1eb]13
[24241cf]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
[f761f1eb]17
[ffc277e]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)
[24241cf]23 CFLAGS += -EB -mmemcpy -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY -march=r4600
24 BFD = ecoff-bigmips
25 KERNEL_LOAD_ADDRESS = 0x88002000
[ffc277e]26endif
27
28ifeq (${MACHINE},lgxemul)
[24241cf]29 CFLAGS += -DHAVE_FPU -DFPU_LAZY -mips3
[ffc277e]30 BFD = ecoff-littlemips
[a1493d9]31 KERNEL_LOAD_ADDRESS = 0x80100000
[ffc277e]32endif
33
34ifeq (${MACHINE},bgxemul)
[24241cf]35 CFLAGS += -EB -mmemcpy -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY -mips3
[ffc277e]36 BFD = ecoff-bigmips
[a1493d9]37 KERNEL_LOAD_ADDRESS = 0x80100000
[ffc277e]38endif
39
[24241cf]40# MSIM needs lwl/swl patch & 4kc instruction patch to work
41# otherwise add -mmemcpy -mips3
[ffc277e]42ifeq (${MACHINE},msim)
43 BFD = binary
[24241cf]44 CFLAGS += -msoft-float -march=4kc
[a1493d9]45 KERNEL_LOAD_ADDRESS = 0x80100000
[ffc277e]46endif
47
[24241cf]48# SIMICS 4kc emulation is broken, although for instructions
49# that do not bother us
[ffc277e]50ifeq (${MACHINE},simics)
51 BFD = elf32-little
[24241cf]52 CFLAGS += -msoft-float -mips3
[a1493d9]53 KERNEL_LOAD_ADDRESS = 0x80100000
[ffc277e]54endif
55
56../arch/$(ARCH)/_link.ld: ../arch/$(ARCH)/_link.ld.in
57 $(CC) $(CFLAGS) -C -DBFD=${BFD} -E -x c $< | grep -v "^\#" > $@
58
[f761f1eb]59arch_sources= \
60 arch/start.S \
61 arch/context.S \
[2bd4fdf]62 arch/panic.S \
[f761f1eb]63 arch/mips.c \
[2bd4fdf]64 arch/dummy.S \
[38de8a5]65 arch/console.c \
[2bd4fdf]66 arch/asm.S \
[f761f1eb]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 \
[0ca6faa]73 arch/mm/tlb.c \
[c7bb8b05]74 arch/fpu_context.c \
75 arch/fmath.c
Note: See TracBrowser for help on using the repository browser.