xref: /openbmc/qemu/tests/tcg/i386/Makefile.target (revision 09a274d8)
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))
9I386_TESTS=$(I386_SRCS:.c=)
10I386_ONLY_TESTS=$(filter-out test-i386-ssse3, $(I386_TESTS))
11# Update TESTS
12TESTS+=$(I386_ONLY_TESTS)
13
14ifneq ($(TARGET_NAME),x86_64)
15CFLAGS+=-m32
16endif
17
18#
19# hello-i386 is a barebones app
20#
21hello-i386: CFLAGS+=-ffreestanding
22hello-i386: LDFLAGS+=-nostdlib
23
24#
25# test-386 includes a couple of additional objects that need to be linked together
26#
27
28test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S test-i386.h test-i386-shift.h test-i386-muldiv.h
29	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ \
30	   $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
31
32ifeq ($(SPEED), slow)
33
34test-i386-fprem.ref: test-i386-fprem
35	$(call quiet-command, ./$< > $@,"GENREF","generating $@")
36
37run-test-i386-fprem: TIMEOUT=60
38run-test-i386-fprem: test-i386-fprem
39	$(call run-test,test-i386-fprem, $(QEMU) $<,"$< on $(TARGET_NAME)")
40	$(call diff-out,test-i386-fprem, $(I386_SRC)/$<.ref)
41else
42run-test-i386-fprem: test-i386-fprem
43	$(call skip-test, $<, "SLOW")
44endif
45
46# On i386 and x86_64 Linux only supports 4k pages (large pages are a different hack)
47EXTRA_RUNS+=run-test-mmap-4096
48