summaryrefslogtreecommitdiffstats
path: root/tests/tcg/i386/Makefile.target
diff options
context:
space:
mode:
authorAlex Bennée2018-04-05 16:35:11 +0200
committerAlex Bennée2018-06-20 21:22:34 +0200
commit4132431f249ac89f413ff326ec4f960992806255 (patch)
tree21253d872fa6e7cc5262a10d2c2c8d698a098272 /tests/tcg/i386/Makefile.target
parenttests/tcg/multiarch: move most output to stdout (diff)
downloadqemu-4132431f249ac89f413ff326ec4f960992806255.tar.gz
qemu-4132431f249ac89f413ff326ec4f960992806255.tar.xz
qemu-4132431f249ac89f413ff326ec4f960992806255.zip
tests/tcg: move i386 specific tests into subdir
These only need to be built for i386 guests. This includes a stub tests/tcg/i386/Makfile.target which absorbs some of what was in tests/tcg/Makefile. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests/tcg/i386/Makefile.target')
-rw-r--r--tests/tcg/i386/Makefile.target30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target
new file mode 100644
index 0000000000..2f27b65e2d
--- /dev/null
+++ b/tests/tcg/i386/Makefile.target
@@ -0,0 +1,30 @@
+# i386 cross compile notes
+
+I386_SRC=$(SRC_PATH)/tests/tcg/i386
+
+# Set search path for all sources
+VPATH += $(I386_SRC)
+
+I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
+I386_TESTS=$(I386_SRCS:.c=)
+
+# Update TESTS
+TESTS+=$(I386_TESTS)
+
+ifneq ($(TARGET_NAME),x86_64)
+CFLAGS+=-m32
+endif
+
+#
+# hello-i386 is a barebones app
+#
+hello-i386: CFLAGS+=-ffreestanding
+hello-i386: LDFLAGS+=-nostdlib
+
+#
+# test-386 includes a couple of additional objects that need to be linked together
+#
+
+test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S test-i386.h test-i386-shift.h test-i386-muldiv.h
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ \
+ $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm