qemu

FORK: QEMU emulator
git clone https://git.neptards.moe/neptards/qemu.git
Log | Files | Refs | Submodules | LICENSE

Makefile.target (1740B)


      1 # -*- Mode: makefile -*-
      2 #
      3 # Cris tests
      4 #
      5 # Currently we can only build the "bare" tests with the docker
      6 # supplied cross-compiler.
      7 #
      8 
      9 CRIS_SRC = $(SRC_PATH)/tests/tcg/cris/bare
     10 CRIS_ALL = $(wildcard $(CRIS_SRC)/*.s)
     11 CRIS_TESTS = $(patsubst $(CRIS_SRC)/%.s, %, $(CRIS_ALL))
     12 # Filter out common blobs and broken tests
     13 CRIS_BROKEN_TESTS  = crt check_jsr
     14 # upstream GCC doesn't support v32
     15 CRIS_BROKEN_TESTS += check_mcp check_mulv32 check_addiv32 check_movpmv32
     16 CRIS_BROKEN_TESTS += check_movprv32 check_clearfv32 check_movemrv32 check_bas
     17 CRIS_BROKEN_TESTS += check_lapc check_movei
     18 # no sure why
     19 CRIS_BROKEN_TESTS += check_scc check_xarith
     20 
     21 CRIS_USABLE_TESTS = $(filter-out $(CRIS_BROKEN_TESTS), $(CRIS_TESTS))
     22 CRIS_RUNS = $(patsubst %, run-%, $(CRIS_USABLE_TESTS))
     23 
     24 # override the list of tests, as we can't build the multiarch tests
     25 TESTS = $(CRIS_USABLE_TESTS)
     26 EXTRA_RUNS =
     27 VPATH = $(CRIS_SRC)
     28 
     29 AS	= $(CC) -x assembler-with-cpp
     30 LD      = $(CC)
     31 
     32 # we rely on GCC inline:ing the stuff we tell it to in many places here.
     33 CFLAGS  = -Winline -Wall -g -O2 -static
     34 NOSTDFLAGS = -nostartfiles -nostdlib
     35 ASFLAGS += -mcpu=v10 -g -Wa,-I,$(SRC_PATH)/tests/tcg/cris/bare
     36 CRT_FILES = crt.o sys.o
     37 
     38 # stop make deleting crt files if build fails
     39 .PRECIOUS: $(CRT_FILES)
     40 
     41 %.o: %.c
     42 	$(CC) -c $< -o $@
     43 
     44 %.o: %.s
     45 	$(AS) $(ASFLAGS) -c $< -o $@
     46 
     47 %: %.s $(CRT_FILES)
     48 	$(CC) $(ASFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT_FILES)
     49 
     50 # The default CPU breaks (possibly as it's max?) so force crisv17
     51 QEMU_OPTS=-cpu crisv17
     52 
     53 # Additional runners to run under GNU SIM
     54 CRIS_RUNS_ON_SIM=$(patsubst %, %-on-sim, $(CRIS_RUNS))
     55 SIMG:=cris-axis-linux-gnu-run
     56 
     57 # e.g.: make -f ../../tests/tcg/Makefile run-check_orm-on-sim
     58 run-%-on-sim:
     59 	$(call run-test, $<, $(SIMG) $<)