From 8b17219e7d01ad3e863656e6e7d26c2185392cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 17 Apr 2018 14:56:39 +0100 Subject: [PATCH] tests/tcg: enable building for i386 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While you can construct a compile command that does work using the x86_64 host compiler that most people use this is flakey. Different distros handle this is different ways so we default to using a known good i386 compiler via docker. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/tcg/i386/Makefile.include | 9 +++++++++ tests/tcg/i386/Makefile.target | 7 +++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/tcg/i386/Makefile.include diff --git a/tests/tcg/i386/Makefile.include b/tests/tcg/i386/Makefile.include new file mode 100644 index 0000000000..be1c3008dd --- /dev/null +++ b/tests/tcg/i386/Makefile.include @@ -0,0 +1,9 @@ +# +# Makefile.include for all i386 +# +# There is enough brokeness in x86_64 compilers that we don't default +# to using the x86_64 system compiler for i386 binaries. +# + +DOCKER_IMAGE=fedora-i386-cross +DOCKER_CROSS_COMPILER=gcc diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index 2f27b65e2d..8b46cc021e 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -28,3 +28,10 @@ hello-i386: LDFLAGS+=-nostdlib 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 $@ \ $( runcom.out, "TEST", "$< on $(TARGET_NAME)") + +# On i386 and x86_64 Linux only supports 4k pages (large pages are a different hack) +EXTRA_RUNS+=run-test-mmap-4096 -- GitLab