xref: /openbmc/qemu/tests/tcg/i386/Makefile.target (revision acd0c9416d4846afc541605ee0e75ca163773e6c)
1# i386 cross compile notes
2
3I386_SRC=$(SRC_PATH)/tests/tcg/i386
4
5# Set search path for all sources
6VPATH 		+= $(I386_SRC)
7
8I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
9ALL_X86_TESTS=$(I386_SRCS:.c=)
10SKIP_I386_TESTS=test-i386-ssse3
11X86_64_TESTS:=$(filter test-i386-ssse3, $(ALL_X86_TESTS))
12
13test-i386-pcmpistri: CFLAGS += -msse4.2
14run-test-i386-pcmpistri: QEMU_OPTS += -cpu max
15
16#
17# hello-i386 is a barebones app
18#
19hello-i386: CFLAGS+=-ffreestanding
20hello-i386: LDFLAGS+=-nostdlib
21
22#
23# test-386 includes a couple of additional objects that need to be linked together
24#
25
26test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S test-i386.h test-i386-shift.h test-i386-muldiv.h
27	$(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_CFLAGS) -o $@ \
28	   $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
29
30ifeq ($(SPEED), slow)
31
32test-i386-fprem.ref: test-i386-fprem
33	$(call quiet-command, ./$< > $@,"GENREF","generating $@")
34
35run-test-i386-fprem: TIMEOUT=60
36run-test-i386-fprem: test-i386-fprem test-i386-fprem.ref
37	$(call run-test,test-i386-fprem, $(QEMU) $<,"$< on $(TARGET_NAME)")
38	$(call diff-out,test-i386-fprem, test-i386-fprem.ref)
39else
40SKIP_I386_TESTS+=test-i386-fprem
41endif
42
43# Update TESTS
44I386_TESTS:=$(filter-out $(SKIP_I386_TESTS), $(ALL_X86_TESTS))
45TESTS=$(MULTIARCH_TESTS) $(I386_TESTS)
46
47# On i386 and x86_64 Linux only supports 4k pages (large pages are a different hack)
48EXTRA_RUNS+=run-test-mmap-4096
49