source: mainline/arch/mips/Makefile.inc@ ffc277e

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

Cleanup of makefiles to have common options in one main makefile.

Add simple build process for different simulators for MIPS.
Added FPU context & lazy FPU context switching to MIPS.
Cleanup of MIPS linker script.
Moved MIPS kernel above 1MB. Not tested on real machine yet, but it might help.

There is something broken with gcc inlined memcpy (either simulator or gcc), it is disabled on BigEndian mips now.

  • Property mode set to 100644
File size: 1.6 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
14ASFLAGS=-mips3
15
16DEFS=-DARCH=$(ARCH) -DMACHINE=${MACHINE}
17CFLAGS=$(DEFS) -mno-abicalls -mips3 -G 0 -nostdlib -fno-builtin -O2
18LFLAGS=-mips2 -M -no-check-sections
19
20# It seems that on big endian either GCC or the simulators
21# have the swl/swr/lwl/lwr instructions wrong. Just for sure,
22# disable it with -mmemcpy (force calling memcpy instead of inlining)
23
24ifeq (${MACHINE},indy)
25 CFLAGS += -EB -mmemcpy -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY
26 BFD = elf32-big
27endif
28
29ifeq (${MACHINE},lgxemul)
30 CFLAGS += -DHAVE_FPU -DFPU_LAZY
31 BFD = ecoff-littlemips
32endif
33
34ifeq (${MACHINE},bgxemul)
35 CFLAGS += -EB -mmemcpy -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY
36 BFD = ecoff-bigmips
37endif
38
39ifeq (${MACHINE},msim)
40 BFD = binary
41 CFLAGS += -msoft-float
42endif
43
44ifeq (${MACHINE},simics)
45 BFD = elf32-little
46 CFLAGS += -msoft-float
47endif
48
49../arch/$(ARCH)/_link.ld: ../arch/$(ARCH)/_link.ld.in
50 $(CC) $(CFLAGS) -C -DBFD=${BFD} -E -x c $< | grep -v "^\#" > $@
51
52arch_sources= \
53 arch/start.S \
54 arch/context.S \
55 arch/panic.S \
56 arch/mips.c \
57 arch/dummy.S \
58 arch/console.c \
59 arch/asm.S \
60 arch/exception.c \
61 arch/interrupt.c \
62 arch/cache.c \
63 arch/cpu/cpu.c \
64 arch/mm/frame.c \
65 arch/mm/page.c \
66 arch/mm/tlb.c \
67 arch/fpu_context.c \
68 arch/fmath.c
Note: See TracBrowser for help on using the repository browser.