qemu

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

Makefile.softmmu-target (1436B)


      1 #
      2 # x86 system tests
      3 #
      4 # This currently builds only for i386. The common C code is built
      5 # with standard compiler flags however so we can support both by
      6 # adding additional boot files for x86_64.
      7 #
      8 
      9 I386_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/i386/system
     10 X64_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/x86_64/system
     11 
     12 # These objects provide the basic boot code and helper functions for all tests
     13 CRT_OBJS=boot.o
     14 
     15 CRT_PATH=$(I386_SYSTEM_SRC)
     16 LINK_SCRIPT=$(I386_SYSTEM_SRC)/kernel.ld
     17 LDFLAGS=-Wl,-T$(LINK_SCRIPT) -Wl,-melf_i386
     18 CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC)
     19 LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
     20 
     21 TESTS+=$(MULTIARCH_TESTS)
     22 EXTRA_RUNS+=$(MULTIARCH_RUNS)
     23 
     24 # building head blobs
     25 .PRECIOUS: $(CRT_OBJS)
     26 
     27 %.o: $(CRT_PATH)/%.S
     28 	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
     29 
     30 # Build and link the tests
     31 %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
     32 	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
     33 
     34 memory: CFLAGS+=-DCHECK_UNALIGNED=1
     35 
     36 # non-inline runs will trigger the duplicate instruction heuristics in libinsn.so
     37 run-plugin-%-with-libinsn.so:
     38 	$(call run-test, $@, \
     39 	  $(QEMU) -monitor none -display none \
     40 		  -chardev file$(COMMA)path=$@.out$(COMMA)id=output \
     41                   -plugin ../../plugin/libinsn.so$(COMMA)inline=on \
     42 	    	  -d plugin -D $*-with-libinsn.so.pout \
     43 		  $(QEMU_OPTS) $*)
     44 
     45 # Running
     46 QEMU_OPTS+=-device isa-debugcon,chardev=output -device isa-debug-exit,iobase=0xf4,iosize=0x4 -kernel