aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2018-04-17 11:14:37 +0100
committerAlex Bennée <alex.bennee@linaro.org>2018-06-20 20:22:34 +0100
commit3a082ec01b3993ff6575127042337614ca914e32 (patch)
tree4eee1cb31278e377271d004c69abc00a568eb2d8 /tests/tcg
parent25f9e7e8d722c283deb29decc01ab1a55f62b662 (diff)
downloadqemu-3a082ec01b3993ff6575127042337614ca914e32.zip
qemu-3a082ec01b3993ff6575127042337614ca914e32.tar.gz
qemu-3a082ec01b3993ff6575127042337614ca914e32.tar.bz2
tests/tcg/x86_64: add Makefile.target
The sources for x86_64 are shared in the i386 directory which will be included thanks to TARGET_BASE_ARCH. However not all sources build so we need to filter out the ones we can't build in the 64 bit world and those that can't be built for 32 bit. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'tests/tcg')
-rw-r--r--tests/tcg/i386/Makefile.target4
-rw-r--r--tests/tcg/x86_64/Makefile.target15
2 files changed, 17 insertions, 2 deletions
diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target
index 64d241c..cd17336 100644
--- a/tests/tcg/i386/Makefile.target
+++ b/tests/tcg/i386/Makefile.target
@@ -7,9 +7,9 @@ VPATH += $(I386_SRC)
I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
I386_TESTS=$(I386_SRCS:.c=)
-
+I386_ONLY_TESTS=$(filter-out test-i386-ssse3, $(I386_TESTS))
# Update TESTS
-TESTS+=$(I386_TESTS)
+TESTS+=$(I386_ONLY_TESTS)
ifneq ($(TARGET_NAME),x86_64)
CFLAGS+=-m32
diff --git a/tests/tcg/x86_64/Makefile.target b/tests/tcg/x86_64/Makefile.target
new file mode 100644
index 0000000..74f170b
--- /dev/null
+++ b/tests/tcg/x86_64/Makefile.target
@@ -0,0 +1,15 @@
+# -*- Mode: makefile -*-
+#
+# x86_64 tests - included from tests/tcg/Makefile.target
+#
+# Currently we only build test-x86_64 and test-i386-ssse3 from
+# $(SRC)/tests/tcg/i386/
+#
+
+X86_64_TESTS=$(filter-out $(I386_ONLY_TESTS), $(TESTS))
+X86_64_TESTS+=test-x86_64
+TESTS:=$(X86_64_TESTS)
+
+test-x86_64: LDFLAGS+=-lm -lc
+test-x86_64: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h
+ $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)