Rev 429 | Rev 431 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
130 | decky | 1 | MIPS_TARGET=mipsel-linux-gnu |
2 | MIPS_CC_DIR=/usr/local/mipsel/bin |
||
3 | MIPS_BINUTILS_DIR=/usr/local/mipsel/bin |
||
1 | jermar | 4 | |
5 | CC=$(MIPS_CC_DIR)/$(MIPS_TARGET)-gcc |
||
6 | AS=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-as |
||
7 | LD=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-ld |
||
293 | palkovsky | 8 | OBJDUMP=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-objdump |
268 | palkovsky | 9 | OBJCOPY=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-objcopy |
10 | BFD_ARCH=mips |
||
1 | jermar | 11 | |
329 | palkovsky | 12 | DEFS=-DARCH=$(ARCH) -DMACHINE=${MACHINE} -DKERNEL_LOAD_ADDRESS=${KERNEL_LOAD_ADDRESS} |
391 | jermar | 13 | CFLAGS=$(DEFS) -mno-abicalls -G 0 -nostdlib -fno-builtin -O2 -fno-zero-initialized-in-bss |
14 | LFLAGS= |
||
332 | palkovsky | 15 | BFD_ARCH=mips |
1 | jermar | 16 | |
332 | palkovsky | 17 | # GCC 4.0.1 compiled for mipsEL has problems compiling in |
18 | # BigEndian mode with the swl/swr/lwl/lwr instructions. |
||
19 | # We have to compile it with mips-sgi-irix5 to get it right. |
||
20 | ifeq (${MACHINE},indy) |
||
21 | MIPS_TARGET=mips-sgi-irix5 |
||
22 | MIPS_CC_DIR=/usr/local/mips/bin |
||
23 | MIPS_BINUTILS_DIR=/usr/local/mips/bin |
||
326 | palkovsky | 24 | |
332 | palkovsky | 25 | CFLAGS += -EB -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY -march=r4600 |
329 | palkovsky | 26 | BFD = ecoff-bigmips |
27 | KERNEL_LOAD_ADDRESS = 0x88002000 |
||
339 | palkovsky | 28 | BFD_NAME=elf32-bigmips |
326 | palkovsky | 29 | endif |
30 | |||
31 | ifeq (${MACHINE},lgxemul) |
||
329 | palkovsky | 32 | CFLAGS += -DHAVE_FPU -DFPU_LAZY -mips3 |
326 | palkovsky | 33 | BFD = ecoff-littlemips |
330 | palkovsky | 34 | KERNEL_LOAD_ADDRESS = 0x80100000 |
332 | palkovsky | 35 | BFD_NAME=elf32-little |
326 | palkovsky | 36 | endif |
37 | |||
38 | ifeq (${MACHINE},bgxemul) |
||
332 | palkovsky | 39 | MIPS_TARGET=mips-sgi-irix5 |
40 | MIPS_CC_DIR=/usr/local/mips/bin |
||
41 | MIPS_BINUTILS_DIR=/usr/local/mips/bin |
||
42 | |||
43 | CFLAGS += -EB -DBIG_ENDIAN -DHAVE_FPU -DFPU_LAZY -mips3 |
||
326 | palkovsky | 44 | BFD = ecoff-bigmips |
330 | palkovsky | 45 | KERNEL_LOAD_ADDRESS = 0x80100000 |
339 | palkovsky | 46 | BFD_NAME=elf32-bigmips |
326 | palkovsky | 47 | endif |
48 | |||
329 | palkovsky | 49 | # MSIM needs lwl/swl patch & 4kc instruction patch to work |
50 | # otherwise add -mmemcpy -mips3 |
||
364 | palkovsky | 51 | ifeq (${MACHINE},msim4kc) |
326 | palkovsky | 52 | BFD = binary |
429 | jermar | 53 | CFLAGS += -mhard-float -march=4kc |
330 | palkovsky | 54 | KERNEL_LOAD_ADDRESS = 0x80100000 |
332 | palkovsky | 55 | BFD_NAME=elf32-little |
326 | palkovsky | 56 | endif |
57 | |||
364 | palkovsky | 58 | ifeq (${MACHINE},msim) |
59 | BFD = binary |
||
429 | jermar | 60 | CFLAGS += -mhard-float -mips3 |
364 | palkovsky | 61 | KERNEL_LOAD_ADDRESS = 0x80100000 |
62 | BFD_NAME=elf32-little |
||
63 | endif |
||
64 | |||
329 | palkovsky | 65 | # SIMICS 4kc emulation is broken, although for instructions |
66 | # that do not bother us |
||
326 | palkovsky | 67 | ifeq (${MACHINE},simics) |
68 | BFD = elf32-little |
||
429 | jermar | 69 | CFLAGS += -mhard-float -mips3 |
330 | palkovsky | 70 | KERNEL_LOAD_ADDRESS = 0x80100000 |
332 | palkovsky | 71 | BFD_NAME=elf32-little |
326 | palkovsky | 72 | endif |
73 | |||
376 | jermar | 74 | arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in |
326 | palkovsky | 75 | $(CC) $(CFLAGS) -C -DBFD=${BFD} -E -x c $< | grep -v "^\#" > $@ |
76 | |||
1 | jermar | 77 | arch_sources= \ |
430 | jermar | 78 | generic/src/arch/start.S \ |
79 | generic/src/arch/context.S \ |
||
80 | generic/src/arch/panic.S \ |
||
81 | generic/src/arch/mips32.c \ |
||
82 | generic/src/arch/dummy.S \ |
||
83 | generic/src/arch/console.c \ |
||
84 | generic/src/arch/asm.S \ |
||
85 | generic/src/arch/exception.c \ |
||
86 | generic/src/arch/interrupt.c \ |
||
87 | generic/src/arch/cache.c \ |
||
88 | generic/src/arch/cpu/cpu.c \ |
||
89 | generic/src/arch/mm/asid.c \ |
||
90 | generic/src/arch/mm/frame.c \ |
||
91 | generic/src/arch/mm/page.c \ |
||
92 | generic/src/arch/mm/tlb.c \ |
||
93 | generic/src/arch/mm/vm.c \ |
||
94 | generic/src/arch/fpu_context.c \ |
||
95 | generic/src/arch/fmath.c \ |
||
96 | generic/src/arch/drivers/arc.c |