Subversion Repositories HelenOS-historic

Rev

Rev 330 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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