Edgar E. Iglesias | bee5a5f | 2012-01-13 11:09:56 +0100 | [diff] [blame] | 1 | -include ../../../config-host.mak |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 2 | |
| 3 | CROSS=crisv32-axis-linux-gnu- |
Edgar E. Iglesias | bee5a5f | 2012-01-13 11:09:56 +0100 | [diff] [blame] | 4 | SIM=../../../cris-linux-user/qemu-cris -L ./ |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 5 | SIMG=cris-axis-linux-gnu-run --sysroot=./ |
| 6 | |
| 7 | CC = $(CROSS)gcc |
| 8 | #AS = $(CROSS)as |
| 9 | AS = $(CC) -x assembler-with-cpp |
| 10 | SIZE = $(CROSS)size |
| 11 | LD = $(CC) |
| 12 | OBJCOPY = $(CROSS)objcopy |
| 13 | |
| 14 | # we rely on GCC inline:ing the stuff we tell it to in many places here. |
| 15 | CFLAGS = -Winline -Wall -g -O2 -static |
| 16 | NOSTDFLAGS = -nostartfiles -nostdlib |
Edgar E. Iglesias | bee5a5f | 2012-01-13 11:09:56 +0100 | [diff] [blame] | 17 | ASFLAGS += -g -Wa,-I,$(SRC_PATH)/tests/tcg/cris/ |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 18 | LDLIBS = |
| 19 | NOSTDLIBS = -lgcc |
| 20 | |
| 21 | CRT = crt.o |
| 22 | SYS = sys.o |
| 23 | TESTCASES += check_abs.tst |
| 24 | TESTCASES += check_addc.tst |
| 25 | TESTCASES += check_addcm.tst |
Rabin Vincent | 4a58f35 | 2016-08-24 10:42:16 +0200 | [diff] [blame] | 26 | TESTCASES += check_addcv17.tst |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 27 | TESTCASES += check_addo.tst |
| 28 | TESTCASES += check_addoq.tst |
| 29 | TESTCASES += check_addi.tst |
| 30 | TESTCASES += check_addiv32.tst |
| 31 | TESTCASES += check_addm.tst |
| 32 | TESTCASES += check_addr.tst |
| 33 | TESTCASES += check_addq.tst |
| 34 | TESTCASES += check_addxc.tst |
| 35 | TESTCASES += check_addxm.tst |
| 36 | TESTCASES += check_addxr.tst |
| 37 | TESTCASES += check_andc.tst |
| 38 | TESTCASES += check_andm.tst |
| 39 | TESTCASES += check_andr.tst |
| 40 | TESTCASES += check_andq.tst |
| 41 | TESTCASES += check_asr.tst |
| 42 | TESTCASES += check_ba.tst |
| 43 | TESTCASES += check_bas.tst |
| 44 | TESTCASES += check_bcc.tst |
| 45 | TESTCASES += check_bound.tst |
| 46 | TESTCASES += check_boundc.tst |
| 47 | TESTCASES += check_boundr.tst |
| 48 | TESTCASES += check_btst.tst |
| 49 | TESTCASES += check_clearfv32.tst |
| 50 | TESTCASES += check_cmpc.tst |
| 51 | TESTCASES += check_cmpr.tst |
| 52 | TESTCASES += check_cmpq.tst |
| 53 | TESTCASES += check_cmpm.tst |
| 54 | TESTCASES += check_cmpxc.tst |
| 55 | TESTCASES += check_cmpxm.tst |
| 56 | TESTCASES += check_cmp-2.tst |
| 57 | TESTCASES += check_clrjmp1.tst |
| 58 | TESTCASES += check_dstep.tst |
edgar_igl | 1b893ef | 2008-02-25 10:00:07 +0000 | [diff] [blame] | 59 | TESTCASES += check_ftag.tst |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 60 | TESTCASES += check_int64.tst |
| 61 | # check_jsr is broken. |
| 62 | #TESTCASES += check_jsr.tst |
| 63 | TESTCASES += check_mcp.tst |
| 64 | TESTCASES += check_movei.tst |
| 65 | TESTCASES += check_mover.tst |
| 66 | TESTCASES += check_moverm.tst |
| 67 | TESTCASES += check_moveq.tst |
| 68 | TESTCASES += check_movemr.tst |
| 69 | TESTCASES += check_movemrv32.tst |
| 70 | TESTCASES += check_movecr.tst |
| 71 | TESTCASES += check_movmp.tst |
| 72 | TESTCASES += check_movpr.tst |
| 73 | TESTCASES += check_movprv32.tst |
| 74 | TESTCASES += check_movdelsr1.tst |
| 75 | TESTCASES += check_movpmv32.tst |
| 76 | TESTCASES += check_movsr.tst |
| 77 | TESTCASES += check_movsm.tst |
| 78 | TESTCASES += check_movscr.tst |
| 79 | TESTCASES += check_movur.tst |
| 80 | TESTCASES += check_movum.tst |
| 81 | TESTCASES += check_movucr.tst |
| 82 | TESTCASES += check_mulx.tst |
| 83 | TESTCASES += check_mulv32.tst |
| 84 | TESTCASES += check_neg.tst |
| 85 | TESTCASES += check_not.tst |
| 86 | TESTCASES += check_lz.tst |
| 87 | TESTCASES += check_lapc.tst |
| 88 | TESTCASES += check_lsl.tst |
| 89 | TESTCASES += check_lsr.tst |
| 90 | TESTCASES += check_orc.tst |
| 91 | TESTCASES += check_orm.tst |
| 92 | TESTCASES += check_orr.tst |
| 93 | TESTCASES += check_orq.tst |
| 94 | TESTCASES += check_ret.tst |
| 95 | TESTCASES += check_swap.tst |
| 96 | TESTCASES += check_scc.tst |
| 97 | TESTCASES += check_subc.tst |
| 98 | TESTCASES += check_subq.tst |
| 99 | TESTCASES += check_subr.tst |
| 100 | TESTCASES += check_subm.tst |
| 101 | TESTCASES += check_glibc_kernelversion.tst |
| 102 | TESTCASES += check_xarith.tst |
| 103 | |
| 104 | TESTCASES += check_hello.ctst |
| 105 | TESTCASES += check_stat1.ctst |
| 106 | TESTCASES += check_stat2.ctst |
| 107 | TESTCASES += check_stat3.ctst |
| 108 | TESTCASES += check_stat4.ctst |
| 109 | TESTCASES += check_openpf1.ctst |
| 110 | TESTCASES += check_openpf2.ctst |
| 111 | TESTCASES += check_openpf3.ctst |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 112 | TESTCASES += check_openpf5.ctst |
| 113 | TESTCASES += check_mapbrk.ctst |
| 114 | TESTCASES += check_mmap1.ctst |
| 115 | TESTCASES += check_mmap2.ctst |
| 116 | TESTCASES += check_mmap3.ctst |
edgar_igl | cbdbb77 | 2008-02-28 11:23:20 +0000 | [diff] [blame] | 117 | TESTCASES += check_sigalrm.ctst |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 118 | TESTCASES += check_time2.ctst |
edgar_igl | ef96779 | 2009-01-07 14:19:38 +0000 | [diff] [blame] | 119 | TESTCASES += check_settls1.ctst |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 120 | |
| 121 | TESTCASES += check_gcctorture_pr28634-1.ctst |
| 122 | #TESTCASES += check_gcctorture_pr28634.ctst |
| 123 | |
| 124 | all: build |
| 125 | |
Edgar E. Iglesias | bee5a5f | 2012-01-13 11:09:56 +0100 | [diff] [blame] | 126 | %.o: $(SRC_PATH)/tests/tcg/cris/%.c |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 127 | $(CC) $(CFLAGS) -c $< -o $@ |
| 128 | |
Edgar E. Iglesias | bee5a5f | 2012-01-13 11:09:56 +0100 | [diff] [blame] | 129 | %.o: $(SRC_PATH)/tests/tcg/cris/%.s |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 130 | $(AS) $(ASFLAGS) -c $< -o $@ |
| 131 | |
| 132 | %.tst: %.o |
| 133 | $(CC) $(CFLAGS) $(NOSTDFLAGS) $(LDLIBS) $(NOSTDLIBS) $(CRT) $< $(SYS) -o $@ |
| 134 | |
| 135 | %.ctst: %.o |
| 136 | $(CC) $(CFLAGS) $(LDLIBS) $< -o $@ |
| 137 | |
Rabin Vincent | 4a58f35 | 2016-08-24 10:42:16 +0200 | [diff] [blame] | 138 | |
| 139 | sysv10.o: sys.c |
| 140 | $(CC) $(CFLAGS) -mcpu=v10 -c $< -o $@ |
| 141 | |
| 142 | crtv10.o: crt.s |
| 143 | $(AS) $(ASFLAGS) -mcpu=v10 -c $< -o $@ |
| 144 | |
| 145 | check_addcv17.tst: ASFLAGS += -mcpu=v10 |
| 146 | check_addcv17.tst: CRT := crtv10.o |
| 147 | check_addcv17.tst: SYS := sysv10.o |
| 148 | check_addcv17.tst: crtv10.o sysv10.o |
| 149 | |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 150 | build: $(CRT) $(SYS) $(TESTCASES) |
| 151 | |
| 152 | check: $(CRT) $(SYS) $(TESTCASES) |
Eric Blake | b43671f | 2017-07-03 13:09:50 -0500 | [diff] [blame] | 153 | @printf "\nQEMU simulator.\n" |
edgar_igl | 3132811 | 2008-06-06 11:07:50 +0000 | [diff] [blame] | 154 | for case in $(TESTCASES); do \ |
Eric Blake | b43671f | 2017-07-03 13:09:50 -0500 | [diff] [blame] | 155 | printf %s "$$case "; \ |
Rabin Vincent | 4a58f35 | 2016-08-24 10:42:16 +0200 | [diff] [blame] | 156 | SIMARGS=; \ |
| 157 | case $$case in *v17*) SIMARGS="-cpu crisv17";; esac; \ |
| 158 | $(SIM) $$SIMARGS ./$$case; \ |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 159 | done |
| 160 | check-g: $(CRT) $(SYS) $(TESTCASES) |
Eric Blake | b43671f | 2017-07-03 13:09:50 -0500 | [diff] [blame] | 161 | @printf "\nGDB simulator.\n" |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 162 | @for case in $(TESTCASES); do \ |
Eric Blake | b43671f | 2017-07-03 13:09:50 -0500 | [diff] [blame] | 163 | printf %s "$$case "; \ |
ths | dd43edf | 2007-10-08 13:32:20 +0000 | [diff] [blame] | 164 | $(SIMG) $$case; \ |
| 165 | done |
| 166 | |
| 167 | clean: |
Rabin Vincent | 4a58f35 | 2016-08-24 10:42:16 +0200 | [diff] [blame] | 168 | $(RM) -fr $(TESTCASES) *.o |